Ejemplo n.º 1
0
function language_array()
{
    // Work-out we should check for existing page_code
    if (defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true) {
        global $database;
        include_once __DIR__ . '/lang.functions.php';
        include_once get_module_language_file(basename(dirname(__FILE__)));
        $aList = set_language_array(PAGE_ID);
    }
    return $aList;
}
 * 
 * You should have received a copy of the GNU General Public License
 * along with OutputFilter-Dashboard. If not, see <http://www.gnu.org/licenses/>.
 * 
 **/
// prevent this file from being accessed directly
if (!defined('WB_PATH')) {
    die(header('Location: ../index.php'));
}
// obtain module directory
$mod_dir = basename(dirname(__FILE__));
require WB_PATH . '/modules/' . $mod_dir . '/info.php';
// include module.functions.php
include_once WB_PATH . '/framework/module.functions.php';
// include the module language file depending on the backend language of the current user
if (!(include get_module_language_file($mod_dir))) {
    return;
}
// load outputfilter-functions
require_once dirname(__FILE__) . '/functions.php';
// obtain module directory
$mod_dir = basename(dirname(__FILE__));
require WB_PATH . '/modules/' . $mod_dir . '/info.php';
// include module.functions.php
include_once WB_PATH . '/framework/module.functions.php';
// load outputfilter-functions
require_once dirname(__FILE__) . "/functions.php";
opf_io_mkdir(__OPF_UPLOAD_DIRNAME);
opf_io_mkdir(WB_PATH . MEDIA_DIRECTORY . '/opf_plugins');
opf_io_unlink($mod_dir . '/debug_config.php');
opf_io_unlink($mod_dir . '/config_init.php');
Ejemplo n.º 3
0
<?php

//no direct file access
if (count(get_included_files()) == 1) {
    $z = "HTTP/1.0 404 Not Found";
    header($z);
    die($z);
}
// include_once('../../config.php');
$mod_path = dirname(__FILE__);
$mod_rel = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $mod_path));
$mod_name = basename($mod_path);
include 'lang.functions.php';
include get_module_language_file($mod_name);
// this function checks the basic configurations of an existing WB intallation
function status_msg($message, $class = 'check', $element = 'span')
{
    // returns a status message
    print '<' . $element . ' class="' . $class . '">' . $message . '</' . $element . '>';
}
/**********************************************************
 *  - Add field "page_code" to table "pages"
 */
print '<h3>Step 1: Updating database pages entrie</h3>';
$database->field_add(TABLE_PREFIX . 'pages', 'page_code', 'INT(11) NOT NULL AFTER `modified_by`');
print '<h3>Step 2: Updating field page_code with page_id by default language</h3>';
$lang_array = get_page_languages();
// check for page languages
if (count($lang_array)) {
    $entries = array();
    $entries = get_page_list(0);