does this look ok?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    does this look ok?

    just started usin wapdesire script, its workin alright does it look ok?
    Code:
    <?php
    define('WCS',true);
    include('./core/main.inc');
    header_type();
    cleardata();
    if(ipbanned(ip(),browser())){
    if(!shield(getuid_sid($sid))){
    echo head_tag("Ip Blocked!!!",0,0);
    echo ipbanned_msg();
    echo foot_tag();
    exit();
    }
    }
    if(!islogged($sid)){
    echo head_tag("Error!!!",0,0);
    echo session_expired();
    echo foot_tag();
    exit();
    }
    if(banned(getuid_sid($sid))){
    echo head_tag("Error!!!",1,getnick_sid($sid));
    echo banned_msg($sid);
    echo foot_tag();
    exit();
    }
    mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
    
    //////////////////////Dating Cards/////////////////////////
    if($action=="main")
    {
    addonline(getuid_sid($sid)," In The Love Zone",""); 
    echo head_tag(getnick_sid($sid)."@dating cards",1,getnick_sid($sid)); 
    $title="<b>The Love Zone</b>"; 
    $main.="<p align=".align().">\n"; 	
    $result=mysql_query("select * from dating where cat='m4f'");
    $mf = mysql_num_rows($result);
    
    $result=mysql_query("select * from dating where cat='f4m'");
    $fm = mysql_num_rows($result);
    
    $result=mysql_query("select * from dating where cat='m4m'");
    $mm = mysql_num_rows($result);
    
    $result=mysql_query("select * from dating where cat='f4f'");
    $ff = mysql_num_rows($result);
    
    $main.="<u><b>$sitename-Dating</b></u><br/>
    <img src=\"images/dating.gif\" alt=\"\"/><a title=\"Enter\" href=\"dating.php?action=datingview&amp;cat=m4f&amp;sid=$sid\">Guys for Girls</a>($mf)<br/>
    <img src=\"images/dating.gif\" alt=\"\"/><a title=\"Enter\" href=\"dating.php?action=datingview&amp;cat=f4m&amp;sid=$sid\">Girls for Guys</a>($fm)<br/>
    <img src=\"images/dating.gif\" alt=\"\"/><a title=\"Enter\" href=\"dating.php?action=datingview&amp;cat=m4m&amp;sid=$sid\">Guys for Guys</a>($mm)<br/>
    <img src=\"images/dating.gif\" alt=\"\"/><a title=\"Enter\" href=\"dating.php?action=datingview&amp;cat=f4f&amp;sid=$sid\">Girls for Girls</a>($ff)<br/>
    <br/><a title=\"Enter\" href=\"dating.php?action=add&amp;sid=$sid\">Add My Card</a><br/>\n";
    
    ////////UNTIL HERE//////////
     
    $main.="<p align=".align()."><a href=\"online.php?sid=$sid\">Online menu</a>|
    <a href=\"extras.php?sid=$sid\">Extras</a>|
    <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
    <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
    <a href=\"../chat/public.php?sid=$sid\">Chat</a>|
    <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
    <a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
    echo foot_tag();
    exit;
    }
    else if($action=="datingview")
    {
    addonline(getuid_sid($sid)," In The Love Zone",""); 
    echo head_tag(getnick_sid($sid)."@dating cards",1,getnick_sid($sid)); 
    $title="<b>The Love Zone</b>"; 
    $main.="<p align=".align().">\n";
    $cat=$_GET["cat"];
    $page=$_GET["page"];
    if($page=="")
    	{
    	$page=1;
    	}
    $max_results = 7; 
    $from = (($page * $max_results) - $max_results);  
    echo "<p>";
    $total_results = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM dating WHERE cat='$cat'")); 
    if($total_results[0]<1)
    {
    $main.="No Profiles To Show Yet<br/>\n";
    }else{
    $total_pages = ceil($total_results[0] / $max_results);
     
    $main.="$page Of $total_pages<br/><br/>\n";
    
    $sql = mysql_query("SELECT * FROM dating WHERE cat='$cat'  ORDER BY id desc LIMIT $from, $max_results"); 
    while($row = mysql_fetch_array($sql)){ 
    $name = $row['uid'];
    $key = $row['id'];
    $sqlthing = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='$name'"));
    $uname=$sqlthing["username"];
    $sqlthing2 = mysql_fetch_array(mysql_query("SELECT * FROM profiles WHERE uid='$name'"));
    $age=getage($sqlthing2["birthday"]);
    $main.="<a href=\"dating.php?action=card&amp;cat=$cat&amp;key=$key&amp;sid=$sid\">~$uname(Age: $age)~</a><br/>\n";
    
    }
    if($page < $total_pages){ 
    $next = ($page + 1);
    $main.="<a href=\"dating.php?action=datingview&amp;page=$next&amp;cat=$cat&amp;sid=$sid\"><small>Next</small></a><br />\n";
    } 
    if($page > 1){ 
    $prev = ($page - 1);
        
    $main.="<a href=\"dating.php?action=datingview&amp;page=$prev&amp;cat=$cat&amp;sid=$sid\"><small>Prev</small></a><br/>\n";
    } 
    $i = 1; $i <= $total_pages; $i++ ;
    }
            
    ////////UNTIL HERE//////////
     
    $main.="<p align=".align()."><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a>|<a href=\"online.php?sid=$sid\">Online menu</a>|
    <a href=\"extras.php?sid=$sid\">Extras</a>|
    <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
    <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
    <a href=\"../chat/public.php?sid=$sid\">Chat</a>|
    <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
    <a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
    echo foot_tag();
    exit;
    }
    else if($action=="card")
    {
    addonline(getuid_sid($sid)," In The Love Zone",""); 
    echo head_tag(getnick_sid($sid)."@dating cards",1,getnick_sid($sid)); 
    $title="<b>The Love Zone</b>"; 
    $main.="<p align=".align().">\n";
    $key=$_GET["key"];
    $cat=$_GET["cat"];
    $sql = mysql_fetch_array(mysql_query("SELECT * FROM dating WHERE id='$key'")); 
    $usid=$sql["uid"];
    $who=$usid;
    $name=getnick_uid($usid);
    $about=$sql["aboutme"];
    $looking=$sql["lookingfor"];
    $main.="<b>*Username*</b><br/><a href=\"profile.php?who=$usid&amp;sid=$sid\">$name</a><br/><br/>\n";
    $main.="<b>*About*</b><br/> $about<br/><br/>\n";
    $main.="<b>*Looking For*</b><br/> $looking<br/>\n";
    $main.="<a href=\"inbox/send.php?action=send1&amp;who=$usid&amp;sid=$sid\">[Send $name A PM]</a><br/><br/>\n";
    
    ////////UNTIL HERE//////////
     
    $main.="<p align=".align()."><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a>|<a href=\"online.php?sid=$sid\">Online menu</a>|
    <a href=\"extras.php?sid=$sid\">Extras</a>|
    <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
    <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
    <a href=\"../chat/public.php?sid=$sid\">Chat</a>|
    <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
    <a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
    echo foot_tag();
    exit;
    }
    else if($action=="add")
    {
    addonline(getuid_sid($sid)," In The Love Zone",""); 
    echo head_tag(getnick_sid($sid)."@dating cards",1,getnick_sid($sid)); 
    $title="<b>The Love Zone</b>"; 
    $main.="<p align=".align().">\n";
    $main.="Here you can Place your own add in our dating system, simply enter the details below to add you card";
    $ui=getuid_sid($sid);
    $main.="<form action=\"dating.php?action=add2&amp;sid=$sid\" method=\"post\">
    About Me:<br/>
    <small>hobbies intrests etc</small><br/>
    <input name=\"aboutme\"/><br/>
    Looking For:<br/>
    <input name=\"lookingfor\"/><br/>
    Your Gender:
    <br/><select name=\"first\">
    <option value=\"select\">select</option>
    <option value=\"m\">M</option>
    <option value=\"f\">F</option>
    </select>
    <br/>Gender wanted:
    <br/><select name=\"second\">
    <option value=\"select\">select</option>
    <option value=\"m\">M</option>
    <option value=\"f\">F</option>
    </select>
    <input type=\"hidden\" name=\"ui\" value=\"$ui\"/>
    <br/><input name=\"submit\" value=\"Add My Card\" type=\"submit\"/></form>";
            
    ////////UNTIL HERE//////////
     
    $main.="<p align=".align()."><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a>|<a href=\"online.php?sid=$sid\">Online menu</a>|
    <a href=\"extras.php?sid=$sid\">Extras</a>|
    <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
    <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
    <a href=\"../chat/public.php?sid=$sid\">Chat</a>|
    <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
    <a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
    echo foot_tag();
    exit;
    }
    else if($action=="add2")
    {
    addonline(getuid_sid($sid)," In The Love Zone",""); 
    echo head_tag(getnick_sid($sid)."@dating cards",1,getnick_sid($sid)); 
    $title="<b>The Love Zone</b>"; 
    $main.="<p align=".align().">\n";		
    $about=$_POST["aboutme"];
    $looking=$_POST["lookingfor"];
    $cat1=$_POST["first"];
    $cat2=$_POST["second"];
    $cat=$cat1."4".$cat2;
    $ui=$_POST["ui"];
    $result=mysql_query("select * from dating where uid='$ui' and cat='$cat'");
    $number_of_rows = mysql_num_rows($result);
    if ($number_of_rows>0){
    $problems="1";
    $main.="You already have a card in this category! =p<br/>\n";
    $main.="<br/><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a><br/>";}
    if ($problems==""){	
    $main.="<img src=\"images/dating.gif\" alt=\"\"/><b>$sitename-Dating</b><img src=\"images/dating.gif\" alt=\"\"/><br/>\n";
    $sql = "INSERT INTO dating (uid, cat, aboutme, lookingfor) VALUES ('$ui','$cat','$about','$looking')";
    $result = mysql_query($sql);
    $main.="Cupids arrow has been fired, but where will it land?\n";
    $main.="<br/><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a><br/>\n";
    }
    
    ////////UNTIL HERE//////////
     
    $main.="<p align=".align()."><a href=\"dating.php?action=main&amp;sid=$sid\">Dating Index</a>|<a href=\"online.php?sid=$sid\">Online menu</a>|
    <a href=\"extras.php?sid=$sid\">Extras</a>|
    <a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
    <a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
    <a href=\"../chat/public.php?sid=$sid\">Chat</a>|
    <a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
    <a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
    echo foot_tag();
    exit;
    }
    ?>

    #2
    I havent really looked to much into wapdesire v2 scripts but i know of one fatal error on one of the scripts that can close the whole site down

    Comment


      #3
      look ok to me

      Comment

      Working...
      X