本文整理汇总了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;
}
示例2: group_table_update
function group_table_update()
{
$this->existent_groups = General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `{$this->groups_table}`"));
}
示例3: existent_groups
function existent_groups()
{
return General::multi_unserialize($this->connection->db_assoc("SELECT * FROM `{$this->groups_table}` ORDER BY `Name`"));
}
示例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;
}
示例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 . '&newfrontend=' . $module, $this->navi[$i]['Rubrik']));
}
$return .= Html::div(Html::a('/Admin/Module?newrubrik=' . $i . '&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}')");
}
示例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;
}
}