Пожалуйста заполняйте регистрационную форму для добавления комментариев :
}
?>
}
function AuthorRegist($regist,$region,$author_surname,$author_name,$author_login,$author_password1,$author_sex,$author_age,$author_educaon,$author_job,$author_occupaon,$author_languages,$author_experience,$author_hobby,$author_add,$author_email,$author_url,$author_icq){
global $bgcolor_dark,$bgcolor_mid,$bgcolor_ligth,$admin;
?>
if($regist=="enter_author"){
//Insert new author without permission
validation_email($author_email);
validation_name($author_surname.$author_name);
validation_username($author_login);
$sql="insert into an_authors VALUES(NULL, '".$author_name." ".$author_surname."', '".$author_email."', '".$author_login."', '".$author_password1."', 0, '".$region."')";
mysql_query($sql);
//Send Blank to Admin
mail($admin, "New Author Registration for ApsnyNews",
"
region=$region
author_surname=$author_surname
author_name=$author_name
author_login=$author_login
author_password1=$author_password1
author_password2=$author_password2
author_sex=$author_sex
author_age=$author_age
author_educaon=$author_educaon
author_job=$author_job
author_occupaon=$author_occupaon
author_languages=$author_languages
author_experience=$author_experience
author_hobby=$author_hobby
author_add=$author_add
author_email=$author_email
author_url=$author_url
author_icq=$author_icq
",
"From: ".$admin."$SERVER_NAME\nReply-To: armenia@express.ru$SERVER_NAME\nX-Mailer: PHP/" . phpversion());
echo "
Спасибо за регистрацию!
";
}
else{
?>
";
}
function AuthorName($author_id){
$sql="select author_id,author_name,author_login from an_authors where author_id='$author_id'";
$result=mysql_query($sql);
$data=mysql_fetch_array($result);
return $data;
}
function DateForm($date){
$b_months["01"]="Января";
$b_months["02"]="Февраля";
$b_months["03"]="Марта";
$b_months["04"]="Апреля";
$b_months["05"]="Мая";
$b_months["06"]="Июня";
$b_months["07"]="Июля";
$b_months["08"]="Августа";
$b_months["09"]="Сентября";
$b_months["10"]="Октября";
$b_months["11"]="Ноября";
$b_months["12"]="Декабря";
$date_array=explode("-",$date);
$month_id=$date_array[1];
$month=$b_months[$month_id];
$df=$date_array[2]." ".$month." ".$date_array[0]."г.";
return $df;
}
function CheckForms($title,$intro,$more){
$error=0;
$statment="";
if(!$title||!$intro||!$more){
if(!$title){
$statment="
Поле \"Заголовок\" не заполен
\n";
$error=1;
}
elseif(!$intro){
$statment="
Поле \"Обзор\" не заполен
\n";
$error=1;
}
elseif(!$more){
$statment="
Поле \"Подробно\" не заполен
\n";
$error=1;
}
return $statment;
}
}
function RegionSelect($cat_id){
return mysql_fetch_array(mysql_query("SELECT code,region FROM regions WHERE code='".$cat_id."'"));
}
function show_visits($id) {
$sql = "select * from an_rates where news_id = '$id'";
$result = mysql_query($sql);
$data = mysql_fetch_array($result);
echo "