コード例 #1
0
ファイル: install.php プロジェクト: ircoco/BlackCatCMS
 *   @link            http://blackcat-cms.org
 *   @license         http://www.gnu.org/licenses/gpl.html
 *   @category        CAT_Modules
 *   @package         menu_link
 *
 */
if (defined('CAT_PATH')) {
    include CAT_PATH . '/framework/class.secure.php';
} else {
    $root = "../";
    $level = 1;
    while ($level < 10 && !file_exists($root . '/framework/class.secure.php')) {
        $root .= "../";
        $level += 1;
    }
    if (file_exists($root . '/framework/class.secure.php')) {
        include $root . '/framework/class.secure.php';
    } else {
        trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
    }
}
$table = CAT_TABLE_PREFIX . "mod_menu_link";
// $database->query("DROP TABLE IF EXISTS `$table`");
$database->query("\n\tCREATE TABLE IF NOT EXISTS `{$table}` (\n\t\t`section_id` INT(11) NOT NULL DEFAULT '0',\n\t\t`page_id` INT(11) NOT NULL DEFAULT '0',\n\t\t`target_page_id` INT(11) NOT NULL DEFAULT '0',\n\t\t`redirect_type` INT NOT NULL DEFAULT '302',\n\t\t`anchor` VARCHAR(255) NOT NULL DEFAULT '0' ,\n\t\t`extern` VARCHAR(255) NOT NULL DEFAULT '' ,\n\t\tPRIMARY KEY (`section_id`)\n\t)\n");
// add files to class_secure
$addons_helper = new CAT_Helper_Addons();
foreach (array('save.php') as $file) {
    if (false === $addons_helper->sec_register_file('menu_link', $file)) {
        error_log("Unable to register file -{$file}-!");
    }
}
コード例 #2
0
ファイル: install.php プロジェクト: ircoco/BlackCatCMS
 *
 *   @author          Black Cat Development
 *   @copyright       2013, Black Cat Development
 *   @link            http://blackcat-cms.org
 *   @license         http://www.gnu.org/licenses/gpl.html
 *   @category        CAT_Modules
 *   @package         bcversion_widget
 *
 */
if (defined('CAT_PATH')) {
    include CAT_PATH . '/framework/class.secure.php';
} else {
    $root = "../";
    $level = 1;
    while ($level < 10 && !file_exists($root . '/framework/class.secure.php')) {
        $root .= "../";
        $level += 1;
    }
    if (file_exists($root . '/framework/class.secure.php')) {
        include $root . '/framework/class.secure.php';
    } else {
        trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
    }
}
// add files to class_secure
$addons_helper = new CAT_Helper_Addons();
foreach (array('widgets/logs.php') as $file) {
    if (false === $addons_helper->sec_register_file('blackcat', $file)) {
        error_log("Unable to register file -{$file}-!");
    }
}
コード例 #3
0
ファイル: upgrade.php プロジェクト: ircoco/BlackCatCMS
 * @copyright       2010-2011 LEPTON Project 
 * @link            http://www.LEPTON-cms.org
 * @license         http://www.gnu.org/licenses/gpl.html
 * @license_terms   please see info.php of this module
 *
 *
 */
// include class.secure.php to protect this file and the whole CMS!
if (defined('CAT_PATH')) {
    include CAT_PATH . '/framework/class.secure.php';
} else {
    $root = "../";
    $level = 1;
    while ($level < 10 && !file_exists($root . '/framework/class.secure.php')) {
        $root .= "../";
        $level += 1;
    }
    if (file_exists($root . '/framework/class.secure.php')) {
        include $root . '/framework/class.secure.php';
    } else {
        trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
    }
}
// end include class.secure.php
// add files to class_secure
$addons_helper = new CAT_Helper_Addons();
foreach (array('save.php') as $file) {
    if (false === $addons_helper->sec_register_file('wysiwyg', $file)) {
        error_log("Unable to register file -{$file}-!");
    }
}
コード例 #4
0
ファイル: install.php プロジェクト: ircoco/BlackCatCMS
 *   @link            http://blackcat-cms.org
 *   @license         http://www.gnu.org/licenses/gpl.html
 *   @category        CAT_Modules
 *   @package         wrapper
 *
 */
if (defined('CAT_PATH')) {
    include CAT_PATH . '/framework/class.secure.php';
} else {
    $root = "../";
    $level = 1;
    while ($level < 10 && !file_exists($root . '/framework/class.secure.php')) {
        $root .= "../";
        $level += 1;
    }
    if (file_exists($root . '/framework/class.secure.php')) {
        include $root . '/framework/class.secure.php';
    } else {
        trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
    }
}
// Create table
$mod_wrapper = 'CREATE TABLE IF NOT EXISTS `' . CAT_TABLE_PREFIX . 'mod_wrapper` (' . ' `section_id` INT NOT NULL DEFAULT \'0\',' . ' `page_id` INT NOT NULL DEFAULT \'0\',' . ' `url` TEXT NULL,' . ' `height` VARCHAR(50) NOT NULL DEFAULT \'400px\',' . ' `width` VARCHAR(50) NOT NULL DEFAULT \'100%\',' . ' `wtype` VARCHAR(50) NOT NULL DEFAULT \'object\',' . ' PRIMARY KEY ( `section_id` ) ' . ' )';
$database->query($mod_wrapper);
// add files to class_secure
$addons_helper = new CAT_Helper_Addons();
foreach (array('save.php') as $file) {
    if (false === $addons_helper->sec_register_file('wrapper', $file)) {
        error_log("Unable to register file -{$file}-!");
    }
}