Example #1
0
function gettemplate($templatename)
{
    //OpenGame .. $skinname = 'FinalWars'
    global $ugamela_root_path;
    $filename = $ugamela_root_path . TEMPLATE_DIR . TEMPLATE_NAME . '/' . $templatename . ".tpl";
    return ReadFromFile($filename);
}
Example #2
0
function gettemplate($templatename)
{
    global $xnova_root_path;
    $filename = $xnova_root_path . TEMPLATE_DIR . TEMPLATE_NAME . '/' . $templatename . ".tpl";
    return ReadFromFile($filename);
}
Example #3
0
function getTemplate($templateName)
{
    $filename = TEMPLATE_DIR . '/' . TEMPLATE_NAME . "/{$templateName}.tpl";
    return ReadFromFile($filename);
}
Example #4
0
function gettemplate($templatename)
{
    $filename = XNOVA_ROOT_PATH . TEMPLATE_DIR . TEMPLATE_NAME . '/' . $templatename . ".tpl";
    return ReadFromFile($filename);
}
Example #5
0
function gettemplate($templatename, $is_phpbb = false)
{
    $templatename .= '.tpl';
    if ($is_phpbb) {
        $template = new template();
        $template->set_custom_template(TEMPLATE_DIR, TEMPLATE_NAME);
        $template->set_filenames(array('body' => $templatename));
        return $template;
    } else {
        return ReadFromFile(TEMPLATE_DIR . '/' . $templatename);
    }
}
Example #6
0
     $sql = str_replace("\r\n", "\n", $sql);
     $sql = str_replace("{{prefix}}", $prefix, $sql);
     $sql = str_replace("{{cookies}}", $cookies, $sql);
     //Log
     $handle = @fopen("./install/sql.log", 'w');
     @fwrite($handle, $sql);
     @fclose($handle);
     //Sepparate statements
     $q = explode(";\n", $sql);
     unset($q[sizeof($q) - 1]);
     //Update database
     foreach ($q as $query) {
         mysql_query($query) or die('5-' . mysql_error());
     }
     //Update the config1.php file
     $config = ReadFromFile('./game/config1.php');
     //Update config
     $config = str_replace("{{~databaseprefix~}}", $prefix, $config);
     $config = str_replace("{{~cookiename~}}", $cookies, $config);
     //Write to file
     $handle = @fopen("./game/config1.php", 'w') or die("3");
     fwrite($handle, $config);
     fclose($handle);
     //Update status
     $handle = @fopen('./status', 'w') or die("6");
     fwrite($handle, 'INSTALLED');
     fclose($handle);
     die('0');
     break;
 case "paysys_setup":
     //Open the config file