Beispiel #1
0
function pathos_flow_set($access_level, $url_type)
{
    global $SYS_FLOW_REDIRECTIONPATH;
    if ($access_level == SYS_FLOW_PUBLIC) {
        pathos_sessions_set($SYS_FLOW_REDIRECTIONPATH . '_flow_' . SYS_FLOW_PROTECTED . '_' . $url_type, 'http://' . HOSTNAME . $_SERVER['REQUEST_URI']);
        pathos_sessions_set($SYS_FLOW_REDIRECTIONPATH . '_flow_last_' . SYS_FLOW_PROTECTED, 'http://' . HOSTNAME . $_SERVER['REQUEST_URI']);
    }
    pathos_sessions_set($SYS_FLOW_REDIRECTIONPATH . '_flow_' . $access_level . '_' . $url_type, 'http://' . HOSTNAME . $_SERVER['REQUEST_URI']);
    pathos_sessions_set($SYS_FLOW_REDIRECTIONPATH . '_flow_last_' . $access_level, 'http://' . HOSTNAME . $_SERVER['REQUEST_URI']);
}
Beispiel #2
0
    if ($news != null) {
        $loc = unserialize($news->location_data);
        $iloc = pathos_core_makeLocation($loc->mod, $loc->src, $news->id);
    }
    $news->editor = $user->id;
    $news->edited = time();
} else {
    $news->posted = time();
    $news->poster = $user ? $user->id : 0;
}
if (isset($news->id) && pathos_permissions_check("edit_item", $loc) || !isset($news->id) && pathos_permissions_check("add_item", $loc) || $iloc != null && pathos_permissions_check("edit_item", $iloc)) {
    $news = newsitem::update($_POST, $news);
    if (!isset($news->id) && $db->countObjects('newsitem', "internal_name='" . $news->internal_name . "'")) {
        unset($_POST['internal_name']);
        $_POST['_formError'] = 'That Internal Name is already taken';
        pathos_sessions_set('last_POST', $_POST);
        header('Location: ' . $_SERVER['HTTP_REFERER']);
        exit('');
    }
    $news->location_data = serialize($loc);
    $channels = array();
    if (isset($_POST['channels'])) {
        $channels = array_flip($_POST['channels']);
    }
    if (!defined("SYS_WORKFLOW")) {
        require_once BASE . "subsystems/workflow.php";
    }
    pathos_workflow_post($news, "newsitem", $loc, $channels);
} else {
    echo SITE_403_HTML;
}
Beispiel #3
0
// After config config setup:
// Put session stuff first.
$user = null;
// Initialize the Sessions Subsystem
require_once BASE . 'subsystems/sessions.php';
// Initializes the session.  This will populate the $user variable
pathos_sessions_initialize();
if (!isset($_SERVER['QUERY_STRING'])) {
    $_SERVER['QUERY_STRING'] = '';
}
// Create a REQUEST_URI for people who don't have one.
// FIXME: Move this code (and other similar platform stuff) into a platform compat layer.
// FIXME:
$_SERVER['REQUEST_URI'] = SCRIPT_RELATIVE . SCRIPT_FILENAME . '?' . $_SERVER['QUERY_STRING'];
if (isset($_REQUEST['section'])) {
    pathos_sessions_set('last_section', $_REQUEST['section']);
}
if (!defined('DISPLAY_THEME')) {
    /* exdoc
     * The directory and class name of the current active theme.  This may be different
     * than the configure theme (DISPLAY_THEME_REAL) due to previewing.
     */
    define('DISPLAY_THEME', DISPLAY_THEME_REAL);
}
if (!defined('THEME_BASE')) {
    /* exdoc
     * The absolute path to the current active theme's files.  This is similar to the BASE constant.
     * This is deprecated beginning with 0.96 -- please use THEME_ABSOLUTE instead.
     * @state deprecated
     */
    define('THEME_BASE', BASE . 'themes/' . DISPLAY_THEME . '/');
Beispiel #4
0
function pathos_permissions_load($user)
{
    global $db, $pathos_permissions_r;
    // The $has_admin boolean will be flipped to true if the user has any administrate permission anywhere.
    // It will be used for figuring out the allowable UI levels.
    $has_admin = 0;
    // Clear the global permissions array;
    $pathos_permissions_r = array();
    if ($user == null) {
        // If the user is not logged in, they have no permissions.
        return;
    }
    if ($user->is_acting_admin == 0) {
        // Retrieve all of the explicit user permissions, by user id
        foreach ($db->selectObjects('userpermission', 'uid=' . $user->id) as $obj) {
            if ($obj->permission == 'administrate') {
                $has_admin = 1;
            }
            $pathos_permissions_r[$obj->module][$obj->source][$obj->internal][$obj->permission] = 1;
        }
        // Retrieve all of the implicit user permissions (by virtue of group membership).
        foreach ($db->selectObjects('groupmembership', 'member_id=' . $user->id) as $memb) {
            foreach ($db->selectObjects('grouppermission', 'gid=' . $memb->group_id) as $obj) {
                if ($obj->permission == 'administrate') {
                    $has_admin = 1;
                }
                $pathos_permissions_r[$obj->module][$obj->source][$obj->internal][$obj->permission] = 1;
            }
        }
        // Retrieve sectional admin status.
        // First, figure out what sections the user has permission to manage, through the navigationmodule permissions
        if (isset($pathos_permissions_r['navigationmodule']['']) && is_array($pathos_permissions_r['navigationmodule'][''])) {
            foreach ($pathos_permissions_r['navigationmodule'][''] as $id => $perm_data) {
                if ($perm_data['manage'] == 1) {
                    // The user is allowed to manage sections.
                    // Pull in all stuff for the section, using section ref.
                    $sectionrefs = $db->selectObjects('sectionref', 'is_original=1 AND section=' . $id);
                    foreach ($sectionrefs as $sref) {
                        $sloc = pathos_core_makeLocation($sref->module, $sref->source);
                        if (class_exists($sref->module)) {
                            // In business, the module exists
                            $perms = call_user_func(array($sref->module, 'permissions'));
                            if ($perms == null) {
                                $perms = array();
                            }
                            // For good measure, since some mods return no perms.
                            foreach ($perms as $perm => $name) {
                                $pathos_permissions_r[$sloc->mod][$sloc->src][''][$perm] = 1;
                            }
                        }
                    }
                }
            }
        }
    }
    pathos_sessions_set('permissions', $pathos_permissions_r);
    // Check perm stats for UI levels
    $ui_levels = array();
    if ($user->is_acting_admin == 1) {
        $ui_levels = array('Preview', 'Normal', 'Permission Management', 'Structure Management');
    } else {
        if (count($pathos_permissions_r)) {
            $ui_levels = array('Preview', 'Normal');
        }
        if ($has_admin) {
            $ui_levels[] = 'Permission Management';
        }
        if (isset($pathos_permissions_r['containermodule']) && count($pathos_permissions_r['containermodule'])) {
            $ui_levels[] = 'Structure Management';
        }
    }
    pathos_sessions_set('uilevels', $ui_levels);
}
Beispiel #5
0
    if ($section) {
        $old_parent = $section->parent;
        $check_id = $section->id;
    }
} else {
    $check_id = $_POST['parent'];
}
if ($check_id != -1 && pathos_permissions_check('manage', pathos_core_makeLocation('navigationmodule', '', $check_id))) {
    pathos_lang_loadDictionary('modules', 'navigationmodule');
    // Update the section from the _POST data.
    $section = section::updateInternalAlias($_POST, $section);
    if ($section->active == 0) {
        // User tried to link to an inactive section.  This makes little or no sense in
        // this context, so throw them back to the edit form, with an error message.
        $_POST['_formError'] = TR_NAVIGATIONMODULE_INTERNALLINKERR;
        pathos_sessions_set("last_POST", $_POST);
        header("Location: " . $_SERVER['HTTP_REFERER']);
        exit('Redirecting...');
    }
    if (isset($section->id)) {
        if ($section->parent != $old_parent) {
            // Old_parent id was different than the new parent id.  Need to decrement the ranks
            // of the old children (after ours), and then add
            $section = section::changeParent($section, $old_parent, $section->parent);
        }
        // Existing section.  Update the database record.
        // The 'id=x' WHERE clause is implicit with an updateObject
        $db->updateObject($section, 'section');
    } else {
        // Since this is new, we need to increment ranks, in case the user
        // added it in the middle of the level.
Beispiel #6
0
         switch ($_FILES["upload"]["error"]) {
             case UPLOAD_ERR_INI_SIZE:
             case UPLOAD_ERR_FORM_SIZE:
                 $post['_formError'] = "The file you attempted to upload is too large.  Contact your system administrator if this is a problem.";
                 break;
             case UPLOAD_ERR_PARTIAL:
                 $post['_formError'] = "The file was only partially uploaded.";
                 break;
             case UPLOAD_ERR_NO_FILE:
                 $post['_formError'] = "No file was uploaded.";
                 break;
             default:
                 $post['_formError'] = "A strange internal error has occured.  Please contact the Exponent Developers.";
                 break;
         }
         pathos_sessions_set("last_POST", $post);
         header("Location: " . $_SERVER['HTTP_REFERER']);
         exit("");
     }
 }
 $listing = listing::update($_POST, $listing);
 $listing->location_data = serialize($loc);
 if ($file != null) {
     $listing->file_id = $db->insertObject($file, 'file');
 } else {
     if (!isset($listing->id)) {
         $listing->file_id = 0;
     }
 }
 if (isset($listing->id)) {
     $db->updateObject($listing, "listing");
        }
        // 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;
}
 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;
 }
# 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;
}
Beispiel #10
0
        //user in pMachine database does not exist in Exponent user table
        $id_map[$pm_user->id] = $db->insertObject($new_user, "user");
    } else {
        //User is pMachine user table does match a user in Exponent user table
        //Value in $opt variable tells us how to deal with the conflict
        //Since only $opt value that requires action is 1, use if statement
        if ($opt == 1) {
            $id_map[$pm_user->id] = $exp_user->id;
            //Update Exponent user with data from pMachine user entry
            $db->updateObject($new_user, "user", "username = '******'");
        }
    }
}
//Gets url data from session
$url = $post['url_array'];
//Stores ID mapping array in session data
$post['id_map'] = $id_map;
//Store daa back into session variable
pathos_sessions_set("post", $post);
//User chose to import pMachine blog data
if ($post['blog_imp'] == 1) {
    //Goes to blog import page
    $url['page'] = "blog_conf";
    header("Location: " . pathos_core_makeLink($url));
    exit;
} else {
    //Goes to summary page
    $url['page'] = "done";
    header("Location: " . pathos_core_makeLink($url));
    exit;
}
Beispiel #11
0
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# 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: switch.php,v 1.4 2005/02/26 05:21:23 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
if ($user !== null) {
    pathos_sessions_set("uilevel", $_POST['level']);
    pathos_flow_redirect();
}
Beispiel #12
0
 function update($values, $object)
 {
     if ($values['identifier'] == "") {
         $post = $_POST;
         $post['_formError'] = "Identifier is required.";
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     pathos_forms_initialize();
     if ($object == null) {
         $object = new dropdowncontrol();
     }
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     $object->default = $values['default'];
     $object->items = listbuildercontrol::parseData($values, 'items', true);
     $object->size = intval($values['size']) <= 0 ? 1 : intval($values['size']);
     $object->required = isset($values['required']);
     return $object;
 }
    }
    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;
Beispiel #14
0
 function update($values, $object)
 {
     if ($object == null) {
         $object = new textcontrol();
     }
     if ($values['identifier'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_IDENTIFIER_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     $object->default = $values['default'];
     $object->size = intval($values['size']);
     $object->maxlength = intval($values['maxlength']);
     $object->required = isset($values['required']);
     return $object;
 }
Beispiel #15
0
define("SCRIPT_FILENAME", "edit_page.php");
ob_start();
require_once "../../../pathos.php";
if (!defined("SYS_THEME")) {
    require_once BASE . "subsystems/theme.php";
}
$id = -1;
if (isset($_GET['sitetemplate_id'])) {
    pathos_sessions_set("sitetemplate_id", $_GET['sitetemplate_id']);
    $id = $_GET['sitetemplate_id'];
} else {
    if (pathos_sessions_isset("sitetemplate_id")) {
        $id = pathos_sessions_get("sitetemplate_id");
    }
}
$template = $db->selectObject("section_template", "id=" . $id);
$page = $template && $template->subtheme != "" && is_readable(BASE . "themes/" . DISPLAY_THEME . "/subthemes/" . $template->subtheme . ".php") ? "themes/" . DISPLAY_THEME . "/subthemes/" . $template->subtheme . ".php" : "themes/" . DISPLAY_THEME . "/index.php";
pathos_sessions_set("themeopt_override", array("src_prefix" => "@st" . $id, "ignore_mods" => array("navigationmodule", "loginmodule"), "mainpage" => PATH_RELATIVE . "modules/navigationmodule/actions/edit_page.php", "backlinktext" => "Back to Template"));
#define("PREVIEW_READONLY",1);
$REDIRECTIONPATH = "section_template";
if ($user && $user->is_acting_admin == 1) {
    if (is_readable(BASE . $page)) {
        include_once BASE . $page;
    } else {
        echo BASE . "{$page} not readable";
    }
    pathos_sessions_unset("themeopt_override");
} else {
    echo SITE_403_HTML;
}
ob_end_flush();
Beispiel #16
0
 function update($values, $object)
 {
     if ($object == null) {
         $object = new checkboxcontrol();
     }
     if ($values['identifier'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_IDENTIFIER_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     $object->default = isset($values['default']);
     $object->flip = isset($values['flip']);
     return $object;
 }
Beispiel #17
0
 function update($values, $object)
 {
     if ($object == null) {
         $object = new radiogroupcontrol();
     }
     if ($values['identifier'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_IDENTIFIER_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     pathos_forms_initialize();
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     $object->default = $values['default'];
     $object->items = listbuildercontrol::parseData($values, 'items', true);
     $object->flip = isset($values['flip']);
     $object->cols = intval($values['cols']);
     $object->spacing = intval($values['spacing']);
     $object->required = isset($values['required']);
     return $object;
 }
Beispiel #18
0
 function update($values, $object)
 {
     if ($values['identifier'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_IDENTIFIER_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     return $object;
 }
Beispiel #19
0
# 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: captcha.php,v 1.6 2005/02/19 00:40:17 filetreefrog Exp $
##################################################
include_once dirname(realpath(__FILE__)) . '/pathos.php';
include_once dirname(realpath(__FILE__)) . '/subsystems/image.php';
$w = isset($_GET['w']) ? $_GET['w'] : 200;
$h = isset($_GET['h']) ? $_GET['h'] : 50;
$name = isset($_GET['name']) ? $_GET['name'] : 'capcha_string';
if (pathos_sessions_isset($name)) {
    $str = pathos_sessions_get($name);
} else {
    $str = strtoupper(substr(md5(rand()), 17, 6));
    pathos_sessions_set($name, $str);
}
$img = pathos_image_captcha($w, $h, $str);
if ($img) {
    $sizeinfo = array('mime' => 'image/png');
    ob_end_clean();
    pathos_image_output($img, $sizeinfo);
}
Beispiel #20
0
 function update($values, $object)
 {
     if ($object == null) {
         $object = new radiocontrol();
     }
     if ($values['groupname'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_GROUPNAME_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     $object->identifier = uniqid("");
     $object->groupname = $values['groupname'];
     $object->caption = $values['caption'];
     $object->default = isset($values['default']);
     $object->flip = isset($values['flip']);
     return $object;
 }
Beispiel #21
0
                $source_select['showmodules'] = null;
            } else {
                $source_select['showmodules'] = explode(',', $_REQUEST['showmodules']);
            }
        }
    } else {
        if (!isset($source_select['showmodules'])) {
            $source_select['showmodules'] = null;
        }
    }
    if (isset($_REQUEST['dest'])) {
        $source_select['dest'] = $_REQUEST['dest'];
    } else {
        if (!isset($source_select['dest'])) {
            $source_select['dest'] = null;
        }
    }
    if (isset($_REQUEST['hideOthers'])) {
        $source_select['hideOthers'] = $_REQUEST['hideOthers'];
    } else {
        if (!isset($source_select['hideOthers'])) {
            $source_select['hideOthers'] = 0;
        }
    }
    pathos_sessions_set('source_select', $source_select);
    // Include the rendering page.
    include_once BASE . $page;
} else {
    echo sprintf(TR_BASE_PAGENOTREADABLE, BASE . $page);
}
ob_end_flush();
# 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();
Beispiel #23
0
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: loginredirect.php,v 1.6 2005/03/28 19:02:19 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
ob_start();
if (isset($_GET['redirecturl'])) {
    $redirect = urldecode($_GET['redirecturl']);
    if (substr($redirect, 0, 4) != 'http') {
        $redirect = URL_FULL . $redirect;
    }
    pathos_sessions_set('redirecturl', $redirect);
}
//$SYS_FLOW_REDIRECTIONPATH = 'loginredirect';
pathos_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
if (pathos_sessions_loggedIn()) {
    header('Location: ' . pathos_sessions_get('redirecturl'));
    exit('Redirecting...');
}
loginmodule::show('Default', null, 'Log In');
$template = new template('loginmodule', '_login_redirect');
$template->assign('output', ob_get_contents());
ob_end_clean();
$template->output();
Beispiel #24
0
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# 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: normal.php,v 1.3 2005/02/19 00:32:35 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
$levels = pathos_sessions_get('uilevels');
pathos_sessions_set('uilevel', max(array_keys($levels)));
pathos_flow_redirect();
Beispiel #25
0
 function update($values, $object)
 {
     if ($object == null) {
         $object = new TimeControl();
         $object->default = 0;
         //This will force the control to always show the current time as default
     }
     if ($values['identifier'] == "") {
         pathos_lang_loadDictionary('standard', 'formcontrols');
         $post = $_POST;
         $post['_formError'] = TR_FORMCONTROLS_IDENTIFIER_REQUIRED;
         pathos_sessions_set("last_POST", $post);
         return null;
     }
     $object->identifier = $values['identifier'];
     $object->caption = $values['caption'];
     $object->showControl = isset($values['showControl']);
     return $object;
 }
Beispiel #26
0
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# 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: preview.php,v 1.3 2005/02/19 00:32:35 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
pathos_sessions_set("uilevel", 0);
pathos_flow_redirect();