Jump to content

skendo

Members
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

skendo's Achievements

Member

Member (2/5)

0

Reputation

  1. But can this work for a banner that is already based on Javascript and not my own create HTML image banner. because need to use this for adhitz banner.
  2. Hei everyone. i need a solution to find : When any one clicks on any ad network banner that i place on site after a click on banner i want it to hide / remove. I need this so wont have multiple ad clicks and prevent being banned If some one can help me with the code how to make for example adhitz banner after a click made by that visitor to get hidden. I dont need a function on a simple click anywhere on page. I need when banner clicked to get hidden after the click is made on it.
  3. Hei everyone. I am new on php development and i do not have budget on offering a course so i am trying to learn my self. i need some help on the following : i want to create infopanel.php where the script will get info from. For example if user logs in the script will have to call : <?php include '/incl/infopanel.php' ; ?> The info panel to load all details from database: <?php $name='$myname'; $sur_name='$sname'; $age='$myage'; $country='$mycountry'; ?> So the info with my has to be from database . so can some one help me how to call all information from database to a specific file that i will not have to call always information on every page I hope i have been so clean with my request
  4. hi i am new on php+mysql i am trying to create signup form that will: users to enter email address and the script check via ajax from MYSQL database if the email is not registered send the signup link to their email if already registered than show error you are a member.
  5. if i say function phpAds_checkAccess ($allowed) { global $Session; global $strNotAdmin, $strAccessDenied; if (!($allowed & $Session['usertype'])) { // No permission to access this page! phpAds_PageHeader(0); phpAds_Die ($strAccessDenied, $strNotAdmin); } } Will it work..?! also
  6. According to this code can youhelp me prepeare an external Login form..? <?php // $Revision: 3830 $ // Include required files require ("lib-sessions.inc.php"); // Define usertypes bitwise, so 1, 2, 4, 8, 16, etc. define ("phpAds_Admin", 1); define ("phpAds_Client", 2); define ("phpAds_Affiliate", 4); // Define client permissions bitwise, so 1, 2, 4, 8, 16, etc. define ("phpAds_ModifyInfo", 1); define ("phpAds_ModifyBanner", 2); define ("phpAds_AddBanner", 4); define ("phpAds_DisableBanner", ; define ("phpAds_ActivateBanner", 16); // Define affiliate permissions bitwise, so 1, 2, 4, 8, 16, etc. define ("phpAds_LinkBanners", 2); define ("phpAds_AddZone", 4); define ("phpAds_DeleteZone", ; define ("phpAds_EditZone", 16); /*********************************************************/ /* Start or continue current session */ /*********************************************************/ function phpAds_Start() { global $phpAds_config; global $Session; global $phpAds_productname; if (!defined('phpAds_installing')) phpAds_SessionDataFetch(); if (!phpAds_isLoggedIn() || phpAds_SuppliedCredentials()) { // Load preliminary language settings @include (phpAds_path.'/language/english/default.lang.php'); if ($phpAds_config['language'] != 'english' && file_exists(phpAds_path.'/language/'.$phpAds_config['language'].'/default.lang.php')) @include (phpAds_path.'/language/'.$phpAds_config['language'].'/default.lang.php'); phpAds_SessionDataRegister(phpAds_Login()); } // Overwrite certain preset preferences if (isset($Session['language']) && $Session['language'] != '' && $Session['language'] != $phpAds_config['language']) { $phpAds_config['language'] = $Session['language']; } } /*********************************************************/ /* Stop current session */ /*********************************************************/ function phpAds_Logout() { global $phpAds_config; phpAds_SessionDataDestroy(); // Return to the login screen header ("Location: index.php"); } /*********************************************************/ /* Check if user has permission to view this page */ /*********************************************************/ function phpAds_checkAccess ($allowed) { global $Session; global $strNotAdmin, $strAccessDenied; if (!($allowed & $Session['usertype'])) { // No permission to access this page! phpAds_PageHeader(0); phpAds_Die ($strAccessDenied, $strNotAdmin); } } /*********************************************************/ /* Check if user is of a certain usertype */ /*********************************************************/ function phpAds_isUser ($allowed) { global $Session; if (isset($Session['usertype'])) return ($allowed & (int)$Session['usertype']); else return false; } /*********************************************************/ /* Check if user has clearance to do a certain task */ /*********************************************************/ function phpAds_isAllowed ($allowed) { global $Session; return ($allowed & (int)$Session['permissions']); } /*********************************************************/ /* Get the ID of the current user */ /*********************************************************/ function phpAds_getUserID () { global $Session; return ($Session['userid']); } /*********************************************************/ /* Private functions */ /*********************************************************/ function phpAds_checkIds() { global $clientid, $campaignid, $bannerid, $affiliateid, $zoneid, $userlogid, $day; // I also put it there to avoid problems during the check on client/affiliate interface if (phpAds_isUser(phpAds_Client)) $clientid = phpAds_getUserID(); elseif (phpAds_isUser(phpAds_Affiliate)) $affiliateid = phpAds_getUserID(); // Reset missing variables if (!isset($clientid)) $clientid = ''; if (!isset($campaignid)) $campaignid = ''; if (!isset($bannerid)) $bannerid = ''; if (!isset($affiliateid)) $affiliateid = ''; if (!isset($zoneid)) $zoneid = ''; if (!isset($userlogid)) $userlogid = ''; if (!isset($day)) $day = ''; $part = explode('-', str_replace('.php', '-', basename($_SERVER['SCRIPT_NAME']))); if ($stats = ($part[0] == 'stats' ? 1 : 0)) { array_shift($part); $redirects = array( 'client' => 'stats-global-client.php', 'campaign' => 'stats-client-campaigns.php', 'banner' => 'stats-campaign-banners.php', 'affiliate' => 'stats-global-affiliates.php', 'zone' => 'stats-affiliate-zones.php'); } else { $redirects = array( 'client' => 'client-index.php', 'campaign' => 'client-campaigns.php', 'banner' => 'campaign-banners.php', 'affiliate' => 'affiliate-index.php', 'zone' => 'affiliate-zones.php'); } // *-edit and *-index pages doesn't need ids when adding new item, lowering requirements if (isset($part[1]) && ($part[1] == 'edit' || $part[1] == 'index')) { if ($part[0] == 'client') $part[0] = ''; elseif ($part[0] == 'campaign') $part[0] = 'client'; elseif ($part[0] == 'banner') $part[0] = 'campaign'; elseif ($part[0] == 'affiliate') $part[0] = ''; elseif ($part[0] == 'zone') $part[0] = 'affiliate'; } switch ($part[0]) { case 'banner': if (!is_numeric($bannerid)) { if (is_numeric($clientid) && is_numeric($campaignid)) { // Banner-activate and banner-delete are also allowed to use only the campaign id if ($part[1] == 'activate' || $part[1] == 'delete') break; header('Location: '.$redirects['banner'].'?clientid='.$clientid.'&campaignid='.$campaignid); exit; } } elseif (isset($part[1]) && $part[1] == 'htmlpreview') break; case 'campaign': if (!is_numeric($campaignid)) { if (is_numeric($clientid)) { header('Location: '.$redirects['campaign'].'?clientid='.$clientid); exit; } } case 'client': if (!is_numeric($clientid)) { header('Location: '.$redirects['client']); exit; } break; case 'zone': case 'linkedbanners': if (!is_numeric($zoneid)) { if (is_numeric($affiliateid)) { header('Location: '.$redirects['zone'].'?affiliateid='.$affiliateid); exit; } } case 'affiliate': if (!is_numeric($affiliateid)) { header('Location: '.$redirects['affiliate']); exit; } break; } } function phpAds_Login() { global $phpAds_config; global $strPasswordWrong, $strEnableCookies, $strEnterBoth; if (phpAds_SuppliedCredentials()) { // Trim spaces from input $username = trim($_POST['phpAds_username']); $password = trim($_POST['phpAds_password']); // Add slashes to input if needed if (!ini_get ('magic_quotes_gpc')) { $username = addslashes($username); $password = addslashes($password); } // Convert plain text password to md5 digest $md5digest = ($password); // Exit if not both username and password are given if ($md5digest == '' || $md5digest == md5('') || $username == '') { $_COOKIE['sessionID'] = phpAds_SessionStart(); phpAds_LoginScreen($strEnterBoth, $_COOKIE['sessionID']); } // Exit if cookies are disabled if ($_COOKIE['sessionID'] != $_POST['phpAds_cookiecheck']) { $_COOKIE['sessionID'] = phpAds_SessionStart(); phpAds_LoginScreen($strEnableCookies, $_COOKIE['sessionID']); } if (phpAds_isAdmin($username, $md5digest)) { // User is Administrator return (array ("usertype" => phpAds_Admin, "loggedin" => "t", "username" => $username) ); } else { // Check client table $res = phpAds_dbQuery(" SELECT clientid, permissions, language FROM ".$phpAds_config['tbl_clients']." WHERE clientusername = '".$username."' AND clientpassword = '".$md5digest."' ") or phpAds_sqlDie(); if (phpAds_dbNumRows($res) > 0) { // User found with correct password $row = phpAds_dbFetchArray($res); return (array ("usertype" => phpAds_Client, "loggedin" => "t", "username" => $username, "userid" => $row['clientid'], "permissions" => $row['permissions'], "language" => $row['language']) ); } else { $res = phpAds_dbQuery(" SELECT affiliateid, permissions, language FROM ".$phpAds_config['tbl_affiliates']." WHERE username = '".$username."' AND password = '".$md5digest."' "); if ($res && phpAds_dbNumRows($res) > 0) { // User found with correct password $row = phpAds_dbFetchArray($res); return (array ("usertype" => phpAds_Affiliate, "loggedin" => "t", "username" => $username, "userid" => $row['affiliateid'], "permissions" => $row['permissions'], "language" => $row['language']) ); } else { // Password is not correct or user is not known // Set the session ID now, some server do not support setting a cookie during a redirect $_COOKIE['sessionID'] = phpAds_SessionStart(); phpAds_LoginScreen($strPasswordWrong, $_COOKIE['sessionID']); } } } } else { // User has not supplied credentials yet if (defined('phpAds_installing')) { // We are trying to install, grant access... return (array ("usertype" => phpAds_Admin, "loggedin" => "t", "username" => 'admin') ); } // Set the session ID now, some server do not support setting a cookie during a redirect $_COOKIE['sessionID'] = phpAds_SessionStart(); phpAds_LoginScreen('', $_COOKIE['sessionID']); } } function phpAds_IsLoggedIn() { global $Session; return (isset($Session['loggedin']) ? ($Session['loggedin'] == "t") : false); } function phpAds_SuppliedCredentials() { return (isset($_POST['phpAds_username']) && isset($_POST['phpAds_password'])); } function phpAds_isAdmin($username, $md5) { global $phpAds_config; return ( ($username == $phpAds_config['admin'] && $md5 == $phpAds_config['admin_pw']) || ($username == $phpAds_config['admin'] && $md5 == ($phpAds_config['admin_pw']) && defined('phpAds_updating')) ); } function phpAds_LoginScreen($message='', $sessionID=0) { global $phpAds_config, $phpAds_productname; global $strUsername, $strPassword, $strLogin, $strWelcomeTo, $strEnterUsername, $strNoAdminInteface; phpAds_PageHeader(phpAds_Login); if ($phpAds_config['ui_enabled'] == true) { echo "<br>"; phpAds_ShowBreak(); echo "<br>"; echo "<form name='login' method='post' action='".basename($_SERVER['PHP_SELF']); echo (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '' ? '?'.htmlentities($_SERVER['QUERY_STRING']) : '')."'>"; echo "<input type='hidden' name='phpAds_cookiecheck' value='".$_COOKIE['sessionID']."'>"; echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>"; echo "<td width='80' valign='bottom'><img src='images/login-welcome.gif'> </td>"; echo "<td width='100%' valign='bottom'>"; echo "<span class='tab-s'>".$strWelcomeTo." ".(isset($phpAds_config['name']) && $phpAds_config['name'] != '' ? $phpAds_config['name'] : $phpAds_productname)."</span><br>"; echo "<span class='install'>".$strEnterUsername."</span><br>"; if ($message != "") { echo "<div class='errormessage' style='width: 400px;'><img class='errormessage' src='images/errormessage.gif' align='absmiddle'>"; echo "<span class='tab-r'>$message</span></div>"; } else echo "<img src='images/break-el.gif' width='400' height='1' vspace='8'>"; echo "</td></tr><tr><td> </td><td>"; echo "<table cellpadding='0' cellspacing='0' border='0'>"; echo "<tr height='24'><td>".$strUsername.": </td><td><input class='flat' type='text' name='phpAds_username'></td></tr>"; echo "<tr height='24'><td>".$strPassword.": </td><td><input class='flat' type='password' name='phpAds_password'></td></tr>"; echo "<tr height='24'><td> </td><td><input type='submit' value='".$strLogin."'></td></tr>"; echo "</table>"; echo "</td></tr></table>"; echo "</form>"; phpAds_ShowBreak(); echo "<script language='JavaScript'>"; ?> <!-- login_focus(); //--> <?php echo "</script>"; } else { phpAds_ShowBreak(); echo "<br><img src='images/info.gif' align='absmiddle'> "; echo $strNoAdminInteface; } phpAds_PageFooter(); exit; } ?>
  7. yah sounds like the thing i want can you tell me how to do it.?
  8. for example www.ads2.me login form on top when guest enters user infos and clicks login the script to forwards to http://ads2.me/my_server/ and to check for login and to log in.
  9. Hi can some one help me. When user enters login id and password on go.php that id and password to be entered by script on http://domain.ltd/demo/index.php
  10. thanks voip03 try $_GET Code: [select] $password =md5($_GET['password']); worked
  11. sorry i am a beginner i am trying to make a module for a script that will make users signup So if is GET used wont it be for requesting data instead..?!
  12. i am trying to encrypt the password $password =md5($_POST['password']); but is not working why...?
  13. and also instad of 1 it adds 2 rows at same time... can some one give me a code example That i can add data to database that will ad random ID Add username Password email Name/Surname I am a beginner so really need help.
  14. I Added that code you edited for me As i said before it adds database record but empty.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.