Exemplo n.º 1
0
        if (isset($_REQUEST[$key])) {
            $_REQUEST[$key] = str_replace('\\"', '"', $_REQUEST[$key]);
            $out .= "\$label['{$key}']='" . $_REQUEST[$key] . "';\n";
        } else {
            $out .= "\$label['{$key}']='" . str_replace("'", "\\'", $label[$key]) . "';\n";
            // preserve the old label
        }
    }
    $out .= "?>\n";
    $handler = fopen(jB_get_lang_dir() . $lang_filename, "w");
    fputs($handler, $out);
    // load the new labels
    include jB_get_lang_dir() . $lang_filename;
    $dest_label = $label;
    // dest labels
    touch(jb_get_config_dir() . 'config.php');
    // update config.php timestamp.
}
?>

<h3>Jamit Job Board Language Translation tool.</h3>
<b>IMPORTANT:</b> Backup your language files before using this tool! This tool will overwrite any code in the target file with machine-generated code. Also, please wait until the page is fully loaded before saving.<br>
<?php 
if (!is_writeable(jB_get_lang_dir() . $lang_filename)) {
    $JBMarkup->error_msg("<b>Warning:</b></font> The file " . jB_get_lang_dir() . jb_escape_html($lang_filename) . " is not writable. You must give it write permissions for changes to take effect. You may set back to read-only permissions after saving changes.");
}
?>
<form method="POST" name="form1" action="translation_tool.php">


<div style="background-color: white; border: 2px solid #FF8000; padding:15px; margin:5px;">Caution: HTML tags are allowed in the input, eg. &lt;b&gt;example&lt;b&gt;<br>
Exemplo n.º 2
0
        require_once jb_basedirpath() . 'include/posts.inc.php';
    }
    JB_init_category_tables(0);
    JB_update_post_count();
    // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting
    JB_build_post_count();
    JB_cache_flush();
    $JBMarkup->ok_msg('Cache refreshed.');
}
echo "<p>&nbsp</p><div>";
JB_theme_check_compatibility();
if (JB_DEMO_MODE != 'YES') {
    if (JB_CRON_EMULATION_ENABLED == 'YES') {
        echo '<p><font color="maroon">- Attention: Cron Emulation - The system has detected that you have Cron Emulation enabled. Cron Emulation is intended for testing purposes and not recommended for live sites. Please go to <A href="edit_config.php#cron">Admin-&gt;Main Config</a> and see the Cron options</p></font>';
    }
    if (is_writable(jb_get_config_dir() . 'config.php')) {
        //echo "- config.php is writeable.<br>";
    } else {
        echo "<p><font color='maroon'>- config.php is not writable. Give write permissions to config.php if you want to save any changes</p></font>";
    }
    if (is_writable("../rss.xml")) {
        //echo "- rss.xml is writeable.";
    } else {
        echo "<p><font color='maroon'>- rss.xml is not writable! rss.xml must have write permissions.</font></p>";
    }
    if (file_exists(JB_basedirpath() . "admin/install.php")) {
        echo "<p><font color='maroon'>- Please delete install.php from the admin/ directory once the installation is complete.</font><p>";
    }
    if (strpos(ini_get('disable_functions'), 'fsockopen') !== false) {
        echo "<p><font color='maroon'>- Error! It appears that the fsockopen() function is disabled on this server. This means that some of the payment modules will not work, including PayPal, as they need fsockopen() to communicate with outside hosts for authentication purposes. </font><p>";
    }
Exemplo n.º 3
0
function JBPLUG_update_plugin_config($config = JB_PLUGIN_CONFIG)
{
    // $config must be serialized!
    if (JB_DEMO_MODE == 'YES') {
        return;
    }
    // load the config in
    if (!is_string($config)) {
        if (is_array($config)) {
            $config = serialize($config);
        } else {
            trigger_error('JBPLUG_update_plugin_config() should serialize the argument', E_USER_WARNING);
            return;
        }
    }
    $config_dir = jb_get_config_dir();
    $filename = $config_dir . "config.php";
    $handle = fopen($filename, "rb");
    $contents = fread($handle, filesize($filename));
    fclose($handle);
    $handle = fopen($filename, "w");
    $new_contents = JB_change_config_value($contents, 'JB_PLUGIN_CONFIG', $config);
    fwrite($handle, $new_contents, strlen($new_contents));
    fclose($handle);
}