Rar! ϐs ftt ~ O O Rv;@0Y ⠭ 㠫쭮 ।\admin\moduls\addcontent.php |#` ݁CLǂ @UB>@0 // , if($_POST['name_post'])$name_post = $_POST['name_post']; if($_POST['txt_post'])$txt_post = $_POST['txt_post']; if($_POST['author_post'])$author_post = $_POST['author_post']; if($_POST['menu_post'])$menu_post = $_POST['menu_post']; // , if($name_post & $txt_post & $author_post) { $date_day = date("d");// $date_month = date("m");// $date_year = date("Y");// $date_time = date("H:i");// $date_cont = $date_day."/".$date_month."/".$date_year." ".$date_time;// // // : // $name_post = str_replace("'","'",$name_post); $txt_post = str_replace("'","'",$txt_post); $author_post = str_replace("'","'",$author_post); // $result_add_cont = mysql_query ("INSERT INTO blog (text,title,author,date_b,cat) VALUES ('$txt_post','$name_post','$author_post','$date_cont','$menu_post')"); // header("location: index.php");// exit;// } function addcontent() { $sm_read = file("templates/addcontent.html");//... $sm_read = implode("",$sm_read);// file() , $allmenu = mysql_query("SELECT id,name FROM menu WHERE href=''");// href $menu = mysql_fetch_array($allmenu); if($menu != "")// { do// { $option .= "\n"; } while($menu = mysql_fetch_array($allmenu)); } else $option = "";// $sm_read = str_replace("[_option]",$option,$sm_read);// return $sm_read;// html } ?>t ~ :ē;@0Y ⠭ 㠫쭮 ।\admin\moduls\allcontent.php |#` ݁CLǂ @UB>@0 G // if(isset($_POST['edd_form_cat']))$edd_form_cat = $_POST['edd_form_cat'];//, " " if(isset($edd_form_cat))// { $new_cat = mysql_query ("UPDATE blog SET cat='$edd_form_cat' WHERE id='$id'");// cat header("location: index.php?page=all_content");// exit; } // // if($_GET['del_post'])$del_post = $_GET['del_post'];// ID if($del_post)// ... { $result_del_post = mysql_query ("DELETE FROM blog WHERE id='$del_post'");//... header("location: ?page=all_content");// exit; } // // // , if($_POST['edd_name_post'])$edd_name_post = $_POST['edd_name_post']; if($_POST['edd_txt_post'])$edd_txt_post = $_POST['edd_txt_post']; if($_POST['edd_author_post'])$edd_author_post = $_POST['edd_author_post']; if($_POST['edd_id_post'])$edd_id_post = $_POST['edd_id_post']; // , if($edd_name_post & $edd_txt_post & $edd_author_post) { // $edd_name_post = str_replace("'","'",$edd_name_post); $edd_txt_post = str_replace("'","'",$edd_txt_post); $edd_author_post = str_replace("'","'",$edd_author_post); // $edd_blog = mysql_query ("UPDATE blog SET text='$edd_txt_post',title='$edd_name_post',author='$edd_author_post' WHERE id='$edd_id_post'"); // header("location: index.php?page=all_content");// exit;// } // function allcontent()// { $sm_read = file("templates/allcontent.html");//... $sm_read = implode("",$sm_read);// file() , preg_match("/\[_while\](.*?)\[_while\]/s",$sm_read,$tamp_while);// , $result_index = mysql_query("SELECT id,author,title,cat FROM blog ORDER BY id DESC");// $myrow_index = mysql_fetch_array($result_index); do { $copy_tamp = $tamp_while[1];// if($myrow_index[cat] != 0) { $result_cat = mysql_query("SELECT name FROM menu WHERE id='$myrow_index[cat]'");// $myrow_cat = mysql_fetch_array($result_cat); $name_cat = $myrow_cat[name]; } else $name_cat = " "; // - $copy_tamp = str_replace("[_title]",$myrow_index[title],$copy_tamp);// $copy_tamp = str_replace("[_author]",$myrow_index[author],$copy_tamp);// $copy_tamp = str_replace("[_id]",$myrow_index[id],$copy_tamp);//ID $copy_tamp = str_replace("[_cat]",$name_cat,$copy_tamp);// $list .= $copy_tamp;// } while($myrow_index = mysql_fetch_array($result_index)); $sm_read = preg_replace("/\[_while\].*?\[_while\]/s",$list,$sm_read);// return $sm_read;// html } //-------------------------------------------------------------- function eddcontent($id)// { $result_index = mysql_query("SELECT * FROM blog WHERE id='$id'");// $myrow_index = mysql_fetch_array($result_index); $sm_read = file("templates/eddcontent.html");//... $sm_read = implode("",$sm_read);// file() , // - $sm_read = str_replace("[_title]",$myrow_index[title],$sm_read);// $sm_read = str_replace("[_text]",$myrow_index[text],$sm_read);// $sm_read = str_replace("[_author]",$myrow_index[author],$sm_read);// $sm_read = str_replace("[_id]",$myrow_index[id],$sm_read);//ID return $sm_read;// html } //--------------------------------------------------------------------------- function eddcat($id)// { $sm_read = file("templates/eddcat.html");//... $sm_read = implode("",$sm_read);// file() , $allmenu = mysql_query("SELECT id,name FROM menu WHERE href=''");// href $menu = mysql_fetch_array($allmenu); if($menu != "")// { do// { $option .= "\n"; } while($menu = mysql_fetch_array($allmenu)); } else $option = "";// $sm_read = str_replace("[_id]",$id,$sm_read);//ID $sm_read = str_replace("[_option]",$option,$sm_read);// return $sm_read;// html } ?>pt n n b;@0] ⠭ 㠫쭮 ।\admin\templates\addcontent.html |#` ݁CLǂ @UB>@0 غ
=$txt?> |