当前位置: 首页>>代码示例>>PHP>>正文


PHP db_Skt::connect方法代码示例

本文整理汇总了PHP中CmsDev\sql\db_Skt::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP db_Skt::connect方法的具体用法?PHP db_Skt::connect怎么用?PHP db_Skt::connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CmsDev\sql\db_Skt的用法示例。


在下文中一共展示了db_Skt::connect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ValidateNameExistAndClean

 public static function ValidateNameExistAndClean($string)
 {
     $UserName = new \CmsDev\util\CheckUserName();
     $stringValid = $UserName->Fix($string);
     $SKTDB = \CmsDev\Sql\db_Skt::connect();
     $user = $SKTDB->get_row("SELECT username FROM users WHERE username = " . \GetSQLValueString($stringValid, 'text') . "");
     if ($user) {
         return 'exist';
     } else {
         return $stringValid;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:12,代码来源:UserName_ValidateName.php

示例2: Render

 private function Render()
 {
     $SKTDB = SKT_DB\db_Skt::connect();
     $Language = \THIS_LANG;
     $query = $SKTDB->get_results("SELECT ID,LanguageName,Prefix,URL,SID,Hidden FROM language WHERE Hidden='0' ORDER BY LanguageName ASC");
     $counter = $SKTDB->get_var("SELECT count(ID) FROM language");
     self::connect($query, $counter);
     self::set_Language($Language);
     if ($this->counter > 1) {
         $Render = $this->Nav_Sub_Items_Before;
         foreach ($this->query as $Item) {
             if ($this->Language == $Item->Prefix) {
                 $active = ' class="' . $this->Nav_Class_Item_Selected . '"';
             } else {
                 $active = '';
             }
             $preitem = $this->item_model;
             $item = str_replace('[LanguageName]', $Item->LanguageName, $preitem);
             $item = str_replace('[URL]', SKT_URL_BASE . $Item->Prefix . '/', $item);
             $item = str_replace('[Prefix]', $Item->Prefix, $item);
             $item = str_replace('[activeLang]', $active, $item);
             if ($Item->Hidden == 0) {
                 $Render .= $item;
             }
         }
         $Render .= $this->Nav_Sub_Items_After;
     }
     return $Render;
 }
开发者ID:neruruguay,项目名称:neru,代码行数:29,代码来源:LanguageMenu.php

示例3: __construct

 private function __construct()
 {
     $SKT = SKTGLOBALS::getVar('SKT');
     $SKTDB = SKTDB\db_Skt::connect();
     $Request = new \CmsDev\Url\Request();
     $URLName = $Request->byLevel(0);
     $RequestReverse = new \CmsDev\Url\Request();
     $RequestReverse->reverse(false);
     $testLanguage = $RequestReverse->byLevel(0);
     $LanguageArray = $SKT['LANGUAGE']['LIST'];
     if (in_array($testLanguage, $LanguageArray)) {
         $Language = $testLanguage;
     } else {
         $Language = \LANGUAGE_DEF;
     }
     if (\SKT_SECTION_PID != '') {
         $ProductsValues = $SKTDB->query("SELECT * FROM " . \DB_PREFIX . "products WHERE ProductID = '" . \SKT_SECTION_PID . "'");
     }
     $SKTDB->query("SELECT * FROM " . \DB_PREFIX . "products WHERE UID != '0' LIMIT 1");
     $query = $SKTDB->get_col_info();
     if ($ProductsValues) {
         foreach ($query as $name) {
             $this->{$name} = $ProductsValues->{$name};
         }
     } else {
         foreach ($query as $name) {
             $this->{$name} = '';
         }
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:30,代码来源:DataSet.php

示例4: getTableEdit

 public static function getTableEdit()
 {
     $SKTDB = \CmsDev\Sql\db_Skt::connect();
     $Language = \CmsDev\Language\CheckLanguage::get();
     $query = $SKTDB->get_row("SELECT AdminParams FROM language WHERE Prefix = '" . $Language . "'");
     if ($query->AdminParams != '') {
         $params = json_decode($query->AdminParams, true);
         if (is_array($params)) {
             $HTML = '<table><tr><td>Parametro</td><td>Valor</td></tr>';
             foreach ($params as $variable => $value) {
                 if (!is_array($value)) {
                     $HTML .= '<tr><td>SKT_ADMIN_' . $variable . '</td><td>' . $value . '</td></tr>';
                 } else {
                     $NewvalueToArray = \json_encode($value);
                     $HTML .= '<tr><td>SKT_ADMIN_' . $variable . '</td><td>' . $NewvalueToArray . '</td></tr>';
                 }
             }
             $HTML .= '</table>';
             return $HTML;
         } else {
             $ErrorMessageBox = "Error al cargar las variables de sistema en CmsDev\\Language\\getParams(). Puede existir un json mal formado. Verifique la tabla de lenguaje o consulte al Administrador.";
             $MessageBox = SKT_INFO\Asistance::get();
             $MessageBox->TipError($ErrorMessageBox, true);
             //
             //$AdminParams=substr($query->AdminParams,strrpos($query->AdminParams,"\"")-200,200);
             //echo "<pre>".$AdminParams."</pre>";
         }
     } else {
         self::setParamsFromFile();
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:31,代码来源:AdminGlosary.php

示例5: __construct

 private function __construct()
 {
     if (!defined('DB_PREFIX')) {
         define('DB_PREFIX', 'default_');
     }
     $SKT = SKTGLOBALS::getVar('SKT');
     $SKTDB = SKTDB\db_Skt::connect();
     $SectionValues = '';
     $ParentSectionValues = '';
     $Parent_2_SectionValues = '';
     $Parent_3_SectionValues = '';
     $Parent_4_SectionValues = '';
     $Parent_5_SectionValues = '';
     // new \_TemplateSite\clean\Config();
     // sections //  ID 	Title 	URLName 	SID 	RecycleBin 	SystemRequired 	Language 	Template 	Order
     $SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE URLName = '" . \SKTURL_Here . "'");
     if (isset($SectionValues->SID) && $SectionValues->SID != '') {
         $ParentSectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE ID = '{$SectionValues->SID}'");
         if (isset($ParentSectionValues->SID) && $ParentSectionValues->SID != '') {
             $Parent_2_SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE ID = '{$ParentSectionValues->SID}'");
             if (isset($Parent_2_SectionValues->SID) && $Parent_2_SectionValues->SID != '') {
                 $Parent_3_SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE ID = '{$Parent_2_SectionValues->SID}'");
                 if (isset($Parent_3_SectionValues->SID) && $Parent_3_SectionValues->SID != '') {
                     $Parent_4_SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE ID = '{$Parent_3_SectionValues->SID}'");
                     if (isset($Parent_4_SectionValues->SID) && $Parent_4_SectionValues->SID != '') {
                         $Parent_5_SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE ID = '{$Parent_4_SectionValues->SID}'");
                     }
                 }
             }
         }
     }
     if (!$SectionValues) {
         $SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE Language = '" . \SKT_ThisLaguage . "' AND SID = '0' ");
         if (!$SectionValues) {
             $SectionValues = $SKTDB->get_row("SELECT * FROM " . \DB_PREFIX . "sections WHERE SID = '0' AND Language = '" . \SKT_ThisLaguage . "'");
         }
         if (\SKTURL_Here != '' && \SKTURL_Here != trim(\SKTURL_REQUEST_URI, '/') && !\in_array(\SKTURL_Here, $SKT['LANGUAGE']['LIST']) && !\in_array(\SKTURL_Here, $SKT['SITE']['RESTRICTED_URL'])) {
             if (!defined("error")) {
                 define('error', 'error404');
             }
         }
     }
     $IDSections = $SectionValues->ID;
     $_SESSION['SessionURLSection'] = $SKTDB->get_var("SELECT URLName FROM " . \DB_PREFIX . "sections WHERE ID = '{$IDSections}'");
     if (!defined("SectionHidden")) {
         define('SectionHidden', $SectionValues->RecycleBin);
     }
     $SKTDB->query("SELECT * FROM " . \DB_PREFIX . "sections WHERE SID = '0'");
     $query = $SKTDB->get_col_info();
     foreach ($query as $name) {
         $this->{$name} = $SectionValues->{$name};
     }
     $this->ParentSectionValues = $ParentSectionValues;
     $this->Parent_2_SectionValues = $Parent_2_SectionValues;
     $this->Parent_3_SectionValues = $Parent_3_SectionValues;
     $this->Parent_4_SectionValues = $Parent_4_SectionValues;
     $this->Parent_5_SectionValues = $Parent_5_SectionValues;
 }
开发者ID:neruruguay,项目名称:neru,代码行数:58,代码来源:Section.php

示例6: getQuery

 public static function getQuery($param = null)
 {
     /* @var $param type */
     if ($param) {
         $SKTDB = \CmsDev\sql\db_Skt::connect();
         $QUERY = "CREATE TABLE `lists` (`ID` int(11) NOT NULL, `ListName` varchar(100) CHARACTER SET latin1 COLLATE latin1_spanish_ci NOT NULL) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;\r\n                        TRUNCATE TABLE `lists`;\r\n                        INSERT INTO `lists` (`ID`, `ListName`) VALUES (29, 'Demo'),(28, 'Inmuebles');\r\n                        ALTER TABLE `lists` ADD PRIMARY KEY (`ID`);\r\n                        ALTER TABLE `lists` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=30;";
         $insertLink = $SKTDB->query($QUERY);
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:9,代码来源:schema.php

示例7: foreach

 function __construct()
 {
     $SKTDB = \CmsDev\Sql\db_Skt::connect();
     $categories = $SKTDB->get_results("SELECT * FROM " . \DB_PREFIX . "categories");
     foreach ($categories as $Category) {
         $ListNames[$Category->category_id] = $Category->category_name;
     }
     self::$names = $ListNames;
 }
开发者ID:neruruguay,项目名称:neru,代码行数:9,代码来源:Categories.php

示例8: validateMD5

 private function validateMD5($MD5 = 0)
 {
     $SKTDB = SKT_DB::connect();
     $user = $SKTDB->get_row("SELECT * FROM users WHERE md5 = " . \GetSQLValueString($MD5, 'text') . "");
     if ($user) {
         $updateSectionImage = mysql_query(sprintf("UPDATE users Set \r\n\t\t\t\t\t\t\tisactive = %s\r\n\t\t\t\t\t\t\tWHERE md5 = %s", GetSQLValueString(1, "int"), GetSQLValueString($MD5, "text")));
         return true;
     } else {
         $MessageBox = SKT_INFO\Asistance::get();
         $MessageBox->TipError('No se pudo validar el usuario.<br>' . $MD5, true);
         return false;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:13,代码来源:ValidateUserNew.php

示例9: setParamsFromFile

 private static function setParamsFromFile()
 {
     $SKTDB = \CmsDev\Sql\db_Skt::connect();
     $query = $SKTDB->get_results("SELECT * FROM language ORDER BY LanguageName ASC");
     global $SKT;
     foreach ($query as $language) {
         include 'site/' . $language->Prefix . '.php';
         $Setparams = $SKTDB->query(\sprintf("UPDATE language Set SiteParams = %s\r\n\t\tWHERE ID = %s", GetSQLValueString(json_encode($SKT), "text"), GetSQLValueString($language->ID, "int")));
         //$MessageBox = SKT_INFO\Asistance::get();
         //$MessageBox->TipOk('El archivo Language/site/' . $language->Prefix . '.php, fue cargado correctamente.', true);
     }
     //self::getParams();
 }
开发者ID:neruruguay,项目名称:neru,代码行数:13,代码来源:SiteGlosary.php

示例10: isset

 function __construct($user, $SERVER, $POST, $GET)
 {
     $SKTDB = \CmsDev\Sql\db_Skt::connect();
     $user = $user;
     $url = !empty($SERVER['HTTPS']) ? "https://" . $SERVER['SERVER_NAME'] . $SERVER['REQUEST_URI'] : "http://" . $SERVER['SERVER_NAME'] . $SERVER['REQUEST_URI'];
     $previousUrl = isset($SERVER['HTTP_REFERER']) ? $SERVER['HTTP_REFERER'] : '0';
     $postData = json_encode($POST);
     $now = date("Y-m-d H:i:s");
     $product = isset($GET['DetailID']) ? $GET['DetailID'] : '';
     $search = isset($GET['SearchQuery']) ? $GET['SearchQuery'] : '';
     $query = "INSERT INTO userstep" . "(user, previous_page, url_query_string, post_param, date_time, product, search )" . "VALUES (" . GetSQLValueString($user, 'int') . "," . GetSQLValueString($previousUrl, 'text') . "," . GetSQLValueString($url, 'text') . "," . GetSQLValueString($postData, 'text') . "," . GetSQLValueString($now, 'text') . "," . GetSQLValueString($product, 'int') . "," . GetSQLValueString($search, 'text') . ")";
     $insert = $SKTDB->query($query);
 }
开发者ID:neruruguay,项目名称:neru,代码行数:13,代码来源:history.php

示例11: UserQuery

 private static function UserQuery()
 {
     $SKTDB = SKT_DB::connect();
     $USER_EXIST = \CmsDev\Security\loginIntent::action('validateUser');
     if ($USER_EXIST === true) {
         $user_row = $SKTDB->get_row("SELECT *\r\n                    FROM users as user, userprofile as profile \r\n                    WHERE user.md5 = " . \GetSQLValueString($_SESSION['login'], 'text') . " AND profile.IDX = user.id ");
         if ($user_row) {
             return $user_row;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:15,代码来源:UserProfile.php

示例12: set

 public function set($PositionSelect = null, $SID = null)
 {
     if ($PositionSelect !== null && $SID !== null) {
         $randomID = 'Position' . \md5(\rand(1000, 99999));
         $SID = \GetSQLValueString($SID, 'int');
         $SKTDB = \CmsDev\Sql\db_Skt::connect();
         $total = $SKTDB->get_var("SELECT count(*) FROM " . \DB_PREFIX . "sections WHERE Language = '" . \THIS_LANG . "' AND SID = '{$SID}'");
         if (!isset($PositionSelect) or $PositionSelect == null) {
             $PositionSelect = 0;
         } elseif ($PositionSelect === 'max') {
             $PositionSelect = $total + 1;
         }
         $this->HTML .= '<input name="Position" id="' . $randomID . '" type="text" value="' . $PositionSelect . '" />';
         $this->HTML .= '<script type="text/javascript">';
         $this->HTML .= '$("#' . $randomID . '").spinner({step: 1,numberFormat: "n", min: 0, max: ' . ($total + 1) . '});';
         //$this->HTML .= 'alert("$total =' . $total . ' y $SID =' . $SID . ' y $PositionSelect =' . $PositionSelect . '");';
         $this->HTML .= '</script>';
         return $this->HTML;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:20,代码来源:List_Position_Section.php

示例13: level

 private function level($IDPage, $SID)
 {
     $SKTDB = \CmsDev\sql\db_Skt::connect();
     $Menu = $SKTDB->get_results("SELECT ID,Title,URLName,SID,Language FROM " . \DB_PREFIX . "sections WHERE SID = '" . $SID . "' ORDER BY Position ASC");
     if ($Menu) {
         $this->L++;
         foreach ($Menu as $Section) {
             if ($Section->ID === $IDPage) {
                 $selected = ' selected="selected"';
             } else {
                 $selected = '';
             }
             $this->HTML .= '<option value="' . $Section->ID . '" ' . $selected . ' class="L' . $this->L . '">&nbsp;&nbsp;&nbsp;&nbsp;' . utf8_encode($Section->URLName) . '</option>';
             if ($SKTDB->get_var("SELECT count(*) FROM " . DB_PREFIX . "sections WHERE SID = '" . $Section->ID . "'") > 0) {
                 $this->HTML .= self::level($IDPage, $Section->ID);
             }
         }
         $this->L = $this->L - 1;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:20,代码来源:ListParentPage.php

示例14: GetDataSet

 public function GetDataSet()
 {
     $SKTDB = SKT_DB::connect();
     $USER_EXIST = \CmsDev\Security\loginIntent::action('validateUser');
     if ($USER_EXIST === true) {
         $user_list = $SKTDB->get_row("SELECT *\r\n                    FROM users as user join userprofile as profile \r\n                    ON user.md5 = " . \GetSQLValueString($_SESSION['login'], 'int') . "\r\n                    WHERE user.id = profile.IDX \r\n            ");
         if ($user_list) {
             $this->user_list = $user_list;
             $this->UserOk = true;
         } else {
             $this->UserOk = false;
             $MessageBox = SKT_INFO\Asistance::get();
             $MessageBox->TipError(\SKT_ADMIN_User_max_attempts . \SKT_ADMIN_User_max_attempts_TXT, true);
         }
     } else {
         $this->UserOk = false;
         $MessageBox = SKT_INFO\Asistance::get();
         $MessageBox->TipError(\SKT_ADMIN_User_max_attempts . \SKT_ADMIN_User_max_attempts_TXT, true);
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:20,代码来源:UserProfile.php

示例15: set

 public static function set($PositionSelect = null, $IDPage = null, $Zone = 0)
 {
     if ($PositionSelect !== null && $IDPage !== null) {
         $rand = rand(2, 654);
         $Input = '<input name="Position" id="Position" class="Position' . $rand . ' form-control" type="text" value="[val]" />';
         $IDPage = \GetSQLValueString($IDPage, 'int');
         $Zone = \GetSQLValueString($Zone, 'int');
         $HTML = '';
         $SKTDB = \CmsDev\Sql\db_Skt::connect();
         $total = $SKTDB->get_var("SELECT count(*) FROM " . \DB_PREFIX . "content WHERE IDZone = '" . $Zone . "' AND IDPage = '{$IDPage}'");
         if (!isset($PositionSelect) or $PositionSelect == null) {
             $PositionSelect = 0;
         } elseif ($PositionSelect === -1) {
             $PositionSelect = $total + 1;
         }
         $HTML .= str_replace('[val]', $PositionSelect, $Input);
         $HTML .= '<script type="text/javascript">';
         $HTML .= '$(".Position' . $rand . '").spinner({step: 1,numberFormat: "n", min: 0, max: ' . ($total + 1) . '});';
         $HTML .= '</script>';
         return $HTML;
     }
 }
开发者ID:neruruguay,项目名称:neru,代码行数:22,代码来源:List_Position_Zone.php


注:本文中的CmsDev\sql\db_Skt::connect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。