Rar! ϐs
et { YYLu@0V 襬 ਨ 襩 CMS\index.php ܀H ՁC;L5 B0s@ MO H ̈́
// ()
$nameDB = "blog";//
$nameSERVER = "localhost";//
$nameUSER = "root";//
$passUSER = "";//
mysql_select_db($nameDB, mysql_connect($nameSERVER,$nameUSER,$passUSER));
// ()
//
$header_title = " HTML";
$header_metaD = " ";
$header_metaK = " ";
if($_GET['blog'])$blog = $_GET['blog'];//, GET ,
// $blog
//
if(!$blog)//, $blog, news.php
{
include("moduls/news.php");
$txt = index_page();// ,
//
}
// C
if($blog)
{
include("moduls/text.php");
$txt = blog($blog);// ,
}
// C
//
include("moduls/menu.php");
$menu = menu();// ,
//
//
if($blog)
{
include("moduls/comm.php");
$comm = comm($blog);//
$txt .= $comm;
}
//
include("templates/index.html");//
?>Mt u}@0\ 襬 ਨ 襩 CMS\moduls\comm.php ܀H ՁC;L5 B0s@ MO H BS(
//--------------
$date_day = date("d");//
$date_month = date("m");//
$date_year = date("Y");//
$date_time = date("H:i");//
$date_comm = $date_day."/".$date_month."/".$date_year." ".$date_time;//
// // :
//
if(isset($_POST['id_comm']))$id_comm = $_POST['id_comm'];
if(isset($_POST['txt_comm']))$txt_comm = $_POST['txt_comm'];
if(isset($_POST['author_comm']))$author_comm = $_POST['author_comm'];
if($id_comm & $txt_comm & $author_comm)//
{
// html ( ) =)
// , ,
$id_comm = htmlspecialchars($id_comm);
$txt_comm = htmlspecialchars($txt_comm);
$author_comm = htmlspecialchars($author_comm);
//
$id_comm = str_replace("'","'",$id_comm);
$txt_comm = str_replace("'","'",$txt_comm);
$author_comm = str_replace("'","'",$author_comm);
$txt_comm = str_replace("\n","
",$txt_comm);//
//
$result_add_comm = mysql_query ("INSERT INTO comm (author,text,date_comm,blog)
VALUES ('$author_comm','$txt_comm','$date_comm','$id_comm')");
header("location: index.php?blog=$blog");//
exit;//
}
//--------------
function comm($blog)
{
$result_index = mysql_query("SELECT * FROM comm WHERE blog='$blog' ORDER BY id DESC");// blog ID
$myrow_index = mysql_fetch_array($result_index);
if($myrow_index != "")//
{// ...
$sm_read = file("templates/comm.html");//...
$sm_read = implode("",$sm_read);// file() ,
do// do while
{
$edd_tamp = $sm_read;// ,
// ,
// file() 1 ,
//
$edd_tamp = str_replace("[_text]",$myrow_index[text],$edd_tamp);//
$edd_tamp = str_replace("[_author]",$myrow_index[author],$edd_tamp);//
$edd_tamp = str_replace("[_date_b]",$myrow_index[date_comm],$edd_tamp);//
$comm .= $edd_tamp;//
}
while($myrow_index = mysql_fetch_array($result_index));
}
else $comm = "
, =)
";// , $form = file("templates/comm_form.html");// $form = implode("",$form);// file() , $form = str_replace("[_id]",$blog,$form);// id $comm .= $form; return $comm;// html } ?>It v v X'vU@0` 襬 ਨ 襩 CMS\templates\comm.html ܀H ՁC;L5 B0s@ MO H 1[_text]
tx @0S 襬 ਨ 襩 CMS\moduls ܀H ՁC;L5 B0s@ MO H 47it{ @0V 襬 ਨ 襩 CMS\templates ܀H ՁC;L5 B0s@ MO H yNUtq @0L 襬 ਨ 襩 CMS ܀H ՁC;L5 B0s@ MO H ={ @