(file) Return to edit-pic-exe.php CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / photo / sspadmin

 1 rizwank 1.1 <?php
 2             require "./inc/head.php";
 3             
 4             $safety = get_magic_quotes_gpc();
 5             $pid = $_REQUEST['pid'];
 6             $aid = $_REQUEST['aid'];
 7             $st = $_REQUEST['inc'];
 8             $link = $_REQUEST['link'];
 9             $cap = ($safety) ? $_REQUEST['cap'] : mysql_real_escape_string($_REQUEST['cap']);
10             $atn = $_REQUEST['aTn'];
11             $fn = $_REQUEST['psrc'];
12             $setAtn = $_REQUEST['setAtn'];
13             
14             $link = htmlspecialchars($link);
15             $cap = htmlspecialchars($cap);
16             
17             if (empty($st))
18             	$st = 0;
19             	
20             if (empty($atn))
21             	$atn = 0;
22 rizwank 1.1 else
23             {
24             	$q = "SELECT path FROM $atbl WHERE id = $aid";
25             	$r = mysql_query($q);
26             	$row = mysql_fetch_array($r);
27             	$p = $row['path'];
28             	$fn = $adminDir.'/albums/'.$p.'/tn/'.$fn;
29             }
30             
31             mysql_query("UPDATE $itbl SET active=$st, link='$link', caption='$cap' WHERE id = $pid AND aid = $aid") or die(mysql_error());
32             
33             if ($atn == 1)
34             {
35             	mysql_query("UPDATE $atbl SET aTn='$fn' WHERE id = $aid") or die(mysql_error());
36             }
37             else
38             {
39             	if ($setAtn == $fn)
40             		mysql_query("UPDATE $atbl SET aTn='' WHERE id = $aid") or die(mysql_error());
41             }
42             			
43 rizwank 1.1 header("Location: edit-pic.php?pid=$pid&aid=$aid&m=1");
44             
45             ?>

Rizwan Kassim
Powered by
ViewCVS 0.9.2