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


PHP General::multi_unserialize方法代码示例

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


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

示例1: multi_unserialize

 /**
  * unserialize rekursiv
  *
  * @param Array | String $array
  * @return Array
  */
 function multi_unserialize($array)
 {
     if (!is_array($array)) {
         return $array;
     }
     foreach ($array as $key => $value) {
         if (is_array($value)) {
             $array[$key] = General::multi_unserialize($value);
         } elseif (strpos($value, '{') && strpos($value, ':')) {
             $array[$key] = General::multi_unserialize(unserialize($value));
         } else {
             $array[$key] = $value;
         }
     }
     return $array;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:22,代码来源:General.php

示例2: group_table_update

 function group_table_update()
 {
     $this->existent_groups = General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `{$this->groups_table}`"));
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:4,代码来源:Gruppen.php

示例3: existent_groups

 function existent_groups()
 {
     return General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `{$this->groups_table}` ORDER BY `Name`"));
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:4,代码来源:NaviEdit.php

示例4: check_login

 function check_login(&$system)
 {
     if (!isset($_SESSION)) {
         session_start();
     }
     if (isset($_GET['logout'])) {
         if ($_GET['logout'] == '') {
             $_GET['logout'] = $_SESSION['RheinaufCMS_User']['Anrede'] . ' ' . $_SESSION['RheinaufCMS_User']['Name'];
         }
         unset($_SESSION['RheinaufCMS_User']);
         setcookie('RheinaufCMS_user', false, time() - 3600, '/');
     }
     if ($_SESSION['RheinaufCMS_User']) {
         $system->user = $_SESSION['RheinaufCMS_User'];
         $system->valid_user = true;
         return true;
     }
     $user = General::input_clean($_POST['user']);
     $pass = General::input_clean($_POST['pass']);
     $a = array();
     foreach ($system->user_tables as $t) {
         $sql = "SELECT * FROM `{$t}` WHERE `Login`='{$user}' AND `Password`='{$pass}'";
         $result = $system->connection->db_single_row($sql);
         if ($result) {
             break;
         }
     }
     if ($user && $pass && $result['Login'] == $user && $result['Password'] == $pass && $_SESSION['uuid'] == $_POST['uuid']) {
         $_SESSION['RheinaufCMS_User'] = $system->user = General::multi_unserialize($result);
         $_SESSION['RheinaufCMS_User']['user_found_in'] = $t;
         setcookie('RheinaufCMS_user', $user, 0, '/');
         $system->connection->db_update($t, array('last_login' => Date::now()), "id = '" . $result['id'] . "'");
         if (isset($_SESSION['RheinaufCMS_User'])) {
             $system->rechte = array();
             if ($_SESSION['RheinaufCMS_User']['Group'] == 'dev') {
                 $rechte = $system->connection->db_assoc("SELECT * FROM `RheinaufCMS>Rechte`");
                 for ($i = 0; $i < count($rechte); $i++) {
                     $system->rechte[] = $rechte[$i]['id'];
                 }
                 $_SESSION['RheinaufCMS_User']['allowed_actions'] = $system->rechte;
             } else {
                 $rechte = General::multi_unserialize($system->connection->db_single_row("SELECT * FROM `RheinaufCMS>Groups` WHERE `Name` ='" . $_SESSION['RheinaufCMS_User']['Group'] . "'"));
                 $_SESSION['RheinaufCMS_User']['allowed_actions'] = $system->rechte = $rechte['Rechte'];
             }
         }
         unset($_SESSION['uuid']);
         $system->valid_user = true;
         return true;
     } else {
     }
     return false;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:52,代码来源:Login.php

示例5: frontend_install

 function frontend_install($module)
 {
     $this->navi = General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `RheinaufCMS>Navi`"));
     $name = rawurldecode($module);
     if (!isset($_GET['newrubrik'])) {
         $return = Html::p('Bitte wählen Sie unter welcher Rubrik diese Modul eingeordnet werden soll.');
         for ($i = 0; $i < count($this->navi); $i++) {
             $return .= Html::div(Html::a('/Admin/Module?newrubrik=' . $i . '&amp;newfrontend=' . $module, $this->navi[$i]['Rubrik']));
         }
         $return .= Html::div(Html::a('/Admin/Module?newrubrik=' . $i . '&amp;newfrontend=' . $module, $this->images['plus'] . ' Neue Rubrik'));
         $this->return = $return;
         return;
     } else {
         if ($_GET['newrubrik'] == count($this->navi)) {
             $this->new_rubrik_create($name, count($this->navi));
         } else {
             $this->new_page_create($name, $_GET['newrubrik']);
         }
     }
     include_once INSTALL_PATH . '/Module/' . $module . '.php';
     $id = count($this->frontend_installed);
     $class = new $module($this->connection, $this->path_information);
     if (method_exists($class, 'install') && !$extern) {
         $class->install();
     }
     $this->connection->db_query("INSERT INTO `RheinaufCMS>Module` \t( `id` , `Name`)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES  ('{$id}', '{$module}')");
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:27,代码来源:Module.php

示例6: check_login

 function check_login()
 {
     if (!isset($_SESSION)) {
         session_start();
     }
     $user = General::input_clean($_POST['user']);
     $pass = General::input_clean($_POST['pass']);
     $result = $this->connection->db_assoc("SELECT * FROM `{$this->user_table}` WHERE `Name`='{$user}' AND `Password`='{$pass}'");
     if ($result[0]['Name'] == $user && $result[0]['Password'] == $pass) {
         $_SESSION['RheinaufCMS_User'] = General::multi_unserialize($result[0]);
         setcookie('RheinaufCMS_user', $user, 0, '/');
         if (isset($_SESSION['RheinaufCMS_User'])) {
             $this->rechte = array();
             if ($_SESSION['RheinaufCMS_User']['Group'] == 'dev') {
                 $rechte = $this->connection->db_assoc("SELECT * FROM `{$this->rechte_table}`");
                 for ($i = 0; $i < count($rechte); $i++) {
                     $this->rechte[] = $rechte[$i]['id'];
                 }
                 $_SESSION['RheinaufCMS_User']['allowed_actions'] = $this->rechte;
             } else {
                 $this->rechte = General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `{$this->groups_table}` WHERE `Name` ='" . $_SESSION['RheinaufCMS_User']['Group'] . "'"));
                 $_SESSION['RheinaufCMS_User']['allowed_actions'] = $this->rechte[0]['Rechte'];
             }
         }
         return true;
     } else {
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:29,代码来源:RheinaufCMS.php


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