Changeset 11390
- Timestamp:
- Jun 15, 2011, 11:27:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ID_switch/admin/admin.php
r10591 r11390 61 61 if (isset($_POST['IDS'])and is_numeric($_POST['IDS1']) and (!$_POST['IDS1'])==0 and is_numeric($_POST['IDS2']) and (!$_POST['IDS2'])==0) 62 62 { 63 64 $query = ' 65 select id, hit, has_high, average_rate, path 66 FROM ' . IMAGES_TABLE . ' 67 WHERE id = \''.$_POST['IDS1'].'\' 68 ;'; 69 $result = pwg_query($query); 70 $row = mysql_fetch_array($result); 71 $id1=$row['id']; 72 $hit1=$row['hit']; 73 $has_high1=$row['has_high']; 74 $average_rate1=$row['average_rate']; 75 76 $query = ' 77 select id, hit, has_high, average_rate, path 78 FROM ' . IMAGES_TABLE . ' 79 WHERE id = \''.$_POST['IDS2'].'\' 80 ;'; 81 $result = pwg_query($query); 82 $row = mysql_fetch_array($result); 83 $id2=$row['id']; 84 $hit2=$row['hit']; 85 $has_high2=$row['has_high']; 86 $average_rate2=$row['average_rate']; 63 87 64 88 $query = ' … … 79 103 $query = ' 80 104 UPDATE ' . IMAGES_TABLE . ' 81 SET id= \''.$_POST['IDS1'].'\' 105 SET id= \''.$_POST['IDS1'].'\', 106 hit= \''.$hit1.'\', 107 average_rate= \''.$average_rate1.'\' 82 108 WHERE id = \''.$_POST['IDS2'].'\' 83 109 ;'; … … 86 112 $query = ' 87 113 UPDATE ' . IMAGES_TABLE . ' 88 SET id= \''.$_POST['IDS2'].'\' 114 SET id= \''.$_POST['IDS2'].'\', 115 hit= \''.$hit2.'\', 116 average_rate= \''.$average_rate2.'\' 89 117 WHERE id = \''.$tempoids.'\' 90 118 ;';
Note: See TracChangeset
for help on using the changeset viewer.