Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Redirect kodas

Parašė MrLeg· 2012 Geg. 17 20:05:48
#9

Niekaip nesigauna, gal kas nors gali pabandyt kur nors jį įterpt?


<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licenses/agpl.html.' target='_blank'><span style='color:005C5B'>www.gnu.org/licenses/agpl.html.</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
$vers = explode(".",$settings['version']);
if($vers['0'] == 7) {
require_once THEMES."templates/header.php";
} else {
require_once "subheader.php";
require_once "side_left.php";
define("DB_USERS", DB_PREFIX."users");
}
 
define("DB_INVITES", DB_PREFIX."invites");
$invite = @$_GET['invite'];
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE `user_id`='$invite'");
$narys = dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE `user_id`='$invite'"));
if(!isset($invite) || !isNum($invite) || !dbrows($result)) redirect(BASEDIR."./");
 
if($vers['0'] == 7) {
add_to_title(" - Tave pakvietė ".$narys['user_name']);
}
 
$data = dbarray(dbquery("SELECT * FROM `".DB_INVITES."` WHERE `invite_user_id`='$invite' AND `invite_guest_ip`='".USER_IP."' ORDER by invite_time DESC LIMIT 1"));
 
if($data['invite_time']  + 60 * 60 * 24 > time()) {
opentable("Jus į šį puslapį pakvietė ".$narys['user_name']);
echo "Tačiau, jo pakvietimas jam nedavė taškų, kuriuos galėtų išleisti mūsų puslapį, nes jūs jau apsilankėt per šio nario nuorodą ankščiau, nei per 24h.";
closetable();
} elseif($data['invite_time']  + 60 * 60 * 24 < time()) {
$result = dbquery("INSERT INTO `".DB_INVITES."` (invite_time, invite_user_id, invite_guest_ip) VALUES ('".time()."', '$invite', '".USER_IP."')");
opentable("Jus į šį puslapį pakvietė ".$narys['user_name']);
echo "Ačiū, kad užsukote į mūsų puslapį.<br>Tikimės, kad jūs lankysitės dažniau šiame puslapį.<br><br>Admintracijos INFO.";
closetable();
}
 
if($vers['0'] == 7) {
require_once THEMES."templates/footer.php";
} else {
require_once "side_right.php";
require_once "footer.php";
}
?>