Changeset 23 for trunk/linkmanager.php
- Timestamp:
- 05/14/2003 12:50:59 AM (23 years ago)
- File:
-
- 1 edited
-
trunk/linkmanager.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/linkmanager.php
r21 r23 52 52 $b2varstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image', 53 53 'description', 'visible', 'target', 'category', 'link_id', 54 'submit', 'order_by', 'links_show_cat_id', 'rating' );54 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel'); 55 55 for ($i=0; $i<count($b2varstoreset); $i += 1) { 56 56 $b2var = $b2varstoreset[$i]; … … 86 86 $link_visible = $HTTP_POST_VARS["visible"]; 87 87 $link_rating = $HTTP_POST_VARS["rating"]; 88 $link_rel = $HTTP_POST_VARS["rel"]; 88 89 $auto_toggle = get_autotoggle($link_category); 89 90 … … 98 99 } 99 100 100 $sql = "INSERT INTO $tablelinks (link_url, link_name, link_image, link_target, link_category, link_description, link_visible, link_owner, link_rating ) " .101 $sql = "INSERT INTO $tablelinks (link_url, link_name, link_image, link_target, link_category, link_description, link_visible, link_owner, link_rating, link_rel) " . 101 102 " VALUES('" . addslashes($link_url) . "','" 102 103 . addslashes($link_name) . "', '" 103 104 . addslashes($link_image) . "', '$link_target', $link_category, '" 104 . addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating )";105 . addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) ."')"; 105 106 106 107 $sql_result = mysql_query($sql) or die("Couldn't execute query."."sql=[$sql]". mysql_error()); … … 135 136 $link_visible = $HTTP_POST_VARS["visible"]; 136 137 $link_rating = $HTTP_POST_VARS["rating"]; 138 $link_rel = $HTTP_POST_VARS["rel"]; 137 139 $auto_toggle = get_autotoggle($link_category); 138 140 … … 151 153 " link_target='$link_target',\n link_category=$link_category,\n " . 152 154 " link_visible='$link_visible',\n link_description='" . addslashes($link_description) . "',\n " . 153 " link_rating=$link_rating\n" . 155 " link_rating=$link_rating,\n" . 156 " link_rel='" . addslashes($link_rel) . "'\n" . 154 157 " WHERE link_id=$link_id"; 155 158 //error_log($sql); … … 195 198 } 196 199 197 $sql = "SELECT link_url, link_name, link_image, link_target, link_description, link_visible, link_category AS cat_id, link_rating " .200 $sql = "SELECT link_url, link_name, link_image, link_target, link_description, link_visible, link_category AS cat_id, link_rating, link_rel " . 198 201 " FROM $tablelinks " . 199 202 " WHERE link_id = $link_id"; … … 209 212 $link_visible = $row->link_visible; 210 213 $link_rating = $row->link_rating; 214 $link_rel = stripslashes($row->link_rel); 211 215 } 212 216 … … 236 240 <td height="20" align="right">Description:</td> 237 241 <td><input type="text" name="description" size="80" value="<?php echo $link_description; ?>"></td> 242 </tr> 243 <tr height="20"> 244 <td height="20" align="right">Rel:</td> 245 <td><input type="text" name="rel" size="80" value="<?php echo $link_rel; ?>"></td> 238 246 </tr> 239 247 <tr height="20"> … … 409 417 </tr> 410 418 <?php 411 $sql = "SELECT link_url, link_name, link_image, link_description, link_visible, link_category AS cat_id, cat_name AS category, $tableusers.user_login, link_id, link_rating "419 $sql = "SELECT link_url, link_name, link_image, link_description, link_visible, link_category AS cat_id, cat_name AS category, $tableusers.user_login, link_id, link_rating, link_rel " 412 420 . " FROM $tablelinks LEFT JOIN $tablelinkcategories ON $tablelinks.link_category = $tablelinkcategories.cat_id " 413 421 . " LEFT JOIN $tableusers on $tableusers.ID = $tablelinks.link_owner "; … … 455 463 456 464 echo("<tr>\n"); 457 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" colspan=\"4\"><b>Desc:</b> ".stripslashes($row->link_description)."</td>\n"); 465 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" colspan=\"2\"><b>Desc:</b> ".stripslashes($row->link_description)."</td>\n"); 466 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" ><b>Rel:</b></td>\n"); 467 $my_rel = stripslashes($row->link_rel); 468 if ($my_rel == '') { 469 $my_rel = ' '; 470 } 471 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" >$my_rel</td>\n"); 458 472 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" ><b>Rating:</b> ".$row->link_rating."</td>\n"); 459 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" valign=\"top\"><b>Owner:</ ab></td>\n");473 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" valign=\"top\"><b>Owner:</b></td>\n"); 460 474 echo(" <td style=\"border-bottom: 1px dotted #9C9A9C;\" valign=\"top\">".$row->user_login."</td>\n"); 461 475 echo("</tr>\n"); … … 491 505 <td height="20" align="right">Description:</td> 492 506 <td><input type="text" name="description" size="80" value=""></td> 507 </tr> 508 <tr height="20"> 509 <td height="20" align="right">Rel:</td> 510 <td><input type="text" name="rel" size="80" value=""></td> 493 511 </tr> 494 512 <tr height="20">
Note: See TracChangeset
for help on using the changeset viewer.