.=< { Star Gans Tq } >=.

  • Home

  • Killme
  • Download
  • Current Path : /home/m/e/h/meharicl/www/recensement2/
    Upload File
    @Command ~ $  
    Current File : /home/m/e/h/meharicl/www/recensement2/recensement_pseudo_forum_events.php

    <?php
    //BindEvents Method @1-9385C016
    function BindEvents()
    {
        global $grdForumUsers;
        $grdForumUsers->CCSEvents["BeforeShowRow"] = "grdForumUsers_BeforeShowRow";
    }
    //End BindEvents Method
    
    //DEL  // -------------------------
    //DEL      // Write your own code here.
    //DEL  	$grdForumUsers->username->SetValue(utf8_decode($grdForumUsers->username->GetValue()));
    //DEL  // -------------------------
    
    //DEL  // -------------------------
    //DEL      // Write your own code here.
    //DEL  	$str = "";
    //DEL  	$i = 0;
    //DEL  
    //DEL  	$db = new clsDBcnxRecensement();
    //DEL    	$SQL = "SELECT r.id, r.mehari_id, r.recensement_qui, r.recensement_adherent, r.mehari_pseudo_forum, r.mehari_pseudo_ok ";
    //DEL  	$SQL .= "FROM rec_mehari r ";
    //DEL  	$SQL .= "WHERE (r.recensement_qui like '%".utf8_decode($grdForumUsers->ds->f("username"))."%' ";
    //DEL  	$SQL .= "OR r.recensement_adherent like '%".utf8_decode($grdForumUsers->ds->f("username"))."%' ";
    //DEL  	$SQL .= "OR r.mehari_pseudo_forum like '%".utf8_decode($grdForumUsers->ds->f("username"))."%') ";
    //DEL  	//$SQL .= "AND mehari_pseudo_ok <> 1"
    //DEL  
    //DEL  	//echo "SQL : ".$SQL."<br>";
    //DEL   	
    //DEL  	$result = mysql_query($SQL);
    //DEL   	while ($row = mysql_fetch_assoc($result)) {
    //DEL  		$i++;
    //DEL  		if ($i>1)
    //DEL  			$str .= "<br>";
    //DEL  	   	$str .= "- ".$row['id']."";
    //DEL      	$str .= " / mehari_id : ".$row['mehari_id']."";    
    //DEL      	$str .= " / qui : <b>".$row['recensement_qui']."</b>";    
    //DEL      	$str .= " / adherent : ".$row['recensement_adherent']."";    
    //DEL      	$str .= " / pseudo : ".$row['mehari_pseudo_forum']."";
    //DEL  		if ($row['mehari_pseudo_ok'] == 1)
    //DEL  			$str .= "<font color=red><b>  OK</b></font>";
    //DEL  		else
    //DEL  			$str .= " : <a href=\"recensement_pseudo.php?lettre=".CCGETParam("lettre", "")."&id=".$row['id']."&pseudo=".utf8_decode($grdForumUsers->ds->f("username"))."\">--> OK</a>";
    //DEL  		
    //DEL  	}
    //DEL  
    //DEL  	$grdForumUsers->lblPseudo->SetValue($str);      
    //DEL    	$db->close();
    //DEL  	//	$str .= utf8_decode($grdForumUsers->ds->f("username"))."\n";
    //DEL  
    //DEL  	//foreach(mb_list_encodings() as $chr){ 
    //DEL      //    $str .= mb_convert_encoding($grdForumUsers->ds->f("username"), 'UTF-8', $chr)." : ".$chr."\n";    
    //DEL   	//}
    //DEL  	//		$grdForumUsers->lblPseudo->SetValue($str);      
    //DEL   
    //DEL  // -------------------------
    
    //grdForumUsers_BeforeShowRow @3-E2B4DDD6
    function grdForumUsers_BeforeShowRow(& $sender)
    {
        $grdForumUsers_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdForumUsers; //Compatibility
    //End grdForumUsers_BeforeShowRow
    
    //Custom Code @15-2A29BDB7
    // -------------------------
        // Write your own code here.
    	if ($grdForumUsers->ds->f("mehari_pseudo_ok") == 1)
    	{
    		$grdForumUsers->pseudo_ok->SetValue("OK");
    		$grdForumUsers->lblCssPseudoOk->SetValue("pseudo_ok");
    	}
    	else
    	{
    		$grdForumUsers->pseudo_ok->SetValue("not OK");
    		$grdForumUsers->lblCssPseudoOk->SetValue("");
    	}
    
    	$db = new clsDBcnxRecensement();
        $SQL = "SELECT username";
    	$SQL .= " FROM phpbb3_users p";
    	$SQL .= " WHERE username = '".$grdForumUsers->ds->f("mehari_pseudo_forum")."'";
    
    	//echo "SQL : ".$SQL."<br>";
       	
      	$result = mysql_query($SQL);
       	while ($row = mysql_fetch_assoc($result)) {
    		$str = $row['username'];
      	}
      
      	$grdForumUsers->username->SetValue($str);      
    	$db->close();
    
    // -------------------------
    //End Custom Code
    
    //Close grdForumUsers_BeforeShowRow @3-7399618B
        return $grdForumUsers_BeforeShowRow;
    }
    //End Close grdForumUsers_BeforeShowRow
    //DEL  // -------------------------
    //DEL      // Write your own code here.
    //DEL  	$db = new clsDBcnxRecensement();
    //DEL  
    //DEL  	if (CCGETParam("pseudo", "") <> "" and CCGETParam("id", "") <> "")
    //DEL  	{
    //DEL  		$db = new clsDBcnxRecensement();
    //DEL  
    //DEL    		$SQL = "UPDATE rec_mehari SET mehari_pseudo_forum = '".CCGETParam("pseudo", "")."', mehari_pseudo_ok = 1 ";
    //DEL  		$SQL .= "WHERE id = ".CCGETParam("id", "");
    //DEL  		//echo "SQL : ".$SQL."<br>";
    //DEL  
    //DEL  		$db->query($SQL);
    //DEL  		$db->close();
    //DEL  	}
    //DEL  // -------------------------
    
    ?>