Changeset 322 for branches/release-1_3/admin
- Timestamp:
- Jan 27, 2004, 12:29:52 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_3/admin/cat_modify.php
r319 r322 41 41 $query.= ';'; 42 42 $row = mysql_fetch_array( mysql_query( $query ) ); 43 44 $query = 'UPDATE '.PREFIX_TABLE.'categories'; 45 46 $query.= ' SET name = '; 47 if ( $_POST['name'] == '' ) 48 $query.= 'NULL'; 49 else 50 $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'"; 51 52 $query.= ', comment = '; 53 if ( $_POST['comment'] == '' ) 54 $query.= 'NULL'; 55 else 56 $query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'"; 57 58 $query.= ", status = '".$_POST['status']."'"; 59 $query.= ", visible = '".$_POST['visible']."'"; 60 61 if ( isset( $_POST['uploadable'] ) ) 62 $query.= ", uploadable = '".$_POST['uploadable']."'"; 63 64 if ( isset( $_POST['associate'] ) ) 65 { 66 $query.= ', id_uppercat = '; 67 if ( $_POST['associate'] == -1 ) $query.= 'NULL'; 68 else $query.= $_POST['associate']; 69 } 70 $query.= ' WHERE id = '.$_GET['cat']; 71 $query.= ';'; 72 mysql_query( $query ); 43 73 44 74 if ( $_POST['status'] != $row['status'] ) … … 57 87 synchronize_all_users(); 58 88 } 59 60 $query = 'UPDATE '.PREFIX_TABLE.'categories';61 62 $query.= ' SET name = ';63 if ( $_POST['name'] == '' )64 $query.= 'NULL';65 else66 $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'";67 68 $query.= ', comment = ';69 if ( $_POST['comment'] == '' )70 $query.= 'NULL';71 else72 $query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'";73 74 $query.= ", status = '".$_POST['status']."'";75 $query.= ", visible = '".$_POST['visible']."'";76 77 if ( isset( $_POST['uploadable'] ) )78 $query.= ", uploadable = '".$_POST['uploadable']."'";79 80 if ( isset( $_POST['associate'] ) )81 {82 $query.= ', id_uppercat = ';83 if ( $_POST['associate'] == -1 ) $query.= 'NULL';84 else $query.= $_POST['associate'];85 }86 $query.= ' WHERE id = '.$_GET['cat'];87 $query.= ';';88 mysql_query( $query );89 89 90 90 // checking users favorites
Note: See TracChangeset
for help on using the changeset viewer.