Rar! ϐs t ;w@0^ 稬 । bb \admin\moduls\allcontent.php \#G рH @ՂB>@? `܁K g // // , 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) { // html $edd_name_post = htmlspecialchars($edd_name_post); $edd_txt_post = htmlspecialchars($edd_txt_post); $edd_author_post = htmlspecialchars($edd_author_post); // html // bb //---------------------[b][/b] preg_match_all("/\[b\](.*?)\[\/b\]/",$edd_txt_post,$txt_bb);// $txt_bb [b] [/b] // bb html for($i=0;isset($txt_bb[1][$i]);$i++) $edd_txt_post = preg_replace("/\[b\].*?\[\/b\]/s","".$txt_bb[1][$i]."",$edd_txt_post,1); //---------------------[b][/b] //---------------------[img] preg_match_all("/\[img url='(.*?)' pos='(.*?)'\]/s",$edd_txt_post,$txt_bb);// $txt_bb for($i=0;isset($txt_bb[1][$i]);$i++) { if($txt_bb[2][$i] != "")// { // , , if($txt_bb[2][$i] == "l")$align_img = " align=\"left\""; if($txt_bb[2][$i] == "r")$align_img = " align=\"right\""; if($txt_bb[2][$i] == "c")$align_img = " align=\"center\""; } else $align_img = "";// , // bb html $edd_txt_post = preg_replace("/\[img url='.*?' pos='.*?'\]/s","",$edd_txt_post,1); } //---------------------[img] //---------------------[a][/a] // bb html preg_match_all("/\[a url='(.*?)'\](.*?)\[\/a\]/s",$edd_txt_post,$txt_bb);// $txt_bb for($i=0;isset($txt_bb[1][$i]);$i++) $edd_txt_post = preg_replace("/\[a url='.*?'\].*?\[\/a\]/s","".$txt_bb[2][$i]."",$edd_txt_post,1); //---------------------[a][/a] // bb // $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_txt_post = str_replace("\n","",$edd_txt_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 FROM blog ORDER BY id DESC");// $myrow_index = mysql_fetch_array($result_index); do { $copy_tamp = $tamp_while[1];// // - $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 $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() , $text_post = str_replace("","",$myrow_index[text]);// br // html bb //[b][/b] $text_post = str_replace("","[b]",$text_post);// [b] $text_post = str_replace("","[/b]",$text_post);// [/b] //[b][/b] //[a url=''][/a] preg_match_all("/(.*?)<\/a>/",$text_post,$a_link);// for($al=0;isset($a_link[1][$al]);$al++)// ... $text_post = preg_replace("/.*?<\/a>/","[a url='".$a_link[1][$al]."']".$a_link[2][$al]."[/a]",$text_post,1);//.. [a][/a] //[a url=''][/a] //[img url=''] preg_match_all("/()/s",$text_post,$all_img);// for($il=0;isset($all_img[1][$il]);$il++) { if(preg_match("/align=\".*?\"/s",$all_img[1][$il]))// align {// preg_match("/align=\"(.*?)\"/s",$all_img[1][$il],$pos_img);// if($pos_img[1] == "left")$txt_position = "l";// if($pos_img[1] == "center")$txt_position = "c";// if($pos_img[1] == "right")$txt_position = "r";// } else $txt_position = "";// align preg_match("/src=\"(.*?)\"/s",$all_img[1][$il],$img_link);// $text_post = preg_replace("//s","[img url='".$img_link[1]."' pos='".$txt_position."']",$text_post,1);// [img] } //[img url=''] // html bb // - $sm_read = str_replace("[_title]",$myrow_index[title],$sm_read);// $sm_read = str_replace("[_text]",$text_post,$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 } ?>zt Z Z _k@0b 稬 । bb \admin\templates\eddcontent.html \#G рH @ՂB>@? `܁K ,Q [b][/b] [a][/a] [img] [end] [_text] left center right fktt Ǖ@0O 稬 । bb \admin\moduls \#G рH @ՂB>@? `܁K Rtw ˕@0R 稬 । bb \admin\templates \#G рH @ՂB>@? `܁K )x=tm @0H 稬 । bb \admin \#G рH @ՂB>@? `܁K 4Mtf =@0A 稬 । bb \#G рH @ՂB>@? `ЁK I%={ @