Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- common.php global hooks
- find
- /* ======== Local/GMT time ======== */
- $usr['timetext'] = sed_build_timezone($usr['timezone']);
- $usr['gmttime'] = @date($cfg['dateformat'],$sys['now_offset']).'';
- /* ======== Local/ Redirect ======== */
- add below
- if (($cfg['rd_option'] == "Login Redirect his place")&&($usr['id'] < 1))
- {
- $rd_loc = $_SERVER["PHP_SELF"];
- $rd_extra = $_SERVER["QUERY_STRING"];
- if (!empty($rd_extra)) { $rd_extra = "?".$rd_extra; }
- $temp = explode("/",$rd_loc);
- $rd_loc = $temp[count($temp)-1];
- if (($rd_loc != "users.php")&&($rd_loc != "message.php"))
- {
- $sql_update_online = sed_sql_query("UPDATE $db_redirecter SET rd_location='".$rd_loc.$rd_extra."',rd_lastseen='".time()."' WHERE rd_ip='".$_SERVER["REMOTE_ADDR"]."'");
- }
- if (sed_sql_affectedrows() == 0)
- { // No record, insert
- $sql_insert_online = sed_sql_query("INSERT INTO $db_redirecter (rd_ip,rd_location,rd_lastseen) VALUES ('".$_SERVER["REMOTE_ADDR"]."','".$rd_loc.$rd_extra."','".time()."')");
- }
- }
- functions.admin.php find
- $result[] = array ('main', '20', 'shieldzhammer', 2, '25', array(5,10,15,20,25,30,40,50,100));
- add below
- $result[] = array ('main', '21', 'rd_option', 2, 'Login Redirect his place', array('Login Redirect his place','Use the special value'));
- $result[] = array ('main', '22', 'rd_page_1', 1, 'users.php?m=profile', '');
- $result[] = array ('main', '23', 'rd_page_2', 1, '', '');
- insert into mysql
- $sql = sed_sql_query("CREATE TABLE ".$cfg['mysqldb']."redirecter (
- `rd_ip` varchar(15) NOT NULL default '',
- `rd_location` varchar(100) NOT NULL default '',
- `rd_lastseen` int(11) NOT NULL default '0'
- ) ENGINE=MyISAM;");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement