Author: rhari
Date: Thu Jun  7 14:21:57 2007
New Revision: 531

URL: http://svn.gna.org/viewcvs/phplinker?rev=531&view=rev
Log:
#248
Bug fix

Modified:
    trunk/www/admin/moderator.php

Modified: trunk/www/admin/moderator.php
URL: 
http://svn.gna.org/viewcvs/phplinker/trunk/www/admin/moderator.php?rev=531&r1=530&r2=531&view=diff
==============================================================================
--- trunk/www/admin/moderator.php (original)
+++ trunk/www/admin/moderator.php Thu Jun  7 14:21:57 2007
@@ -34,14 +34,7 @@
 $setPerPage="";
 $pPage="";
 $order="";
-$tout = "";
 $page_next="";
-$chek ="";
-if(isset($_GET['vrt'])){
-  $vrt = $_GET['vrt'];
- }else{
-  $vrt = "";
- }
 
 if(isset( $_GET['setPerPage'] ) ) {
   $setPerPage = $_GET['setPerPage'];
@@ -53,20 +46,6 @@
   $order = $_GET['order'];
  }else{
   $order = "";
- }
-
-if(isset($_GET['todo'])){
-  $todo = $_GET['todo'];
- }else{
-  $todo = "";
- }
-
-
-
-if(isset($_GET['tout'])){
-  $tout = $_GET['tout'];
- }else{
-  $tout = "";
  }
 
 if(isset($_GET['page_next'])){
@@ -110,20 +89,22 @@
  }
 
 if(isset($_GET['mod']) && $_GET['mod']!="" ){
-if(($action == "update") && isset($action) && isset($_GET['mod']) && 
$_GET['mod']!="Array" && $todo=="Accepter"){
+if(($action == "update") && isset($action) && isset($_GET['mod']) && 
$_GET['mod']!="Array" && $_GET["todo"]=="Accepter"){
 foreach($_GET['mod'] as $value){
    $update = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"UPDATE url SET 
state = 'moderated' WHERE url.id=".$value);
  }
 $sms = "ok";
  }
-if(($action == "update") && isset($action) && isset($_GET['mod']) && 
$_GET['mod']!="Array" &&  $todo=="Refuser"){
+if(($action == "update") && isset($action) && isset($_GET['mod']) && 
$_GET['mod']!="Array" &&  $_GET["todo"]=="Refuser"){
 foreach($_GET['mod'] as $value){
    $qry_get_idwebmaster = "SELECT id_webmaster FROM url WHERE url.id = 
".$value;
    $qry_get_idwebmaster = 
sql_query('die',__FILE__,__LINE__,__FUNCTION__,$qry_get_idwebmaster);
    $id_webmaster = mysql_result($qry_get_idwebmaster, 0, "id_webmaster");
    $update = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"DELETE FROM url 
WHERE url.id=".$value);
    $update2 = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"DELETE FROM 
url2category WHERE id_url=".$value);
-   $update3 = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"DELETE FROM 
webmaster WHERE id = ".$id_webmaster);
+   $update3 = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"SELECT count(*) 
as nburl FROM url WHERE id_webmaster = ".$id_webmaster);
+   if (mysql_result ($update3, 0, "nburl") < 1)
+     $update3 = sql_query('die',__FILE__,__LINE__,__FUNCTION__,"DELETE FROM 
webmaster WHERE id = ".$id_webmaster);
  }
 $sms = "ok";
  }
@@ -194,17 +175,9 @@
           }else{
             $visible="NON";
           }
-          if($tout == "cocher"){
-            $chek = "checked";
-          }
-
-          if($vrt == "Tout decocher"){
-            $chek = "";
-            $tout ="";
-          }
           $myData[] = "
        $tr
-    <td colspan=\"2\"><span><input type='checkbox' name='mod[]' value='$id' 
$chek ></span></td>
+    <td colspan=\"2\"><span><input type='checkbox' name='mod[]' 
value='$id'></span></td>
     <td colspan=\"2\"><span><a href=\"$url\" 
target=\"blank\">$url</a></span></td>
     <td colspan=\"2\"><span>$login</span></td>
     <td colspan=\"2\"><span>$court</span></td>
@@ -224,7 +197,7 @@
      }
      $result_for_all = "";
    }else{
-   $result_for_all = "Aucun site en attente de mod&eacute;ration";
+   $result_for_all = "Pas de resultat pour cette requette";
    }
 
  $params = array(
@@ -270,7 +243,5 @@
    linker_tpl("pPage" , $pPage);
    linker_tpl("link_url" , $link_url);
    linker_tpl("link_date" , $link_date);
-   linker_tpl("tout" , $tout);
- linker_tpl("chek" , $chek);
 require("includes/footer.php");
 ?>


_______________________________________________
PHPLinker-commits mailing list
[email protected]
https://mail.gna.org/listinfo/phplinker-commits

Reply via email to