コード例 #1
0
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] &nbsp; <a href=\"javascript:report($id,$data[id]);\"><font color='red'>ΚΘανΫ</font></a>";
          if(check_login_cookies()){
          print " &nbsp;[<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();
          }
  }
}
コード例 #2
0
ファイル: admin.php プロジェクト: allomani/store100_plugins

if($action=="clients_items" || $action=="clients_items_activate"){
 if_admin();
 
if($action=="clients_items_activate"){
    $id=intval($id);
    db_query("update store_products_data set active=1 where id='$id'");
}
    
    print "<p align=center class=title> гск ЪфЪйб ЧсуцЧноЩ </p>";
    $qr=db_query("select * from store_products_data where active=0 and userid !=0 order by id");
    if(db_num($qr)){
        print "<table width=100% class=grid>";
        while($data=db_fetch($qr)){
            $data_client = db_qr_fetch("select ".members_fields_replace('username')." from ".members_table_replace('store_clients')." where id='$data[userid]'",MEMBER_SQL);
        print "<tr><td><a href='index.php?action=client_edit&id=$data[userid]'>$data_client[username]</a></td>
               <td>$data[name]</td>
               
               <td>";
unset($dir_content);    
$dir_data['cat'] = $data['cat'] ;
while($dir_data['cat']!=0){
   $dir_data = db_qr_fetch("select name,id,cat from store_products_cats where id='$dir_data[cat]'");

 $dir_content = "$dir_data[name] / ". $dir_content  ;
}

               print "$dir_content</td>
               <td>
               <a href='index.php?action=clients_items_activate&id=$data[id]'> Ънкэс </a>
コード例 #3
0
ファイル: index.php プロジェクト: allomani/store100_plugins
                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 " &nbsp;[<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>";
                  }
          close_table();
          }

   //------------ send comment ---------------

   open_table("«—”«б  Џбнё");