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


PHP pathos_sessions_set函数代码示例

本文整理汇总了PHP中pathos_sessions_set函数的典型用法代码示例。如果您正苦于以下问题:PHP pathos_sessions_set函数的具体用法?PHP pathos_sessions_set怎么用?PHP pathos_sessions_set使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: unserialize

        }
        // Rank didn't change
        $image->rank = $_POST['rank'];
    } else {
        $image->rank = $_POST['rank'];
        $db->increment('imagegallery_image', 'rank', 1, "gallery_id=" . $image->gallery_id . " AND rank >= " . $_POST['rank'] . " AND rank < " . $image->rank);
    }
    $loc = unserialize($gallery->location_data);
    if (!isset($image->id)) {
        $dir = 'files/imagegallerymodule/' . $loc->src . '/gallery' . $gallery->id;
        $file = file::update('file', $dir, null);
        if (is_object($file)) {
            $image->file_id = $db->insertObject($file, 'file');
        } else {
            // If file::update() returns a non-object, it should be a string.  That string is the error message.
            $post = $_POST;
            $post['_formError'] = $file;
            pathos_sessions_set('last_POST', $post);
            header('Location: ' . $_SERVER['HTTP_REFERER']);
        }
    }
    if (isset($image->id)) {
        $db->updateObject($image, 'imagegallery_image');
    } else {
        $image->posted = time();
        $db->insertObject($image, "imagegallery_image");
    }
    pathos_flow_redirect();
} else {
    echo SITE_403_HTML;
}
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:save_image.php

示例2: update

 function update($values, $object)
 {
     if (isset($values['_db_config'])) {
         pathos_lang_loadDictionary('config', 'database');
         // Test configuration, and return NULL if it doesn't work.
         if (preg_match('/[^A-Za-z0-9]/', $values['db_table_prefix'])) {
             $post = $values;
             $post['_formError'] = TR_CONFIG_DATABASE_ERROR_BADPREFIX . '<br />';
             pathos_sessions_set('last_POST', $post);
             return null;
         }
         $linkdb = pathos_database_connect($values['db_user'], $values['db_pass'], $values['db_host'] . ':' . $values['db_port'], $values['db_name'], $values['db_engine'], true);
         $linkdb->prefix = $values['db_table_prefix'] . '_';
         if (!$linkdb->isValid()) {
             $post = $values;
             $post['_formError'] = TR_CONFIG_DATABASE_ERROR_CANTCONNECT . '<br />';
             pathos_sessions_set('last_POST', $post);
             return null;
         }
         $status = $linkdb->testPrivileges();
         $failed = false;
         $errors = '';
         foreach ($status as $type => $flag) {
             if (!$flag) {
                 $failed = true;
                 $errors .= sprintf(TR_CONFIG_DATABASE_ERROR_PERMDENIED, $type) . '<br />';
             }
         }
         if ($failed) {
             $post = $values;
             $post['_formError'] = $errors;
             pathos_sessions_set('last_POST', $post);
             return null;
         }
     }
     $object->name = $values['name'];
     $object->core_id = $values['core_id'];
     if (!isset($object->id)) {
         $object->path = $values['path'];
         if ($object->path[0] != '/') {
             $object->path = '/' . $object->path;
         }
         if (substr($object->path, -1, 1) != '/') {
             $object->path = $object->path . '/';
         }
         $object->relpath = $values['relpath'];
         if ($object->relpath[0] != '/') {
             $object->relpath = '/' . $object->relpath;
         }
         if (substr($object->relpath, -1, 1) != '/') {
             $object->relpath = $object->relpath . '/';
         }
         $object->host = $values['host'];
         if (substr($object->host, 0, 7) != 'http://' && substr($object->host, 0, 8) != 'https://') {
             $object->host = 'http://' . $object->host;
         }
         if (substr($object->host, -1, 1) == '/') {
             $object->host = substr($object->host, 0, -1);
         }
     }
     return $object;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:62,代码来源:sharedcore_site.php

示例3: or

# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Exponent is distributed in the hope that it
# will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU
# General Public License along with Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: theme_preview.php,v 1.5 2005/02/19 00:32:28 filetreefrog Exp $
##################################################
// Part of the Extensions category
if (!defined('PATHOS')) {
    exit('');
}
if (pathos_permissions_check('extensions', pathos_core_makeLocation('administrationmodule'))) {
    pathos_sessions_set('display_theme', $_GET['theme']);
    pathos_flow_redirect();
} else {
    echo SITE_403_HTML;
}
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:theme_preview.php

示例4: echoFailure

    }
    echo '</td></tr>';
}
function echoFailure($msg = "")
{
    echo '<span class="failed">Failed</span>';
    if ($msg != "") {
        echo " : {$msg}";
    }
    echo '</td></tr>';
}
function isAllGood($str)
{
    return !preg_match("/[^A-Za-z0-9]/", $str);
}
pathos_sessions_set("installer_config", $_POST['c']);
$config = $_POST['c'];
$passed = true;
if (!isAllGood($config["db_table_prefix"])) {
    echoFailure("Invalid table prefix.  The table prefix can only contain alphanumeric characters.");
    $passed = false;
}
if ($passed) {
    $db = pathos_database_connect($config['db_user'], $config['db_pass'], $config['db_host'], $config['db_name'], $config['db_engine'], 1);
    $db->prefix = $config['db_table_prefix'] . '_';
    $status = array();
    echoStart("Connecting to database:");
    if ($db->connection == null) {
        echoFailure($db->error());
        // BETTER ERROR CHECKING
        $passed = false;
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:dbcheck.php

示例5: exit

# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: extract.php,v 1.3 2005/04/18 15:23:54 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
$dest_dir = $_POST['dest_dir'];
$files = array();
if (!defined('SYS_FILES')) {
    require_once BASE . 'subsystems/files.php';
}
foreach (array_keys($_POST['mods']) as $mod) {
    $files[$mod] = array('', array());
    if (class_exists($mod)) {
        $files[$mod][0] = call_user_func(array($mod, 'name'));
    }
    foreach (array_keys(pathos_files_listFlat($dest_dir . '/files/' . $mod, 1, null, array(), $dest_dir . '/files/' . $mod . '/')) as $file) {
        $files[$mod][1][$file] = pathos_files_canCreate(BASE . 'files/' . $mod . '/' . $file);
    }
}
pathos_sessions_set('dest_dir', $dest_dir);
pathos_sessions_set('files_data', $files);
$template = new template('importer', '_files_verifyFiles');
$template->assign('files_data', $files);
$template->output();
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:extract.php


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