Filter:   InfoImg
download editadd.php
Language: PHP
LOC: 83
Project Info
Total ISP(total-isp)
Server: SourceForge
Type: cvs
...orge\t\total‑isp\total‑isp\
   abn.php
   addnew.php
   addnote.php
   addpay.php
   addsub.php
   addtime.php
   aliasadd.php
   answer.php
   approvelink.php
   ask.php
   autobill.php
   autobillpost.php
   backuplink.php
   batchtax.php
   Blocks-check.php
   Blocks-oldmail.php
   buildmenu.php
   business-check.php
   buytime.php
   cachemgr.php
   callanalysis.php
   calls.php
   callweekall.php
   ccemail.php
   changes.php
   checkmail.php
   cli.php
   clicheck.php
   config.php
   createwebdir.php
   credit.php
   creditpost.php
   cvimage.php
   dbspec.sql
   dealer.php
   dealeredit.php
   dealereditsave.php
   dealermenu.php
   dealerspecial-check.php
   dealerspecial.php
   dealersummary.php
   dig.php
   dnstest.php
   domainadd.php
   dschurn.php
   dsused.php
   edit.php
   editadd.php
   emailip.php
   expire.php
   extraadd.php
   faq.php
   firstpayments.php
   fixedip.dat
   fixedip.ph
   fixedip.php
   frames.php
   frconten.php
   frmain.php
   getcall.php
   gstinc.inc.php
   gsttest.php
   hms.inc.php
   index.php
   invoicepost.php
   invoices.php
   IPAD-check.php
   ipadmail.dat
   jump.php
   kick.php
   kickall.php
   killed.php
   lastaccess.php
   lastcall.php
   lastpasswords.php
   list.php
   listpay.php
   listpurchase-cash.php
   listpurchase-cheque.php
   listpurchase-code.php
   listpurchase-dupes.php
   listpurchase-exact.php
   listpurchase-group.php
   listpurchase-summary.php
   listpurchase-supplier.php
   ...purchase-unapproved.php
   listpurchase.php
   lm.inc.php
   loginfail.php
   mail.php
   mailadd.php
   mailusr.php
   monthpurch.php
   mysql.inc.php
   names.php
   newcustomer.php
   nextcall.php
   nosubs.php
   orphans.php
   password.php
   payimage.php
   payment.php
   payreport.php
   payview.php
   pdf-daily-sum.php
   pdfprint.inc.php
   permanent-check.php
   phpinfo.php
   phptest.php
   ping.php
   purchase-delete.php
   purchaseedit.php
   purchaseindex.php
   purchasing.php
   qchar.php
   radiususers.php
   radtest.php
   reallysure.php
   recall.php
   redir.php
   report.php
   reseller-check.php
   resellview.php
   sampledata.sql
   searchfaq.php
   searchfaqres.php
   sendmail.php
   staff.php
   subedit.php
   subeditadd.php
   submituser.php
   subnames.php
   taxpdf.php
   testbatch.php
   testpdf-day.php
   testpost.php
   testtaxpdf.php
   testuser.php
   testwho.php
   thundermail.php
   tigris.php
   time1.inc.php
   timetest.php
   top.php
   unanswered.php
   unlimited-3mth-check.php
   unlimited-check.php
   unlimited-stats.php
   unlimitedpartition.php
   uploadmailhdr.php
   user.php
   viewnotes.php
   visp.inc.php
   webadd.php
   weblinks.php
   WebSite-check.php
   weeknotes.php
   weekuser.php
   who.php
   whoip.php
   whoverify.php

<? 

$usql="UPDATE MasterAccounts SET ";
$sql="Select * from MasterAccounts WHERE CustomerID=".$CustomerID;

include "mysql.inc.php";
$result = mysql_query($sql);
$res2 = mysql_query($sql);

#$row=mysql_fetch_row($result);
$r = mysql_fetch_array($result);

#mysql_data_seek($result,0);

$i=0;
#while (list ($field->name,$val) = each ($r)){
while ($field=mysql_fetch_field($res2)) {
	#echo "$field->name";
	reset($HTTP_POST_VARS);
	#print "$field->name: $val<BR>\n";
	if ($HTTP_POST_VARS[$field->name] != $row[$field->name])
	{
		$echo.= "<B>$field->name</B>".$HTTP_POST_VARS[$field->name]." ";
		if ($r[$field->name] != $HTTP_POST_VARS[$field->name]){
			$var=$field->name;
			$change.=$field->name.":".$r[$field->name]."->".$HTTP_POST_VARS[$field->name]."\n";  
			#echo "was <B>$row[$i]</B>";
			$usql=$usql."$field->name='".$HTTP_POST_VARS[$field->name]."', ";
		}
		#echo "<BR>";
	}
	else
	{
		 $echo.= "<I>$field->name</I>".$HTTP_POST_VARS[$field->name]."<BR>";
	} 
$i++;
}
if ($CustomerID>0 and strlen($usql)>21) 
{
$usql=$usql."LastModifyDate=Now(), ";
$usql.="LastModifyUser='$PHP_AUTH_USER', ";

$usql=substr($usql,0,strlen($usql)-2);
$usql=$usql." WHERE CustomerID=$CustomerID";
$echo.= $usql;
if (mysql_query($usql))
	{
	$echo.= "<BR><B>UPDATED</B>";

	$csql = "INSERT INTO Changes(ChangeUser, ChangeDate, ChangeText,CustomerID, IPAddress)
		VALUES('$PHP_AUTH_USER', now(), '$change',$CustomerID,'$REMOTE_ADDR')";
	mysql_query($csql);

	if ($debug)
		print $echo;
	else{
		header ("Location: user.php");
		exit;
	}
	
	}
else
	print "<BR><B>Save Error</B>.<BR>$echo";
}
#echo "<BR>";

#$row=mysql_fetch_array($result);

if ($HTTP_POST_VARS) 
      { 
      for(reset($HTTP_POST_VARS); $key = key($HTTP_POST_VARS);
next($HTTP_POST_VARS)) 
      { 
      if (is_array($HTTP_POST_VARS[$key])) 
          { 
          $num=count($HTTP_POST_VARS[$key]); 
          for ($i=0; $i<$num; $i++) 
              #print  "$$key". "[$i] =".$HTTP_POST_VARS[$key][$i]."<br>\n";     
          	
		while ($field=mysql_fetch_field($result)) 
		{
           		
			if ($field->name == $key)
				{
				#print "<B>".$field->name."</B>";
				}
		} 
	}
	else	
	{ 
              #print  "$$key = ".$HTTP_POST_VARS[$key]. "<br>\n";
          } 
      } 
      } 
 # print  "<hr>"; 
?>