Changeset 825 for trunk/admin/cat_modify.php
- Timestamp:
- Aug 18, 2005, 7:59:00 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r809 r825 40 40 41 41 //--------------------------------------------------------- form criteria check 42 if ( isset( $_POST['submit'] ) ) 43 { 44 $query = 'UPDATE '.CATEGORIES_TABLE; 45 $query.= ' SET name = '; 46 if ( empty($_POST['name'])) 47 $query.= 'NULL'; 48 else 49 $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'"; 50 51 $query.= ', comment = '; 52 if ( empty($_POST['comment'])) 53 $query.= 'NULL'; 54 else 55 $query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'"; 56 57 if ( isset( $_POST['uploadable'] ) ) 58 $query.= ", uploadable = '".$_POST['uploadable']."'"; 59 60 if ( isset( $_POST['commentable'] ) ) 61 $query.= ", commentable = '".$_POST['commentable']."'"; 62 63 if ( isset( $_POST['associate'] ) ) 64 { 65 $query.= ', id_uppercat = '; 66 if ( $_POST['associate'] == -1 or $_POST['associate'] == '' ) 67 $query.= 'NULL'; 68 else 69 $query.= $_POST['associate']; 70 } 71 $query.= ' WHERE id = '.$_GET['cat_id']; 72 $query.= ';'; 73 pwg_query( $query ); 74 42 if (isset($_POST['submit'])) 43 { 44 $data = 45 array( 46 'id' => $_GET['cat_id'], 47 'name' => @$_POST['name'], 48 'commentable' => $_POST['commentable'], 49 'uploadable' => 50 isset($_POST['uploadable']) ? $_POST['uploadable'] : 'false', 51 'comment' => 52 $conf['allow_html_descriptions'] ? 53 @$_POST['comment'] : strip_tags(@$_POST['comment']) 54 ); 55 56 mass_updates( 57 CATEGORIES_TABLE, 58 array( 59 'primary' => array('id'), 60 'update' => array_diff(array_keys($data), array('id')) 61 ), 62 array($data) 63 ); 64 75 65 set_cat_visible(array($_GET['cat_id']), $_POST['visible']); 76 66 set_cat_status(array($_GET['cat_id']), $_POST['status']);
Note: See TracChangeset
for help on using the changeset viewer.