function print_comments_table($fileid){ global $phrases,$member_data,$id,$content,$op_comment,$sec_img,$sec_string,$settings,$admin_path; if($settings['files_comments_enable']){ //-------- send comment command --------- if($op_comment=="send_comment"){ if(check_member_login()){ if($sec_img->verify_string($sec_string)){ $content = htmlspecialchars($content); $memberid = $member_data['id'] ; db_query("insert into mobile_files_comments (memberid,content,fileid,date) values('$memberid','$content','$id',now())"); open_table(); print "<center>$phrases[your_comment_sent_successfully]</center>"; close_table(); $content=""; }else{ open_table(); print "<center>$phrases[err_sec_code_not_valid]</center>"; close_table(); } }else{ open_table(); print "<center> $phrases[please_login_first] </center>"; close_table(); } } $qr = db_query("select * from mobile_files_comments where fileid='$fileid'"); if(db_num($qr)){ open_table("$phrases[the_comments]"); print "<hr size=1 class=separate_line>"; while($data = db_fetch($qr)){ $dx = db_qr_fetch("select ".members_fields_replace('username').",".members_fields_replace('email')." from ".members_table_replace('mobile_members')." where ".members_fields_replace('id')."='$data[memberid]'",MEMBER_SQL); print "<table width=100% border=0><tr><td width=50%><b>$dx[username]</b></td><td align=left>$data[date]</td></tr>"; print "<tr><td colspan=2>$data[content] <a href=\"javascript:report($id,$data[id]);\"><font color='red'>ΚΘανΫ</font></a>"; if(check_login_cookies()){ print " [<a href='".iif($admin_path,$admin_path,"admin")."/index.php?action=comment_del&id=$data[id]&cat=$id'>$phrases[delete]</a>]"; } print "<br><hr size=1 class=separate_line></td></tr></table>"; } close_table(); } } }
$m_perpage = $limit ; $page_string = "index.php?action=guestbook"; while($data = db_fetch($qr)){ open_table(); print "<table > <tr><td colspan=2>$data[date]</td></tr> <tr><td><b>�����:</b></td><td> $data[name]</td></tr> <tr><td><b>������� :</b></td><td> $data[msg]</td> </tr>"; check_login_cookies(); if(if_admin("guestbook",1)){ print "<tr><td><a href='admin/index.php?action=guestbook_edit&id=$data[id]&redirect=1'> ����� </a> - <a href='".iif($admin_dir,$admin_dir,"admin")."/index.php?action=guestbook_del&id=$data[id]&redirect=1'>���</a></td></tr>"; } print "</table>"; close_table(); } //-------------------- pages system ------------------------ if ($numrows>$m_perpage){
close_table(); $name = ""; $email = ""; $content = ""; } else { open_table(); print "<center>Invalid verification code </center>"; close_table(); } } //-------------- Comments -------------------- $qr = db_query("select * from comments_data where news_id ='" . $id . "' and active=1"); if (db_num($qr)) { open_table("Comments"); print "<hr size=1 class=separate_line>"; if (check_login_cookies() && if_admin("comments")) { $comments_admin = true; } else { $comments_admin = false; } while ($data = db_fetch($qr)) { print "<table width=100% border=0><tr><td width=50%><b><a href='mailto:{$data['email']}'>{$data['name']}</a></b><td align=left>{$data['date']}</td></tr>"; print "<tr><td colspan=2>{$data['content']}"; if ($comments_admin) { print " [<a href='" . iif($admin_folder, $admin_folder, "admin") . "/index.php?action=comment_edit&id={$data['id']}&news_id={$id}'>Edit</a> - <a href='" . iif($admin_folder, $admin_folder, "admin") . "/index.php?action=comment_del&id={$data['id']}&news_id={$id}'>Delete</a>]"; } print "<br><hr size=1 class=separate_line></td></tr></table>"; } close_table(); } //------------ send comment ---------------
<? if(!check_login_cookies()){die("<center> $phrases[access_denied] </center>");} //-------------- main --------------- if(!$action){ if($dedications_admin_review){ $count = db_qr_fetch("select count(*) as count from songs_dedications where active=0"); print "<br>"; print_admin_table("<b>ÇåÏÇÆÇÊ ÊäÊÙÑ ÇáãæÇÝÞÉ : </b> <a href='index.php?action=dedications'>".intval($count['count'])." </a>"); } } //-------------------------- Dedications --------------------- if($action=="dedications" || $action=="dedications_del" || $action=="dedications_edit_ok" || $action=="dedications_enable" || $action=="dedications_disable"){ if_admin("dedications"); print "<p align=center class=title> ÇáÅåÏÇÆÇÊ </p>" ; //-------------- del -------------------- if($action=="dedications_del"){ if(!is_array($d_id)){$d_id=array($id);} foreach($d_id as $del_id){ db_query("delete from songs_dedications where id='$del_id'"); } } //---------- edit ------------------- if($action=="dedications_edit_ok"){
print "<center> ќЎ√ Ён яжѕ «б Ќёё </center>" ; close_table(); } }else{ open_table(); print "<center> н—ћм ”ћнб «бѕќжб «жб« </center>"; close_table(); } } //-------------- Comments -------------------- $qr = db_query("select * from store_products_comments where cat ='$id' and active=1"); if(db_num($qr)){ $is_admin = check_login_cookies() && if_admin("products_comments",1) ; open_table("«б Џбнё« "); print "<hr size=1 class=separate_line>"; while($data = db_fetch($qr)){ $dx = db_qr_fetch("select * from ".members_table_replace('store_clients')." where ".members_fields_replace('id')."='$data[userid]'",MEMBER_SQL); print "<table width=100% border=0><tr><td width=50%><b>$dx[username]</b><td align=left>$data[date]</td></tr>"; print "<tr><td colspan=2>$data[content]"; if($is_admin){ print " [<a href='".iif($admin_folder,$admin_folder,"admin")."/index.php?action=products_comment_del&id=$data[id]&cat=$id'>Ќ–Ё</a>]"; } print "<br><hr size=1 class=separate_line></td></tr></table>"; }