コード例 #1
0
 public function index()
 {
     //服务器的信息
     $mysql = mysql_get_server_info();
     $this->assign('PHP_V', PHP_VERSION);
     //php版本
     $this->assign('system', php_uname());
     //系统版本
     $this->assign('server_ip', GetHostByName($_SERVER['SERVER_NAME']));
     //服务器的ip
     $this->assign('web_port', $_SERVER['SERVER_PORT']);
     //web端口
     $this->assign('client_web', $_SERVER['USERDOMAIN']);
     //获取用户域名
     $this->assign('server_web', $_SERVER["HTTP_HOST"]);
     //获取Http请求中Host值(返回值为域名或IP)
     $this->assign('mysql', $mysql);
     //数据库的版本
     $this->assign('timezone', date_default_timezone_get());
     //时区
     //获取管理员的登录记录
     $client = M('admin_log');
     $where['user_id'] = $_SESSION['user_id'];
     $where['action'] = "登录成功!";
     $client_ip = $client->where($where)->order('id desc')->limit(5)->select();
     foreach ($client_ip as $k => $v) {
         $client_ip[$k]['ip'] = long2ip($v['ip']);
         $client_ip[$k]['create_time'] = date("Y-m-d H:i:s", $v['create_time']);
     }
     //var_dump($client_ip);
     $this->assign('client_ip', $client_ip);
     //赋值ip
     $this->display();
 }
コード例 #2
0
 public function index()
 {
     // 日访问量分布
     $visitorDay = M('visitor')->select();
     $this->visitorDay = $this->getDay($visitorDay);
     // 月访问量分布
     $visitorMonth = M('visitor')->select();
     $this->visitorMonth = $this->getMonth($visitorMonth);
     // 服务器信息
     $this->system_type_version = php_uname();
     $this->run_type = php_sapi_name();
     $this->php_version = PHP_VERSION;
     $this->php_path = DEFAULT_INCLUDE_PATH;
     $this->current_server_ip = GetHostByName($_SERVER['SERVER_NAME']);
     $this->current_server_port = $_SERVER['SERVER_PORT'];
     $this->domain = $_SERVER["HTTP_HOST"];
     $this->server_software = $_SERVER['SERVER_SOFTWARE'];
     // 基础信息
     $phone = M('webinfo')->where(array('type' => C('电话')))->find();
     $beian = M('webinfo')->where(array('type' => C('备案')))->find();
     $banquan = M('webinfo')->where(array('type' => C('版权')))->find();
     $address = M('webinfo')->where(array('type' => C('地址')))->find();
     $this->phone = $phone['content'];
     $this->beian = $beian['content'];
     $this->banquan = $banquan['content'];
     $this->address = $address['content'];
     // 显示模板
     $this->display();
 }
コード例 #3
0
ファイル: global_funcs.php プロジェクト: sahartak/v1poject
function addLog($log_area = '', $log_section = '', $log_user = '', $log_admin = '', $log_details = '')
{
    $user_ip = GetHostByName($_SERVER["REMOTE_ADDR"]);
    $db = new DBConnection();
    $query = 'INSERT INTO logs SET 
	log_area="' . $log_area . '",log_section="' . $log_section . '",log_user="******",log_admin="' . $log_admin . '",log_details="' . $log_details . '", 
	log_date="' . date('Y-m-d H:i:s', CUSTOMTIME) . '", log_ip="' . $user_ip . '"';
    $db->rq($query);
}
コード例 #4
0
 public function main()
 {
     //服务器IP
     $data['server_ip'] = GetHostByName($_SERVER['SERVER_NAME']);
     //最大上传限制
     $data['max_upload'] = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";
     //整理实时数据
     $realtime = array('time' => date('Y年n月j日 H:i:s'), 'uptime' => $sys_info['uptime'], 'disk_free' => round(@disk_free_space('.') / (1024 * 1024 * 1024), 2) . ' G', 'mem_used' => round($sys_info['mem_used'] / 1024, 2) . ' G', 'mem_free' => round($sys_info['mem_free'] / 1024, 2) . ' G', 'mem_cached' => round($sys_info['mem_cached'] / 1024, 2) . ' G', 'mem_buffers' => round($sys_info['mem_buffers'] / 1024, 2) . ' G', 'mem_real_used' => round($sys_info['mem_real_used'] / 1024, 2) . ' G', 'mem_real_free' => round($sys_info['mem_real_free'] / 1024, 2) . ' G', 'mem_real_percent' => (int) $sys_info['mem_real_percent'] . '%', 'mem_percent' => (int) $sys_info['mem_percent'] . '%', 'mem_cached_percent' => (int) $sys_info['mem_cached_percent'] . '%', 'swap_percent' => (int) $sys_info['swap_percent'] . '%', 'load_avg' => $sys_info['load_avg']);
     $sys_info['disk_total'] = round(@disk_total_space('.') / (1024 * 1024 * 1024), 2);
     $this->assign('realtime', $realtime);
     $this->assign('sys_info', $sys_info);
     $this->assign('data', $data);
     $this->display();
 }
コード例 #5
0
 public function welcome()
 {
     $http = array();
     $http['host'] = $_SERVER["HTTP_HOST"];
     $http['ip'] = GetHostByName($_SERVER['SERVER_NAME']);
     $http['port'] = $_SERVER['SERVER_PORT'];
     $http['cip'] = $_SERVER['REMOTE_ADDR'];
     $http['system'] = php_uname('s');
     $http['php'] = PHP_VERSION;
     $http['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
     $http['zend'] = Zend_Version();
     date_default_timezone_set('Asia/Shanghai');
     $time = date('Y-m-d H:i:s', time());
     $http['time'] = $time;
     $this->assign('http', $http);
     $this->display();
 }
コード例 #6
0
 /**
  * 判断该position改显示的内容(查询条数若不等于id列表的的条数则表示该position不全相同)
  * @param unknown $result
  * @param unknown $count
  */
 public function get_position_info($result, $count)
 {
     if (GetHostByName($_SERVER['SERVER_NAME']) == "127.0.0.1") {
         $ip = GetHostByName($_SERVER['SERVER_NAME']);
     } elseif (GetHostByName($_SERVER['SERVER_NAME']) == "192.168.4.96") {
         $ip = GetHostByName($_SERVER['SERVER_NAME']) . ":48093";
     } elseif (GetHostByName($_SERVER['SERVER_NAME']) == "192.168.4.97") {
         $ip = GetHostByName($_SERVER['SERVER_NAME']) . ":48082";
     }
     if ($count == 1) {
         if ($result[0]['url']) {
             $result[0]['url'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['url'];
         }
         if ($result[0]['img']) {
             $result[0]['img'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['img'];
         }
         return $result[0];
     } else {
         if (count($result) != $count) {
             return null;
         } else {
             $flag = false;
             for ($i = 1; $i < count($result); $i++) {
                 if ($result[$i - 1]['url'] != $result[$i]['url']) {
                     $flag = true;
                     break;
                 }
             }
             if ($flag) {
                 return null;
             } else {
                 if ($result[0]['url']) {
                     $result[0]['url'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['url'];
                 }
                 if ($result[0]['img']) {
                     $result[0]['img'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['img'];
                 }
                 return $result[0];
             }
         }
     }
 }
コード例 #7
0
ファイル: common.old.php プロジェクト: sahartak/v1poject
 */
if (isset($_GET['logout'])) {
    addLog('Front-end', 'Login', '' . $_SESSION['user']['user_firstname'] . ' ' . $_SESSION['user']['user_lastname'] . ' (' . $_SESSION['user']['user_account_num'] . ')', 0, 'User successfully logged out');
    unset($_SESSION['user']);
    if (!$_SESSION['admin']['is_logged']) {
        session_destroy();
    }
    header('Location: index.php');
    exit;
}
/**
 * Initialize the login
 */
if (isset($_POST['_login']) && $_POST['l_username'] != '' && $_POST['l_password'] != '') {
    $db = new DBConnection();
    $UserIP = GetHostByName($_SERVER["REMOTE_ADDR"]);
    $username = $_POST['l_username'];
    $username = $db->string_escape($username);
    $password = $_POST['l_password'];
    $password = $db->string_escape($password);
    $query = 'SELECT * FROM users WHERE user_username="******" AND user_status=1 AND user_password!="" LIMIT 1';
    $res = $db->rq($query);
    $row = $db->fetch($res);
    $base_password = $row['user_password'];
    $validatePassword = FALSE;
    if ($password == $base_password) {
        $validatePassword = TRUE;
    }
    if ($validatePassword == TRUE && strtolower($row['user_username']) == strtolower($username)) {
        // if everything goes ok
        page_header_simple(1);
コード例 #8
0
ファイル: WhoIs.php プロジェクト: carriercomm/jbs
function WhoIs_Check($DomainName, $ZoneName, $IsAvalible = FALSE)
{
    #-------------------------------------------------------------------------------
    Debug(SPrintF('[system/libs/WhoIs]: run function WhoIs_Check, Domain = %s.%s', $DomainName, $ZoneName));
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    $CacheID = SPrintF('WhoIs-%s.%s', $DomainName, $ZoneName);
    #-------------------------------------------------------------------------------
    $Answer = CacheManager::get($CacheID);
    #-------------------------------------------------------------------------------
    if (!$Answer) {
        #-------------------------------------------------------------------------------
        # смотрим доменную зону, на предмет того использовать ли данные whois сервера, или юзать запросы к регистратору
        $DomainZones = System_XML('config/DomainZones.xml');
        if (Is_Error($DomainZones)) {
            return ERROR | @Trigger_Error('[comp/www/API/WhoIs]: не удалось загрузить базу WhoIs серверов');
        }
        #-------------------------------------------------------------------------------
        $IsSuppoted = FALSE;
        #-------------------------------------------------------------------------------
        foreach ($DomainZones as $Zone) {
            #-------------------------------------------------------------------------------
            if ($Zone['Name'] == $ZoneName) {
                #-------------------------------------------------------------------------------
                $IsSuppoted = TRUE;
                #-------------------------------------------------------------------------------
                break;
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
        if (!$IsSuppoted || $Zone['IsUseRegistratorWhoIs']) {
            #-------------------------------------------------------------------------------
            if (!$IsSuppoted) {
                Debug(SPrintF('[comp/www/API/WhoIs]: доменная зона не поддерживается'));
            }
            #-------------------------------------------------------------------------------
            if ($IsSuppoted && $Zone['IsUseRegistratorWhoIs']) {
                Debug(SPrintF('[comp/www/API/WhoIs]: принудительное использование WhoIs регистратора'));
            }
            #-------------------------------------------------------------------------------
            #-------------------------------------------------------------------------------
            # чекаем доменную зону
            $Regulars = Regulars();
            #-------------------------------------------------------------------------------
            if (!Preg_Match($Regulars['DomainZone'], $ZoneName)) {
                return ERROR | @Trigger_Error(SPrintF('[comp/www/API/WhoIs]: неверная доменная зона (%s)', $ZoneName));
            }
            #-------------------------------------------------------------------------------
            # достаём список серверов на которых есть такой тариф
            $Servers = DB_Select('DomainSchemes', array('ServerID'), array('Where' => SPrintF('`Name` = "%s"', $ZoneName)));
            #-------------------------------------------------------------------------------
            switch (ValueOf($Servers)) {
                case 'error':
                    return ERROR | @Trigger_Error(500);
                case 'exception':
                    return new gException('REGISTRATOR_SERVER_NOT_FOUND', 'Не найдены активные сервера регистраторов');
                case 'array':
                    #-------------------------------------------------------------------------------
                    $Array = array();
                    #-------------------------------------------------------------------------------
                    foreach ($Servers as $Server) {
                        $Array[] = $Server['ServerID'];
                    }
                    #-------------------------------------------------------------------------------
                    break;
                    #-------------------------------------------------------------------------------
                #-------------------------------------------------------------------------------
                default:
                    return ERROR | @Trigger_Error(101);
            }
            #-------------------------------------------------------------------------------
            # достаём список активных серверов регистраторов
            $Servers = DB_Select('Servers', array('ID', 'Address', 'Params'), array('Where' => array(SPrintF('`ID` IN (%s)', Implode(',', $Array)), '`IsActive` = "yes"'), 'SortOn' => 'Address'));
            #-------------------------------------------------------------------------------
            switch (ValueOf($Servers)) {
                case 'error':
                    return ERROR | @Trigger_Error(500);
                case 'exception':
                    return new gException('REGISTRATOR_SERVER_NOT_FOUND', 'Не найдены активные сервера регистраторов');
                case 'array':
                    break;
                default:
                    return ERROR | @Trigger_Error(101);
            }
            #-------------------------------------------------------------------------------
            # перебираем регистраторов
            $UseServer = FALSE;
            #-------------------------------------------------------------------------------
            foreach ($Servers as $iServer) {
                #-------------------------------------------------------------------------------
                # если это не проверка доступности и в настройках сервера не стоит галка про получение WhoIs - пропускаем
                if (!$IsAvalible) {
                    if (!$iServer['Params']['IsFetchWhoIs']) {
                        continue;
                    }
                }
                #-------------------------------------------------------------------------------
                # достаём использованные запросы к регистратору, на данную минуту
                $RatelimitID = SPrintF('ratelimit-%s-%s-00', $iServer['Address'], Date('H-i'));
                #-------------------------------------------------------------------------------
                $Ratelimit = CacheManager::get($RatelimitID);
                #-------------------------------------------------------------------------------
                # если из кэша что-то досталось и оно больше разрешённой частоты запросов - пропускаем цикл
                if ($Ratelimit && $Ratelimit >= $iServer['Params']['RatelimitAPI']) {
                    #-------------------------------------------------------------------------------
                    Debug(SPrintF('[comp/www/API/WhoIs]: превышена частота запросов к серверу %s (разрешено %u, использовано %u)', $iServer['Address'], $iServer['Params']['RatelimitAPI'], $Ratelimit));
                    #-------------------------------------------------------------------------------
                    continue;
                    #-------------------------------------------------------------------------------
                }
                #-------------------------------------------------------------------------------
                # сохраняем, на пару минут, в кэш новое число запросов к регистратору
                CacheManager::add($RatelimitID, IntVal($Ratelimit) + 1, 120);
                #-------------------------------------------------------------------------------
                $UseServer = $iServer;
                #-------------------------------------------------------------------------------
                break;
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
            # если не задан сервер - частота превышена для всех серверов
            if (!$UseServer) {
                return new gException('REGISTRATOR_SERVER_RATELIMIT', 'Превышена максимальная частота запросов к интерфейсу регистратора');
            }
            #-------------------------------------------------------------------------------
            #-------------------------------------------------------------------------------
            # выбираем сервер регистратора
            if (Is_Error(System_Load('classes/DomainServer.class.php'))) {
                return ERROR | @Trigger_Error(500);
            }
            #-------------------------------------------------------------------------------
            $Server = new DomainServer();
            #-------------------------------------------------------------------------------
            $IsSelected = $Server->Select((int) $UseServer['ID']);
            #-------------------------------------------------------------------------------
            switch (ValueOf($IsSelected)) {
                case 'error':
                    return ERROR | @Trigger_Error(500);
                case 'exception':
                    return new gException('CANNOT_SELECT_REGISTRATOR', 'Не удалось выбрать регистратора');
                case 'true':
                    break;
                default:
                    return ERROR | @Trigger_Error(101);
            }
            #-------------------------------------------------------------------------------
            # делаем запрос к API - функция в зависимости от $IsAvalible
            if ($IsAvalible) {
                #-------------------------------------------------------------------------------
                $DomainCheck = $Server->DomainCheck($DomainName, $ZoneName);
                #-------------------------------------------------------------------------------
                switch (ValueOf($DomainCheck)) {
                    case 'error':
                        return ERROR | @Trigger_Error(500);
                    case 'exception':
                        return ERROR | @Trigger_Error(400);
                    case 'true':
                        return TRUE;
                    case 'false':
                        return array();
                    case 'array':
                        break;
                    default:
                        return ERROR | @Trigger_Error(101);
                }
                #-------------------------------------------------------------------------------
            } else {
                #-------------------------------------------------------------------------------
                $DomainWhoIs = $Server->DomainWhoIs($DomainName, $ZoneName);
                #-------------------------------------------------------------------------------
                switch (ValueOf($DomainWhoIs)) {
                    case 'error':
                        return ERROR | @Trigger_Error(500);
                    case 'exception':
                        # a функции нет ... вылезаем на обычную проверку whois
                        break;
                    case 'true':
                        return TRUE;
                    case 'string':
                        #-------------------------------------------------------------------------------
                        CacheManager::add($CacheID, $DomainWhoIs, 1800);
                        #-------------------------------------------------------------------------------
                        break;
                        #-------------------------------------------------------------------------------
                    #-------------------------------------------------------------------------------
                    default:
                        return ERROR | @Trigger_Error(101);
                }
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    $Config = Config();
    #-------------------------------------------------------------------------------
    $UseSystemApplication = $Config['Other']['Libs']['WhoIs']['UseSystemApplication'];
    #-------------------------------------------------------------------------------
    $Regulars = Regulars();
    #-------------------------------------------------------------------------------
    if (!Preg_Match($Regulars['DomainName'], $DomainName)) {
        return new gException('WRONG_DOMAIN_NAME', 'Неверное доменное имя');
    }
    #-------------------------------------------------------------------------------
    $DomainZones = System_XML('config/DomainZones.xml');
    if (Is_Error($DomainZones)) {
        return ERROR | @Trigger_Error('[WhoIs_Check]: не удалось загрузить базу WhoIs серверов');
    }
    #-------------------------------------------------------------------------------
    $IsSuppoted = FALSE;
    #-------------------------------------------------------------------------------
    foreach ($DomainZones as $DomainZone) {
        #-------------------------------------------------------------------------------
        if ($DomainZone['Name'] == $ZoneName) {
            #-------------------------------------------------------------------------------
            $IsSuppoted = TRUE;
            #-------------------------------------------------------------------------------
            break;
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    if (!$IsSuppoted && !isset($DomainWhoIs)) {
        return FALSE;
    }
    #-------------------------------------------------------------------------------
    if (Mb_StrLen($DomainName) < ($MinChars = $DomainZone['MinChars'])) {
        return new gException('WRONG_DOMAIN_NAME_LENGTH', SPrintF('Длина доменного имени должна быть не менее %u символа(ов)', $MinChars));
    }
    #-------------------------------------------------------------------------------
    $Domain = SPrintF('%s.%s', $DomainName, $DomainZone['Name']);
    #-------------------------------------------------------------------------------
    $Answer = CacheManager::get($CacheID);
    #-------------------------------------------------------------------------------
    if (!$Answer) {
        #-------------------------------------------------------------------------------
        $IDNAConverter = new IDNAConvert();
        #-------------------------------------------------------------------------------
        if ($UseSystemApplication) {
            #-------------------------------------------------------------------------------
            $IsExec = Exec(SPrintF('whois %s', $IDNAConverter->encode($Domain)), $Answer);
            #-------------------------------------------------------------------------------
            $Answer = Implode("\n", $Answer);
            #-------------------------------------------------------------------------------
        } else {
            #-------------------------------------------------------------------------------
            $Socket = @FsockOpen($DomainZone['Server'], 43, $nError, $sError, 5);
            #-------------------------------------------------------------------------------
            if (!$Socket) {
                return ERROR | @Trigger_Error('[WhoIs_Check]: ошибка соединения с сервером WhoIs');
            }
            #-------------------------------------------------------------------------------
            if (!@Fputs($Socket, SPrintF("%s\r\n", $IDNAConverter->encode($Domain)))) {
                return ERROR | @Trigger_Error('[WhoIs_Check]: ошибка работы с серверов WhoIs');
            }
            #-------------------------------------------------------------------------------
            $Answer = '';
            #-------------------------------------------------------------------------------
            do {
                #-------------------------------------------------------------------------------
                $Line = @Fgets($Socket, 10);
                #-------------------------------------------------------------------------------
                $Answer .= $Line;
                #-------------------------------------------------------------------------------
            } while ($Line);
            #-------------------------------------------------------------------------------
            Fclose($Socket);
            #-------------------------------------------------------------------------------
            CacheManager::add($CacheID, $Answer, 1800);
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
        Debug(SPrintF('[system/libs/WhoIs.php]: Answer = %s', print_r($Answer, true)));
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    if (Preg_Match(SPrintF('/%s/', $DomainZone['Available']), $Answer)) {
        return TRUE;
    }
    #-------------------------------------------------------------------------------
    if (Preg_Match(SPrintF('/%s/', $DomainZone['NotAvailable']), $Answer)) {
        return new gException('DOMAIN_NOT_AVAILABLE', 'Доменное имя не доступно для регистрации');
    }
    #-------------------------------------------------------------------------------
    $Result = array('Info' => Preg_Replace('/\\n\\s+\\n/sU', "\n", Preg_Replace('/\\%.+\\n/sU', '', $Answer)), 'ExpirationDate' => 0);
    #-------------------------------------------------------------------------------
    $ExpirationDate = $DomainZone['ExpirationDate'];
    #-------------------------------------------------------------------------------
    if ($ExpirationDate) {
        #-------------------------------------------------------------------------------
        if (Preg_Match(SPrintF('/%s/', $ExpirationDate), $Answer, $Mathes)) {
            #-------------------------------------------------------------------------------
            if (Count($Mathes) < 2) {
                return ERROR | @Trigger_Error('[WhoIs_Check]: шаблон поиска даты окончания задан неверно');
            }
            #-------------------------------------------------------------------------------
            $ExpirationDate = $Mathes[1];
            #-------------------------------------------------------------------------------
            $Months = array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec');
            #-------------------------------------------------------------------------------
            if (Preg_Match('/^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}$/', $ExpirationDate)) {
                #-------------------------------------------------------------------------------
                $Date = Array_Combine(array('Year', 'Month', 'Day'), Explode('.', $ExpirationDate));
                #-------------------------------------------------------------------------------
                $ExpirationDate = MkTime(0, 0, 0, $Date['Month'], $Date['Day'], $Date['Year']);
                #-------------------------------------------------------------------------------
            } elseif (Preg_Match('/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/', $ExpirationDate)) {
                #-------------------------------------------------------------------------------
                $Date = Array_Combine(array('Year', 'Month', 'Day'), Explode('-', $ExpirationDate));
                #-------------------------------------------------------------------------------
                $ExpirationDate = MkTime(0, 0, 0, $Date['Month'], $Date['Day'], $Date['Year']);
                #-------------------------------------------------------------------------------
            } elseif (Preg_Match('/^[0-9]{2}\\-[a-zA-Z]{3}\\-[0-9]{4}$/', $ExpirationDate)) {
                #-------------------------------------------------------------------------------
                $Date = Array_Combine(array('Day', 'Month', 'Year'), Explode('-', $ExpirationDate));
                #-------------------------------------------------------------------------------
                $Month = Array_Search(StrToLower($Date['Month']), $Months);
                #-------------------------------------------------------------------------------
                $ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
                #-------------------------------------------------------------------------------
            } elseif (Preg_Match('/^[0-9]{2}\\s[a-zA-Z]{2,10}\\s[0-9]{4}$/', $ExpirationDate)) {
                #-------------------------------------------------------------------------------
                $Months = array('january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'octember', 'november', 'decemeber');
                #-------------------------------------------------------------------------------
                $Date = Array_Combine(array('Day', 'Month', 'Year'), Preg_Split('/\\s+/', $ExpirationDate));
                #-------------------------------------------------------------------------------
                $Month = Array_Search(StrToLower($Date['Month']), $Months);
                #-------------------------------------------------------------------------------
                $ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
                #-------------------------------------------------------------------------------
            } else {
                #-------------------------------------------------------------------------------
                $Date = Array_Combine(array('Week', 'Month', 'Day', 'Time', 'GMT', 'Year'), Preg_Split('/\\s+/', $ExpirationDate));
                #-------------------------------------------------------------------------------
                $Month = Array_Search(StrToLower($Date['Month']), $Months);
                #-------------------------------------------------------------------------------
                $ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
            $Result['ExpirationDate'] = $ExpirationDate;
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    $NsName = $DomainZone['NsName'];
    #-------------------------------------------------------------------------------
    if ($NsName) {
        #-------------------------------------------------------------------------------
        if (Preg_Match_All(SPrintF('/%s/', $NsName), $Answer, $Mathes)) {
            #-------------------------------------------------------------------------------
            if (Count($Mathes) < 2) {
                return ERROR | @Trigger_Error('[WhoIs_Check]: шаблон поиска именных серверов задан неверно');
            }
            #-------------------------------------------------------------------------------
            $NsNames = $Mathes[1];
            #-------------------------------------------------------------------------------
            for ($i = 0; $i < Count($NsNames); $i++) {
                #-------------------------------------------------------------------------------
                $NsName = Trim(StrToLower($NsNames[$i]), '.');
                #-------------------------------------------------------------------------------
                $Result[SPrintF('Ns%uName', $i + 1)] = $NsName;
                #-------------------------------------------------------------------------------
                if ($NsName) {
                    #-------------------------------------------------------------------------------
                    if (Mb_SubStr($NsName, -Mb_StrLen($Domain)) == $Domain) {
                        #-------------------------------------------------------------------------------
                        $IP = GetHostByName($NsName);
                        #-------------------------------------------------------------------------------
                        if ($IP != $NsName) {
                            $Result[SPrintF('Ns%uIP', $i + 1)] = $IP;
                        }
                        #-------------------------------------------------------------------------------
                    }
                    #-------------------------------------------------------------------------------
                }
                #-------------------------------------------------------------------------------
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    $Registrar = $DomainZone['Registrar'];
    #-------------------------------------------------------------------------------
    if ($Registrar) {
        #-------------------------------------------------------------------------------
        if (Preg_Match(SPrintF('/%s/', $Registrar), $Answer, $Mathes)) {
            #-------------------------------------------------------------------------------
            if (Count($Mathes) < 2) {
                return ERROR | @Trigger_Error('[WhoIs_Check]: шаблон поиска регистратора серверов задан неверно');
            }
            #-------------------------------------------------------------------------------
            $Registrar = Next($Mathes);
            #-------------------------------------------------------------------------------
            $Result['Registrar'] = $Registrar;
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    return $Result;
    #-------------------------------------------------------------------------------
}
コード例 #9
0
ファイル: request.php プロジェクト: noccy80/lepton-ng
 /**
  * @brief Return the remote hostname
  * @see request::getRemoteIp
  * @return string The remote hostname
  */
 static function getRemoteHost()
 {
     $host = GetHostByName(self::getRemoteIp());
     if ($host) {
         return $host;
     }
     return self::getRemoteIp();
 }
コード例 #10
0
 function get_server_ip()
 {
     if (isset($_ENV["HOSTNAME"])) {
         $MachineName = $_ENV["HOSTNAME"];
     } else {
         if (isset($_ENV["COMPUTERNAME"])) {
             $MachineName = $_ENV["COMPUTERNAME"];
         } else {
             $MachineName = $_SERVER["SERVER_NAME"];
         }
     }
     return GetHostByName($MachineName);
     //该函数特别慢 1到5秒 和网络有关
 }
コード例 #11
0
ファイル: template.php プロジェクト: sahartak/v1poject
function page_header_simple($redirect = 0)
{
    if ($_SESSION['user']['is_logged'] == 1) {
        $PageTitle = getLang('ptitle_logged');
    } else {
        $PageTitle = getLang('ptitle_notlogged');
    }
    echo '<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en-us" class="no-js ie6"> <![endif]-->
<!--[if IE 7]>    <html lang="en-us" class="no-js ie7"> <![endif]-->
<!--[if IE 8]>    <html lang="en-us" class="no-js ie8"> <![endif]-->
<!--[if IE 9]>    <html lang="en-us" class="no-js ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>' . $PageTitle . '</title>
<meta http-equiv="content-type" content="application/xhtml+xml" />
<meta http-equiv="X-UA-Compatible" content="IE=100" />
<meta name="robots" content="NOINDEX,NOFOLLOW" />
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1;">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />


';
    echo '
    <link href="adminica/styles/adminica/reset.css" media="all" rel="stylesheet" type="text/css" />
    <link href="adminica/styles/plugins/all/plugins.css" media="all" rel="stylesheet" type="text/css" />
    <link href="adminica/styles/adminica/all.css" media="all" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="adminica/styles/themes/layout_switcher.php?default=layout_fixed.css" >
    <link rel="stylesheet" href="adminica/styles/themes/nav_switcher.php?default=nav_top.css" >
    <link rel="stylesheet" href="adminica/styles/themes/skin_switcher.php?default=skin_light.css" >
    <link rel="stylesheet" href="adminica/styles/themes/theme_switcher.php?default=theme_blue.css" >
    <link rel="stylesheet" href="adminica/styles/themes/bg_switcher.php?default=bg_white_wall.css" >
    <link rel="stylesheet" href="adminica/styles/adminica/colours.css">
    <link rel="stylesheet" href="css/custom.css">

<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">

<link href="css/validationEngine.jquery.css" media="all" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="adminica/scripts/plugins-min.js"></script>
<script type="text/javascript" src="adminica/scripts/adminica/adminica_all-min.js"></script>

<!--<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>-->
<script type="text/javascript" src="js/scripts.js"></script>';
    if ($SelectedTab == 2) {
        echo '
        <link href="css/jquery.jqplot.css" media="all" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/excanvas.min.js"></script>
        <script type="text/javascript" src="js/jquery.jqplot.min.js"></script>
        <script type="text/javascript" src="js/plugins/jqplot.dateAxisRenderer.min.js"></script>
        <script type="text/javascript" src="js/plugins/jqplot.canvasTextRenderer.min.js"></script>
        <script type="text/javascript" src="js/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
        <script type="text/javascript" src="js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
        <script type="text/javascript" src="js/plugins/jqplot.barRenderer.js"></script>
        ';
    }
    echo '
    <style>
    .xLabel
    {
        display: inline-block;
        width: 50%;
    }
    

    </style>
</head>

<body>
<div id="pjax">';
    include 'includes/custom_header.php';
    if ($_SESSION['user']['is_logged'] == 1) {
        echo '<div id="main_container" class="main_container container_16 clearfix">';
        include 'adminica/includes/components/navigation.php';
    } else {
        $db = new DBConnection();
        $UserIP = GetHostByName($_SERVER["REMOTE_ADDR"]);
        $query = 'SELECT banned_ips_id FROM banned_ips WHERE banned_ip="' . $UserIP . '" LIMIT 1';
        $res = $db->rq($query);
        $num_rows = $db->num_rows($res);
        $db->close();
        if ($num_rows > 0) {
            echo '</div><div class="LoginContainer"><h3>' . getLang('lform_publicbanmessage') . '</h3></div>';
        } else {
            //include('parts/login_box.php');
        }
    }
}
コード例 #12
0
 function index()
 {
     $this->auth_middleware();
     $time = date('Y-m-d H:i:s');
     $os = php_uname('s');
     $php_version = 'php ' . php_uname('r');
     $service = $_SERVER["SERVER_SOFTWARE"];
     $service_ip = GetHostByName($_SERVER['SERVER_NAME']);
     $host = $_SERVER["HTTP_HOST"];
     $this->assign('os', $os);
     $this->assign('running', $php_version);
     $this->assign('service', $service);
     $this->assign('service_ip', $service_ip);
     $this->assign('host', $host);
     $this->assign('time', $time);
     $this->display();
 }
コード例 #13
0
ファイル: Systeminfo.php プロジェクト: wuwenhan/systeminfo
 public function getServerip()
 {
     return GetHostByName($_SERVER['SERVER_NAME']);
 }
コード例 #14
0
ファイル: top.php プロジェクト: xeons/news_script
  <TABLE WIDTH="796" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="63">
  <TR> 
  <TD HEIGHT="50"><img src="../images/main.gif" width="796" height="50"></TD>
  </TR>
  <TR> 
  <TD HEIGHT="13">
  <table width="796" border="0" cellspacing="0" cellpadding="0" background="../images/pg_bgk.gif">
  <tr> 
  <td width="160" height="979" valign="TOP">
<div align="left"><br>
</div>
  </td>
  <td class="sides" valign="TOP" align="left" width="476"> <br>
  <table width="468" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td background="../images/ad_top.gif" height="20">
  <div align="center"><font face="Tahoma" size="1" color="#FFFFFF"><i><b>Please 
    Support us, Click the AD!</b></i></font></div>
  </td>
  </tr>
  <tr>
  <td><div align="center"><script language="javascript" src="http://www.qksz.net/1e-3j5e"></script></div></td>
  </tr>
  <tr>
  <td height="20" background="../images/ad_bottem.gif"><div align="center"><font face="Tahoma" size="1" color="#FFFFFF"><i><b><?php 
$domain = GetHostByName($REMOTE_ADDR);
echo "{$domain} @ Twisted Dreams";
?>
</b></i></font></div></td>
  </tr>
  </table>
コード例 #15
0
ファイル: pnAPI.php プロジェクト: danamyrocket/openemr
function pnMailHackAttempt($detecting_file = "(no filename available)", $detecting_line = "(no line number available)", $hack_type = "(no type given)", $message = "(no message given)")
{
    # Backwards compatibility fix with php 4.0.x and 4.1.x or greater Neo
    if (phpversion() >= "4.2.0") {
        $_pv = $_POST;
        $_gv = $_GET;
        $_rv = $_REQUEST;
        $_sv = $_SERVER;
        $_ev = $_ENV;
        $_cv = $_COOKIE;
        $_fv = $_FILES;
        $_snv = $_SESSION;
    } else {
        global $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS, $HTTP_COOKIE_VARS, $HTTP_POST_FILES, $HTTP_SESSION_VARS;
        $_pv = $HTTP_POST_VARS;
        $_gv = $HTTP_GET_VARS;
        $_rv = array();
        $_sv = $HTTP_SERVER_VARS;
        $_ev = $HTTP_ENV_VARS;
        $_cv = $HTTP_COOKIE_VARS;
        $_fv = $HTTP_POST_FILES;
        $_snv = $HTTP_SESSION_VARS;
    }
    $output = "Attention site admin of " . pnConfigGetVar('sitename') . ",\n";
    $output .= "On " . ml_ftime(_DATEBRIEF, GetUserTime(time()));
    $output .= " at " . ml_ftime(_TIMEBRIEF, GetUserTime(time()));
    $output .= " the Postnuke code has detected that somebody tried to" . " send information to your site that may have been intended" . " as a hack. Do not panic, it may be harmless: maybe this" . " detection was triggered by something you did! Anyway, it" . " was detected and blocked. \n";
    $output .= "The suspicious activity was recognized in {$detecting_file} " . "on line {$detecting_line}, and is of the type {$hack_type}. \n";
    $output .= "Additional information given by the code which detected this: " . $message;
    $output .= "\n\nBelow you will find a lot of information obtained about " . "this attempt, that may help you to find  what happened and " . "maybe who did it.\n\n";
    $output .= "\n=====================================\n";
    $output .= "Information about this user:\n";
    $output .= "=====================================\n";
    if (!pnUserLoggedIn()) {
        $output .= "This person is not logged in.\n";
    } else {
        $output .= "Postnuke username:  "******"\n" . "Registered email of this Postnuke user: "******"\n" . "Registered real name of this Postnuke user: "******"\n";
    }
    $output .= "IP numbers: [note: when you are dealing with a real cracker " . "these IP numbers might not be from the actual computer he is " . "working on]" . "\n\t IP according to HTTP_CLIENT_IP: " . getenv('HTTP_CLIENT_IP') . "\n\t IP according to REMOTE_ADDR: " . getenv('REMOTE_ADDR') . "\n\t IP according to GetHostByName(\$REMOTE_ADDR): " . GetHostByName($REMOTE_ADDR) . "\n\n";
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_REQUEST array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_rv)) {
        $output .= "REQUEST * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_GET array\n";
    $output .= "This is about variables that may have been ";
    $output .= "in the URL string or in a 'GET' type form.\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_gv)) {
        $output .= "GET * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_POST array\n";
    $output .= "This is about visible and invisible form elements.\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_pv)) {
        $output .= "POST * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Browser information\n";
    $output .= "=====================================\n";
    global $HTTP_USER_AGENT;
    $output .= "HTTP_USER_AGENT: " . $HTTP_USER_AGENT . "\n";
    $browser = (array) get_browser();
    while (list($key, $value) = each($browser)) {
        $output .= "BROWSER * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_SERVER array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_sv)) {
        $output .= "SERVER * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_ENV array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_ev)) {
        $output .= "ENV * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_COOKIE array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_cv)) {
        $output .= "COOKIE * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_FILES array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_fv)) {
        $output .= "FILES * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_SESSION array\n";
    $output .= "This is session info. The variables\n";
    $output .= "  starting with PNSV are PostNukeSessionVariables.\n";
    $output .= "=====================================\n";
    while (list($key, $value) = each($_snv)) {
        $output .= "SESSION * {$key} : {$value}\n";
    }
    $sitename = pnConfigGetVar('sitename');
    $adminmail = pnConfigGetVar('adminmail');
    $headers = "From: {$sitename} <{$adminmail}>\n" . "X-Priority: 1 (Highest)\n";
    pnMail($adminmail, 'Attempted hack on your site? (type: ' . $hack_type . ')', $output, $headers);
    return;
}
コード例 #16
0
ファイル: 1000000.php プロジェクト: carriercomm/jbs
                #-----------------------------------------------------------------------
                $Login = $Server['User'];
                $Password = $Server['Password'];
                #-----------------------------------------------------------------------
                break;
            case 'Plesk':
                #-----------------------------------------------------------------------
                $Login = $Server['User'];
                $Password = $Server['Password'];
                #-----------------------------------------------------------------------
                break;
            default:
                return ERROR | Trigger_Error(101);
        }
        #---------------------------------------------------------------------------
        $NewServerID = DB_Insert('HostingServers', array('SystemID' => $Server['System'], 'ServersGroupID' => $ServersGroupID, 'IsDefault' => $IsDefault, 'Address' => $Http['Host'], 'Port' => $Http['Port'], 'Protocol' => $Http['Protocol'], 'Url' => $Server['CpAddress'], 'Login' => $Login, 'Password' => $Password, 'IP' => GetHostByName($Http['Host'])));
        if (Is_Error($NewServerID)) {
            return ERROR | Trigger_Error(500);
        }
        #---------------------------------------------------------------------------
        $IsUpdate = DB_Update('HostingOrders', array('ServerID' => $NewServerID), array('Where' => SPrintF("`ServerID` = '%s'", $ServerID)));
        if (Is_Error($IsUpdate)) {
            return ERROR | Trigger_Error(500);
        }
        #---------------------------------------------------------------------------
        $IsDefault = 'no';
    }
}
#-------------------------------------------------------------------------------
return TRUE;
#-------------------------------------------------------------------------------
コード例 #17
0
function func_bardo_bankprocess($bank_shopId, $productdescription, $processing_currency, $reference_number, $surname, $name, $email, $address, $city, $zipcode, $abbrState, $abbrCountry, $phonenumber, $amount, $cardType, $CCnumber, $cardExpire, $cvv, $transaction_type, $transactionId, $cnn_connection)
{
    /*if($cardType=='M'){
    		$processing_currency="EUR";
    	}
    	else{
    		$processing_currency="USD";
    	}*/
    $cardexpire = split("/", $cardExpire);
    $yyyy = $cardexpire[0];
    $mm = $cardexpire[1];
    $domain = GetHostByName($_SERVER["REMOTE_ADDR"]);
    if ($bank_shopId == "") {
        $bank_shopId = "TELEGATE";
    }
    $pg_response_description = "";
    $pg_response_type = "";
    $pg_response_code = "";
    //$processing_currency="EUR";
    $productdescription = "Service";
    $output_transaction = "SHOP_ID={$bank_shopId}&";
    $output_transaction .= "CUSTOMER_IP={$domain}&";
    $output_transaction .= "PRODUCT_NAME={$productdescription}&";
    $output_transaction .= "LANGUAGE_CODE='ENG'&";
    $output_transaction .= "CURRENCY_CODE={$processing_currency}&";
    $output_transaction .= "SHOP_NUMBER={$transactionId}&";
    $output_transaction .= "CUSTOMER_LAST_NAME={$surname}&";
    $output_transaction .= "CUSTOMER_FIRST_NAME={$name}&";
    $output_transaction .= "CUSTOMER_EMAIL={$email}&";
    $output_transaction .= "CUSTOMER_ADDRESS={$address}&";
    $output_transaction .= "CUSTOMER_CITY={$city}&";
    $output_transaction .= "CUSTOMER_ZIP_CODE=\${$zipcode}&";
    $output_transaction .= "CUSTOMER_STATE={$abbrState}&";
    $output_transaction .= "CUSTOMER_COUNTRY={$abbrCountry}&";
    $output_transaction .= "CUSTOMER_PHONE={$phonenumber}&";
    $output_transaction .= "TRANSAC_AMOUNT={$amount}&";
    $output_transaction .= "CB_TYPE={$cardType}&";
    $output_transaction .= "CB_NUMBER={$CCnumber}&";
    $output_transaction .= "CB_MONTH={$mm}&";
    $output_transaction .= "CB_YEAR={$yyyy}&";
    $output_transaction .= "CB_CVC={$cvv}&";
    $output_transaction .= "TRANS_TYPE={$transaction_type}&";
    $output_transaction .= "3DS='NO'&";
    $output_transaction .= "endofdata&";
    // output url - i.e. the absolute url to the paymentsgateway.net script
    //$output_url = "https://www.paymentsgateway.net/cgi-bin/posttest.pl";
    // Uncomment below for live
    $output_url = "https://www.bardo-secured-transactions.com/cpe/receive.asp";
    // start output buffer to catch curl return data
    ob_start();
    // setup curl
    $ch = curl_init($output_url);
    // set curl to use verbose output
    curl_setopt($ch, CURLOPT_VERBOSE, 1);
    // set curl to use HTTP POST
    curl_setopt($ch, CURLOPT_POST, 1);
    // set POST output
    curl_setopt($ch, CURLOPT_POSTFIELDS, $output_transaction);
    //execute curl and return result to STDOUT
    curl_exec($ch);
    //close curl connection
    curl_close($ch);
    // set variable eq to output buffer
    $process_result = ob_get_contents();
    // close and clean output buffer
    ob_end_clean();
    // clean response data of whitespace, convert newline to ampersand for parse_str function and trim off endofdata
    $clean_data = str_replace("\n", "&", trim(str_replace("endofdata", "", trim($process_result))));
    sleep(10);
    // parse the string into variablename=variabledata
    parse_str($clean_data);
    $selectBankUpdates = "Select * from cs_bardo where shop_number = {$transactionId}";
    if (!($run_Select_Qry = mysql_query($selectBankUpdates))) {
        dieLog(mysql_errno() . ": " . mysql_error() . "<BR>");
    }
    $str_status = "";
    $str_decline_reason = "";
    if (mysql_num_rows($run_Select_Qry) != 0) {
        $pg_response_type = mysql_result($run_Select_Qry, 0, 7);
        $pg_response_description = $str_status == "S" ? "Success" : mysql_result($run_Select_Qry, 0, 4);
    }
    //echo "Response Data ".$clean_data;
    // output some of the variables
    //echo "Response Type = ".$pg_response_type."<br />";
    //echo "Response Code = ".$pg_response_code."<br />";
    //echo "Response Description = ".$pg_response_description."<br />";
    $trans_response = $pg_response_type . "-" . $pg_response_description;
    return $trans_response;
}
コード例 #18
0
<?php

require_once 'visitors_connections.php';
//the file with connection code and functions
//get the required data
$visitor_ip = GetHostByName($_SERVER['REMOTE_ADDR']);
$visitor_browser = getBrowserType();
$visitor_hour = date("h");
$visitor_minute = date("i");
$visitor_day = date("d");
$visitor_month = date("m");
$visitor_year = date("Y");
if (isset($_SERVER['HTTP_REFERER'])) {
    $visitor_refferer = GetHostByName($_SERVER['HTTP_REFERER']);
} else {
    $visitor_refferer = "";
}
$visited_page = selfURL();
//write the required data to database
mysql_select_db($database_visitors, $visitors);
$sql = "INSERT INTO visitors_table (visitor_ip, visitor_browser, visitor_hour,\n visitor_minute, visitor_date, visitor_day, visitor_month, visitor_year, \n visitor_refferer, visitor_page) VALUES ('{$visitor_ip}', '{$visitor_browser}', \n '{$visitor_hour}', '{$visitor_minute}', CURRENT_TIMESTAMP, '{$visitor_day}', '{$visitor_month}', \n '{$visitor_year}', '{$visitor_refferer}', '{$visited_page}')";
$result = mysql_query($sql) or trigger_error(mysql_error(), E_USER_ERROR);
コード例 #19
0
 function insert()
 {
     $error = "OK";
     $this->load->library('image_lib');
     $file = $_FILES["image"];
     // validate
     if ($file["name"] == "") {
         return "<p>Selecciona una foto antes de picarle al boton! =/</p>";
     }
     if ($this->input->post("title") == "" || $this->input->post("title") == "Titulo de la foto") {
         return "<p>Olvidaste ponerle un titulo a la foto</p>";
     }
     if ($this->input->post("location") == "" || $this->input->post("location") == "Lugar donde fue tomada") {
         return "<p>Necesitas decirnos donde tomaste esta foto!</p>";
     }
     $preview = generateRandomString(7);
     $config['image_library'] = 'gd2';
     $config['source_image'] = $file["tmp_name"];
     $config['create_thumb'] = TRUE;
     $config['maintain_ratio'] = TRUE;
     $config['width'] = 800;
     $config['height'] = 500;
     $config['new_image'] = "public/uploaded/" . $preview . ".jpg";
     $config['thumb_marker'] = '';
     $this->image_lib->clear();
     $this->image_lib->initialize($config);
     if (!$this->image_lib->resize()) {
         return $this->image_lib->display_errors();
     }
     $config['width'] = 120;
     $config['height'] = 120;
     $config['new_image'] = "public/uploaded/small/" . $preview . ".jpg";
     $this->image_lib->clear();
     $this->image_lib->initialize($config);
     if (!$this->image_lib->resize()) {
         return $this->image_lib->display_errors();
     }
     $data = array('name' => $this->input->post("name"), 'location' => $this->input->post("location"), 'title' => $this->input->post("title"), 'userid' => $this->input->post("userid"), 'image' => $preview, 'created' => time(), 'ip' => GetHostByName($_SERVER['REMOTE_ADDR']), 'active' => 1);
     // saving original image
     move_uploaded_file($file["tmp_name"], "public/uploaded/originals/" . $preview . ".jpg");
     $this->db->insert("entries", $data);
     return $error;
 }
コード例 #20
0
include_once "config.php";
include_once "function-library.php";
?>
<html>
<head>
<title></title>
    <link rel="stylesheet" href="<?php 
echo "http://" . $site_url . "/";
?>
styles.css" type="text/css">
</head>

<body style="margin-top:5px;margin-bottom:0px;margin-right:0px;margin-left:0px;background-color:transparent;">
<?php 
if (strlen($password) > 4) {
    $userip = GetHostByName($REMOTE_ADDR);
    $add_pass = mysql_query("UPDATE images SET password = '******' WHERE id = " . $im . " AND originalip = '" . $userip . "' LIMIT 1");
    if ($add_pass) {
        echo "<b>Password set!</b>";
    } else {
        echo "<b>ERROR: Could not set password, please contact support.</b>";
    }
} else {
    echo "<b>Optional: Specify A Password:</b><br>Restrict access to this image by requesting a password for anyone attempting to view it.<br>";
    echo "<table width='100%' cellpadding='3' cellspacing='0' style='margin-top:6px;'><form method='POST' action='set-pass.php'><tr><td width='65'>Password:</td><td><input name='password' value='' type='password' style='font-size:10px;'>&nbsp;&nbsp;<input name='submit' type='submit' value='set' style='font-size:10px;'></td></tr><input name='im' type='hidden' value='" . $im . "'></form></table>";
}
?>

</body>
</html>
コード例 #21
0
 function doLog($action, $uid = '')
 {
     $logData = array('uid' => $uid != '' ? $uid : $this->session->userdata('uid') != "" ? $this->session->userdata('uid') : '-1', 'action' => $action, 'ipaddress' => $_SERVER['REMOTE_ADDR'], 'iphostname' => GetHostByName($_SERVER['REMOTE_ADDR']), 'iplocal' => isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '', 'useragent' => $this->input->user_agent());
     $this->db->insert('log_usage', $logData);
 }
コード例 #22
0
ファイル: ovoa.class.php プロジェクト: qinquanxing/huaxia
 function Get_fullurl($kid)
 {
     switch ($kid) {
         case 1:
             //获取域名或主机地址 #localhost
             $fullurl = $_SERVER['HTTP_HOST'];
             break;
         case 2:
             //获取网页地址 #/ovov/ovovtesturl.php
             $fullurl = $_SERVER['PHP_SELF'];
             break;
         case 3:
             //获取网址参数 #id=5
             $fullurl = $_SERVER["QUERY_STRING"];
             break;
         case 4:
             //获取用户代理
             $fullurl = $_SERVER['HTTP_REFERER'];
             break;
         case 5:
             //获取完整的url #http://localhost/ovov/ovovtesturl.php?id=5
             $fullurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
             $fullurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
             break;
         case 6:
             //包含端口号的完整url #http://localhost:80/ovov/ovovtesturl.php?id=5
             $fullurl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
             break;
         case 7:
             //只取路径 #http://localhost/ovov
             $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["REQUEST_URI"];
             $fullurl = dirname($url);
             break;
         case 8:
             //获取服务器IP
             $fullurl = GetHostByName($_SERVER['SERVER_NAME']);
             break;
         default:
             $fullurl = $_SERVER['HTTP_HOST'];
             break;
     }
     return $fullurl;
 }
コード例 #23
0
   
        <br/> 
        <?php 
dialogbegin('服务器网络信息');
?>
     <!--   对话框标题   -->
            <table border="0">
                <tr><td>服务器地址:</td><td><?php 
echo $_SERVER["HTTP_HOST"];
?>
 端口:<?php 
echo $_SERVER['SERVER_PORT'];
?>
</td></tr>
                <tr><td>客户机IP地址:</td><td><?php 
echo GetHostByName($_SERVER['REMOTE_ADDR']);
?>
</td></tr>
                <tr><td>服务器用户域:</td><td><?php 
echo $_SERVER['USERDOMAIN'] == "" ? "服务器没有设置Windows域" : $_SERVER['USERDOMAIN'];
?>
</td></tr>
            </table>
        <?php 
dialogend('FC-System Computer Inc');
?>
   
        <br/>
        <center>This System Designed by <a href="http://www.fcsys.us/">FC-System Computer Inc</a></center>
    </form>
</center></body>
コード例 #24
0
$_SESSION["gw_id"] = $gw_info['gw_id'];
$_SESSION["gw_template"] = $gw_info['gw_template'];
$_SESSION["gw_links"] = $gw_info['gw_links'];
$_SESSION["gw_folder"] = $gw_info['gw_folder'];
$_SESSION["gw_index"] = $gw_info['gw_index'];
$_SESSION["gw_title"] = $gw_info['gw_title'];
$_SESSION["gw_emails_sales"] = $gw_info['gw_emails_sales'];
$_SESSION['td_product_id'] = $td_product_id;
$_SESSION['mt_reference_id'] = $reference_id;
//$_SESSION['mt_transaction_type'] = $trans_type;
$_SESSION['mt_subAccount'] = $mt_subAccount;
$_SESSION['mt_prod_desc'] = $mt_prod_desc;
$_SESSION['mt_prod_price'] = $mt_prod_price;
$_SESSION['mt_etel900_subAccount'] = $mt_etel900_subAccount;
$_SESSION['integration_mode'] = "Test";
$ipaddress = GetHostByName($_SERVER["REMOTE_ADDR"]);
$_SESSION['ipaddress'] = $ipaddress;
$smarty->compile_check = true;
$smarty->debugging = false;
$curtemplate = $_SESSION['gw_template'];
$smarty->template_dir = $etel_root_path . "/tmpl/" . $curtemplate . "/";
$smarty->compile_dir = $etel_root_path . "/tmpl/" . $curtemplate . "_c/";
$smarty->config_dir = $etel_root_path . "/tmpl/" . $curtemplate . "/config/";
$smarty->assign("rootdir", $etel_domain_path);
$smarty->assign("tempdir", $etel_domain_path . "/tmpl/" . $curtemplate . "/");
$smarty->assign("GET", $_GET);
if (!$testmode) {
    $_SESSION['integration_mode'] = "Live";
} else {
    $_SESSION['integration_mode'] = "Test";
}
コード例 #25
0
 private function getServiceInfo()
 {
     $service['service_name'] = php_uname('s');
     //服务器系统名称
     $service['service'] = $_SERVER['SERVER_SOFTWARE'];
     //服务器版本
     $service['zend'] = 'Zend ' . Zend_Version();
     //zend版本号
     $service['ip'] = GetHostByName($_SERVER['SERVER_NAME']);
     //服务器ip
     $service['mysql'] = mysql_get_server_info();
     $service['filesize'] = ini_get("upload_max_filesize");
     $this->assign('service', $service);
 }
コード例 #26
0
function xtcMailHackAttempt($detecting_file = "(no filename available)", $detecting_line = "(no line number available)", $hack_type = "(no type given)", $message = "(no message given)")
{
    $output = "Attention site admin of " . STORE_NAME . ",\n";
    $output .= "On " . @strftime(DATE_FORMAT_LONG);
    $output .= " at " . @strftime(DATE_TIME_FORMAT_SHORT);
    $output .= " the xt:C System has detected that somebody tried to" . " send information to your site that may have been intended" . " as a hack. Do not panic, it may be harmless: maybe this" . " detection was triggered by something you did! Anyway, it" . " was detected and blocked. \n";
    $output .= "The suspicious activity was recognized in {$detecting_file} " . "on line {$detecting_line}, and is of the type {$hack_type}. \n";
    $output .= "Additional information given by the code which detected this: " . $message;
    $output .= "\n\nBelow you will find a lot of information obtained about " . "this attempt, that may help you to find  what happened and " . "maybe who did it.\n\n";
    $output .= "\n=====================================\n";
    $output .= "Information about this user:\n";
    $output .= "=====================================\n";
    if (!isset($_SESSION['customer_id'])) {
        $output .= "This person is not logged in.\n";
    } else {
        $output .= "This person is logged in!!\n Customers ID =" . $_SESSION['customer_id'];
    }
    $output .= "IP numbers: [note: when you are dealing with a real cracker " . "these IP numbers might not be from the actual computer he is " . "working on]" . "\n\t IP according to HTTP_CLIENT_IP: " . $_SERVER['HTTP_CLIENT_IP'] . "\n\t IP according to REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "\n\t IP according to GetHostByName(" . $_SERVER['REMOTE_ADDR'] . "): " . @GetHostByName($_SERVER['REMOTE_ADDR']) . "\n\n";
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_REQUEST array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_REQUEST)) {
        $output .= "REQUEST * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_GET array\n";
    $output .= "This is about variables that may have been ";
    $output .= "in the URL string or in a 'GET' type form.\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_GET)) {
        $output .= "GET * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_POST array\n";
    $output .= "This is about visible and invisible form elements.\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_POST)) {
        $output .= "POST * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Browser information\n";
    $output .= "=====================================\n";
    $output .= "HTTP_USER_AGENT: " . $_SERVER['HTTP_USER_AGENT'] . "\n";
    $browser = (array) @get_browser();
    while (list($key, $value) = @each($browser)) {
        $output .= "BROWSER * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_SERVER array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_SERVER)) {
        $output .= "SERVER * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_ENV array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_ENV)) {
        $output .= "ENV * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_COOKIE array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_COOKIE)) {
        $output .= "COOKIE * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_FILES array\n";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_FILES)) {
        $output .= "FILES * {$key} : {$value}\n";
    }
    $output .= "\n=====================================\n";
    $output .= "Information in the \$_SESSION array\n";
    $output .= "This is session info.";
    $output .= "=====================================\n";
    while (list($key, $value) = @each($_SESSION)) {
        $output .= "SESSION * {$key} : {$value}\n";
    }
    xtc_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, EMAIL_SUPPORT_FORWARDING_STRING, EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', 'Attempted hack on your site? (type: ' . $message . ')', nl2br($output), $output);
    return;
}
コード例 #27
0
ファイル: index.php プロジェクト: bzboy/LyHNIMS
,Zend:<?php 
echo Zend_Version();
?>
</p>
                    </div>
                    <div class="list-group-item">
                        <h4 class="list-group-item-heading">数据库</h4>
                        <p class="list-group-item-text">MySql:<?php 
echo (new yii\db\Query())->select('VERSION()')->one()['VERSION()'];
?>
</p>
                    </div>
                    <div class="list-group-item">
                        <h4 class="list-group-item-heading">服务器</h4>
                        <p class="list-group-item-text">服务器IP:<?php 
echo GetHostByName($_SERVER['SERVER_NAME']);
?>
</p>
                        <p class="list-group-item-text">程序目录:<?php 
echo Yii::$app->BasePath;
?>
</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="box col-md-4">
        <div class="box-inner  homepage-box">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-user"></i>程序信息</h2>
コード例 #28
0
ファイル: template.php プロジェクト: sahartak/v1poject
function page_header($showbuttons=1){
    if (array_get($_SESSION['admin'], 'is_logged') == 1) {
        $PageTitle = getLang('atitle_logged');
    } else {
        $PageTitle = getLang('atitle_notlogged');
    }

    echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>'.$PageTitle.'</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="robots" content="NOINDEX,NOFOLLOW" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="content-language" content="en" />
<meta name="language" content="en" />';
    
    if(array_get($_SESSION['admin'], 'is_logged') == true) {
    echo '
<link href="../themes/smoothness/jquery-ui-1.7.2.custom.css" media="all" rel="stylesheet" type="text/css" />
<link href="../css/validationEngine.jquery.css" media="all" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../js/underscore-min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script type="text/javascript">

var AJAX_URL = "' . $_SERVER['REQUEST_URI'] . '";
    
jQuery(document).ready(function($){
    var $tabs = $("#tabs").tabs({
        select: function(event, ui){
            var url = $.data(ui.tab, "load.tabs");
            var tabid = ui.panel.id;
            
            if(url) {
                location.href = url;
                return false;
            }
       	
           	return true;
        }
    });

    $("#tabs").tabs("select", '.($_SESSION['admin']['selected_tab']+0).');
    $("div.TabsHolder").show();

    $("#Tab0, #Tab1, #Tab2, #Tab3, #Tab5, #Tab6, #Tab7, #Tab10").click(function() {
        location.href = $(this).attr("rel");
        return false;
    });

    $("#expiry_date, #trade_date, #tr_date, #user_app_date, #date_value").datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: "yy-mm-dd"
    });
});
</script>';
    }
    echo '
<link href="css/styles.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
</head>
	
<body>
<div class="wrapper">';
    if(array_get($_SESSION['admin'], 'is_logged') == true) {
    	$mailsToSend='';
    	$db=new DBConnection();
    	if($showbuttons==1) {
	    $query='SELECT COUNT(*) AS total_mails FROM mail_queue WHERE is_sent=0';
	    $res=$db->rq($query);
	    $row=$db->fetch($res);
	    if($row['total_mails']>0){
            $mailsToSend=' ('.$row['total_mails'].')';
        }

	    $usersActive='';
	    $usersPending='';
	    $usersDisabled='';
	    $usersTrades0='';
	    $usersTrades1='';
	    $usersTrades2='';
        
	    $query='SELECT COUNT(*) AS total_num FROM users WHERE user_status=1';
	    $res=$db->rq($query);
	    $row=$db->fetch($res);
	    if($row['total_num']>0){
            $usersActive=' ('.$row['total_num'].')';
        }

	    $query='SELECT COUNT(*) AS total_num FROM users WHERE user_status=2';
	    $res=$db->rq($query);
	    $row=$db->fetch($res);
	    if($row['total_num']>0){
            $usersPending=' ('.$row['total_num'].')';
        }

	    $query='SELECT COUNT(*) AS total_num FROM users WHERE user_status=3';
	    $res=$db->rq($query);
	    $row=$db->fetch($res);
	    if($row['total_num']>0){
            $usersDisabled=' ('.$row['total_num'].')';
        }

	    $query='SELECT COUNT(trades_id) AS total_num FROM users
	    LEFT JOIN trades ON users.user_account_num=trades.user_account_num
	    GROUP BY users.user_account_num
	    HAVING total_num>=2';
	    $res=$db->rq($query);
	    $num_rows=$db->num_rows($res);
	    if($num_rows>0){
            $usersTrades2=' ('.$num_rows.')';
        }

	    $query='SELECT COUNT(trades_id) AS total_num FROM users
	    LEFT JOIN trades ON users.user_account_num=trades.user_account_num
	    GROUP BY users.user_account_num
	    HAVING total_num=1';
	    $res=$db->rq($query);
	    $num_rows=$db->num_rows($res);
	    if($num_rows>0){
            $usersTrades1=' ('.$num_rows.')';
        }

	    $query='SELECT COUNT(trades_id) AS total_num FROM users
	    LEFT JOIN trades ON users.user_account_num=trades.user_account_num
	    GROUP BY users.user_account_num
	    HAVING total_num=0';
	    $res=$db->rq($query);
	    $num_rows=$db->num_rows($res);
	    if($num_rows>0){
            $usersTrades0=' ('.$num_rows.')';
        }
        
        $adminType = array_get($_SESSION['admin'], 'type');

	echo '
    <div class="TabsHolder">
	<div id="tabs">
	    <ul>
		<li><a href="#TC-10" id="Tab0" rel="users.php?view=active">Accounts</a></li>
		<li><a href="#TC-50" id="Tab1" rel="trades.php">Option Trades</a></li>
		<li><a href="#TC-60" id="Tab2" rel="strades.php">Stock Trades</a></li>
		<li><a href="#TC-70" id="Tab3" rel="transfers.php">Transfers</a></li>
		<li><a href="#TC-65" id="Tab7" rel="stocks.php">Stock Management</a></li>
		<li' . ($adminType == 'owner' ? '' : ' style="display: none;"') . '><a href="#TC-80" id="Tab4">Back-end Settings</a></li>
		<li' . ($adminType == 'owner' ? '' : ' style="display: none;"') . '><a href="#TC-81" id="Tab8">Front-end Settings</a></li>
		<li><a href="#TC-85" id="Tab5" rel="users_advisors.php">Advisors</a></li>
		<li' . ($adminType == 'owner' ? '' : ' style="display: none;"') . '><a href="#TC-90" id="Tab6" rel="users_admins.php">Backend users</a></li>
		<li' . ($adminType == 'owner' ? '' : ' style="display: none;"') . '><a href="#TC-92" id="Tab9">Mails</a></li>
		<li><a href="#TC-93" id="Tab10" rel="logs_show.php">Logs</a></li>
		<li><a href="index.php?logout=true">Sign out</a></li>
	    </ul>
	
	    <div id="TC-10">
		<a href="users.php">List all</a> |
		<a href="users.php?action=new">Add new</a> |
		<a href="users.php?view=active">Active'.$usersActive.'</a> |
		<a href="users.php?view=disabled">Disabled'.$usersPending.'</a> |
		<a href="users.php?view=pending">Pending'.$usersDisabled.'</a> |
		<a href="users.php?view=trades2">2+ trades'.$usersTrades2.'</a> |
		<a href="users.php?view=trades1">1 trade'.$usersTrades1.'</a> |
		<a href="users.php?view=trades0">0 trades'.$usersTrades0.'</a>
	    </div>
			
	    <div id="TC-50">
		<a href="trades.php?action=new_buy">New BUY order</a> | 
		<a href="trades.php?action=list_open">New SELL order</a> | 
		<a href="trades.php">View all orders</a>
	    </div>
		
		<div id="TC-60">
		<a href="strades.php?action=new_buy">New BUY order</a> | 
		<a href="strades.php?action=list_open">New SELL order</a> | 
		<a href="strades.php?action=new_short">New SHORT order</a> | 
		<a href="strades.php?action=new_cover">New COVER order</a> | 
		<a href="strades.php">View all orders</a>
		</div>
		
		<div id="TC-65">
		<a href="stocks.php?action=new_value">Add New Values</a> | 
		<a href="stocks.php?action=list_dates">Edit Values</a> | 
		<a href="stocks_edit.php">Edit All Values</a> | 
		<a href="stocks.php?action=new_stock">Add New Stock</a> | 
		<a href="stocks.php">List all stocks</a> | 
		<a href="stocks.php?action=force_update">Force Update Values</a>
		</div>
			
	    <div id="TC-70">
		<a href="transfers.php?action=new_deposit">Add new Deposit</a> | 
		<a href="transfers.php?action=new_withdraw">Add new Withdraw</a> | 
		<a href="transfers.php">View all transfers</a>
	    </div>
		
	    <div id="TC-85">
		<a href="users_advisors.php">List all</a> | 
		<a href="users_advisors.php?action=new">Add new</a>
	    </div>
	    
	    <div id="TC-93">
			<a href="logs_show.php">Overview</a> 
	    </div>';
    
    if ($adminType == 'owner') {
        echo '
            <div id="TC-80">
                <a href="settings_css.php">CSS Styles</a> | 
                <a href="settings_translations.php">Translations</a> |
                <a href="commodities.php">Commodities</a> | 
                <a href="commodities_groups.php">Commodities - groups</a> | 
                <a href="expiry_dates.php">Commodities - exp. dates</a> |
                <a href="settings_pdf.php">PDF Settings</a> |
                <a href="pdf_templates.php">PDF Templates</a>
            </div>

            <div id="TC-81">
                <a href="settings_header_front.php">Custom Header</a> | 
                <a href="settings_footer_front.php">Custom Footer</a> | 
                <a href="settings_css_front.php">CSS Styles</a> | 
                <a href="settings_translations_front.php">Translations</a> |
                <a href="settings_deposit_text.php">Deposit\'s Text</a> |
                <a href="settings_other.php">Other settings</a> 
            </div>
            
            <div id="TC-90">
                <a href="users_admins.php">List all</a> | 
                <a href="users_admins.php?action=new">Add new</a>
            </div>

            <div id="TC-92">
                <a href="mails_smtp_settings.php">Mail Settings</a> | 
                <a href="mails_templates.php">Templates</a> |
                <a href="mails_assigns.php">Mail Assigns</a> |  
                <a href="mails_mass.php">Mass mail</a> | 
                <a href="mails_outbox.php">Outbox Queue'.$mailsToSend.'</a>
            </div>
        ';
    }
    
    echo '
	</div>
    </div>';
    
    	}
	echo '
    <div class="MainContainer">';
    }else{
	$db=new DBConnection();

	$UserIP=GetHostByName($_SERVER["REMOTE_ADDR"]);
	$query='SELECT banned_ips_id FROM banned_ips WHERE banned_ip="'.$UserIP.'" LIMIT 1';
	$res=$db->rq($query);
	$num_rows=$db->num_rows($res);
	$db->close();
	if($num_rows>0) {
	    echo '<div class="LoginContainer"><h3>'.getLang('lform_publicbanmessage').'</h3></div>';
	}else{
	    echo '
	<div class="LoginContainer">
	    <h3>'.getLang('aform_title').'</h3>
	    '.((array_get($_GET, 'error') == 1)?'<div class="errorsHolder">Invalid username or password</div>':'').'
	    <form name="login_form" method="post">
		<div style="float:left;">
		    <div class="labels">'.getLang('lform_username').':</div><br />
		    <div class="labels">'.getLang('lform_password').':</div>
		</div>

		<div style="float:left;">
		    <input type="text" name="l_username" class="tinputs"><br />
		    <input type="password" name="l_password" class="tinputs">
		</div>
        
        <input type="hidden" id="nonce" name="nonce" value="'. ulNonce::Create('login') .'" />

		<br />
		<input type="submit" name="_login" class="submitBtn" value="'.getLang('lform_submitbtn').'">
	    </form>';
	}
    }
}
コード例 #29
0
ファイル: cheque.php プロジェクト: juliogallardo1326/proc
/*$i_to_year = substr($str_return_date,0,4);
$i_to_month = substr($str_return_date,5,2);
$i_to_day = substr($str_return_date,8,2); */
$str_from_date = $i_from_year . "-" . $i_from_month . "-" . $i_from_day;
$str_to_date = $i_to_year . "-" . $i_to_month . "-" . $i_to_day;
if ($tran_login_type == "tele") {
    $str_return_date = date("Y m d H:i", mktime(0, 0, 0, $i_to_month, $i_to_day + 1, $i_to_year));
    $i_to_year = substr($str_return_date, 0, 4);
    $i_to_month = substr($str_return_date, 5, 2);
    $i_to_day = substr($str_return_date, 8, 2);
}
$dateToEnter = func_get_current_date_time();
//EST Time.
//$dateToEnter="$yyyy-$mm-$dd $hr:$mn:$tt";
// $dateToEnter1="$yyyy-$mm-$dd";
$domain = GetHostByName($_SERVER["REMOTE_ADDR"]);
?>
<script language="javascript" src="scripts/general.js"></script>
<script language="javascript">
function showDetails(the_sub){
	/*if(the_sub =="div1" ){
	  if(document.getElementById(the_sub).style.display=="") {
	  	document.chequeFrm.statusdiv1.value="";
	 	document.getElementById(the_sub).style.display = "none";
		return false;
  	  } else {
		document.chequeFrm.statusdiv1.value=true;
		document.getElementById(the_sub).style.display = "";
	  }
	} else if(the_sub =="div2" ){
	  if(document.getElementById(the_sub).style.display=="") {
コード例 #30
0
ファイル: helpers.php プロジェクト: SourceCode/php-helpers
/**
 * (macro) ReverseDNSLookup
 * Performs a reverse lookup on an IP Address.
 *
 * @param ip                The IP address.
 */
function ReverseDNSLookup($ip)
{
    // get hostname and ip
    $hostname = GetHostByAddr($ip);
    $hostip = GetHostByName($hostname);
    // return result
    return array('hostname' => $hostname, 'hostip' => $hostip, 'sourceip' => $ip, 'match' => $ip == $hostip);
}