Register for your free account! | Forgot your password?

You last visited: Today at 06:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Query Web ODBC

Discussion on Query Web ODBC within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
dgaby's Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 39
Received Thanks: 0
Query Web ODBC

as I can put that all is for odbc connection? whom I spend a fixed

that has all the connections mssql

PHP Code:
<?php
    session_start
();
    
    include(
"../modules/include/Config.php");
    require_once(
"../modules/include/sqlConn.php");
    require_once(
"../modules/include/Security.php");
    
    if(!isset(
$_SESSION['loggedin'])) {
        
header("location:?notLoggedIn");
    } else {    
        
mssql_select_db($dbName1$dbConn) or die ("Couln't select database $dbName1");
        
        
        
$userID $_SESSION['name'];    
        
$ip $_SERVER['REMOTE_ADDR'];
        
$time time();
        
        
$voteid = ($_POST['votenum']);
        
        
define("VOTE_TIME""12");
        function 
clean_requests($time) {
            
$query mssql_query("select * from vote_log");
            
$i 0;
            while(
$row mssql_fetch_array($query)) {
                
$i++;
                
$lastvoted $row['vote_time'];
                if(
$time-$lastvoted VOTE_TIME*3600) {
                    if (!
mssql_query"delete from vote_log where vote_time='$lastvoted'")) {
                        return 
false;
                    }
                }
            }
            return 
true;
        }
        
        function 
vote_entries($userID) {
            
$entries mssql_query("select * from vote_log where account = '$userID' and vote_count > 1");
            if (!
$entries ) {
                die (
"Unable to get number of entries: ".mssql_error());
            }
            return 
mssql_num_rows($entries);
        }
        
        
        function 
votenow($votenum) {
            
$url "";
            if(
$votenum) {
                switch(
$votenum) {
                    case 
1:
                        
$url "http://";
                    break;
                    case 
2:
                        
$url "http://";
                    break;
                    default:
                        
header("location:./../?vote"); 
                    break;
                }
            }
            return 
$url;
        }
        
        if(
clean_requests($time)) {
            
$ip $_SERVER['REMOTE_ADDR'];
            
$voteCount 0;
            
$query mssql_query("select * from vote_log where account = '$userID'");
            while(
$row mssql_fetch_array($query)) {
                
$voteCount $row['vote_count'];
            }
            if (
$voteCount <= && vote_entries($userID) == 0) {
                
mssql_query("insert into vote_log (account, ip, vote_time, vote_count) VALUES ('$userID', '$ip', '$time', '1')");
                
mssql_query("exec CGI.CGI_WebPurchaseSilk 0,'$userID',0,4,0");
                
header("Location: ".votenow($voteid)."");
            } else if (
$voteCount == && vote_entries($userID) == 0) {
                
mssql_query("update vote_log set vote_count = '2' where ip = '$ip'");
                
mssql_query("exec CGI.CGI_WebPurchaseSilk 0,'$userID',0,5,0");
                
header("Location: ".votenow($voteid)."");
            } else {
                
header("location:./../?alreadyVoted");
            }
        }
    }
?>
help mee
dgaby is offline  
Old 11/07/2011, 13:43   #2
 
PlayCreedSRO's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 173
Received Thanks: 139
same problem
PlayCreedSRO is offline  
Reply


Similar Threads Similar Threads
Need help with ODBC
10/09/2011 - SRO Private Server - 1 Replies
So,i'm trying to set up a vsro based server, and i can't setup ODBC for those DB's, when i try to add ODBC there is no SQL server in the list (it's empty) how can i fix this? OS windows 7 x64
ODBC
09/16/2011 - SRO Private Server - 1 Replies
So yea I've restored the databases but I can't connect the odbc to the databases , any ideas ? It would help out a lot if someone posts a guide , ty :)
[Suche]Query für "Alteklinge, Reichsklinge" &' Stichdolche NUR QUERY!
08/18/2010 - Metin2 Private Server - 1 Replies
Ich weiß ich werd nervig aber ich suche die Query's für Alteklinge, Reichsklinge &' Strichdolche Why? Naya, weil ich in der DB i-wie nur Drachenmaulglocke hab ... not more -.- Auf jeden Fall Icon's etc. etc. etc. hab ich ich brauche nur die Query's
ODBC
06/19/2009 - Dekaron Private Server - 2 Replies
Hello i follow the video of sergcool but i get critical error...and i dont make my odbc i dont know how..can someone make a guide for odbc or something for result my problem?



All times are GMT +2. The time now is 06:26.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.