예제 #1
0
	// for after iserror edit
	$categorydata = array(
		'cid' => $edit_id ,
		'pid' => $pid ,
		'title' => $requests_text['title4edit'] ,
		'imgurl' => $requests_text['imgurl4edit'] ,
		'description' => $requests_text['description4edit'] ,
		'shotsdir' => $requests_text['shotsdir4edit'] ,
		'cat_weight' =>  $requests_int['cat_weight'] ,
		'submit_message' => $requests_text['submit_message4edit'] ,
		'old_pid' =>  $old_pid ,
	) ;

	if( empty( $iserror ) ){
		if ( ! empty( $edit_id ) && ( $pid != $old_pid ) ) $category_edit->pid_select_check( $edit_id, $pid, $old_pid, 1 ) ;

		include_once dirname( dirname(__FILE__) ).'/class/db_download.php' ;
		$post_cat = new db_download( $db->prefix( $mydirname."_cat" ) , "cid", $edit_id ) ;

		// SET4SQL
		$set4sql_int = $requests_int['set4sql'] ;
		$set4sql_text = $requests_text['set4sql'] ;
		$set4sql = $set4sql_int . $set4sql_text ;

		// MAKE LINK SQL
		if( empty( $edit_id ) ) {
			$new_cid = $post_cat->db_insert( $set4sql );
			if( empty( $new_cid ) ){
				redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=categorymanager" , 2 , _MD_D3DOWNLOADS_ERROR_MESSEAGE_NOID ) ;
				exit();