(file) Return to func_editlinks.php CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / mysqlinks / lib

 1 rizwank 1.1 <?php
 2             //get set
 3             include('./config.php');
 4             
 5             // get authorised
 6             include('./validate.php');
 7             
 8             // get connected
 9             include('./database.php');
10             
11             ?>
12             <?php
13             
14             if ($HTTP_POST_VARS['type'] == "edit") {
15                   $query = "UPDATE `$HTTP_POST_VARS[link_cat]` SET `url` = '$HTTP_POST_VARS[link_url]', `title` = '$HTTP_POST_VARS[link_name]', `extras` = '$HTTP_POST_VARS[link_extras]', `status` = '$HTTP_POST_VARS[link_status]' WHERE `id` = '$HTTP_POST_VARS[link_id]' LIMIT 1";
16                   $results = mysql_query($query) or die("Failed updating link: " . mysql_error());
17                   $go = "Location: " . $mysqvars[url] . "/admin.php?func=5&msg=92"; 
18                   header($go);
19             } elseif ($HTTP_POST_VARS['type'] == "move") {
20                   $query = "INSERT INTO `$HTTP_POST_VARS[new_category]` (url,title,extras,status) values ('$HTTP_POST_VARS[link_url]','$HTTP_POST_VARS[link_name]','$HTTP_POST_VARS[link_extras]','$HTTP_POST_VARS[link_status]')";
21             			$q2 = "DELETE FROM `$HTTP_POST_VARS[old_category]` WHERE `id` = '$HTTP_POST_VARS[link_id]'";
22 rizwank 1.1       $results = mysql_query($query) or die("Failed moving link: " . mysql_error());
23                   $r2 = mysql_query($q2) or die("Failed moving link: " . mysql_error());			
24                   $go = "Location: " . $mysqvars[url] . "/admin.php?func=5&msg=91"; 
25                   header($go);
26             }
27             
28             ?>

Rizwan Kassim
Powered by
ViewCVS 0.9.2