Example #1
0
// Security...
if ($cms_mode == "false" && $cms_type != "standalone") {
    die('Security breach detected.');
}
// let's fix all of our variables.
// see "url.php" for details.
writeLogData("messages", "Index: Cleaning POST and GET variables");
$_GET = unurlize($_GET);
$_POST = unpostize($_POST);
writeLogData("messages", "Index: Checking theme settings");
// Now set up our backend; this is required for all Jinzora components.
writeLogData("messages", "Index: Including backend functions");
include_once $include_path . 'backend/backend.php';
include_once $include_path . 'frontend/display.php';
// reset our this_page in case we need to add some temporary variables (frontend, etc.)
$this_page = setThisPage();
writeLogData("messages", "Index: Checking for searching");
if (isset($_GET['doSearch'])) {
    $_GET['action'] = "search";
    if (isset($_GET['song_title'])) {
        $_GET['search_query'] = $_GET['song_title'];
    }
    if (!isset($_GET['search_type'])) {
        $_GET['search_type'] = "ALL";
    }
}
// copy the POST variables for a basic search to GET variables so we don't do it twice.
// just do a powersearch with post variables.
if (isset($_POST['doSearch'])) {
    $_GET['action'] = "search";
    $_GET['search_query'] = $_POST['search_query'];
Example #2
0
/**
 * Converts an associative array to a link.
 * Function can take 2 arrays and treats them both the same.
 * Useful if you have a set of variables that you use a lot
 * and another set you use only once or twice.
 * 
 * This function also remembers things like GET-based frontend/theme settings.
 *
 * @author Ben Dodson
 * @version 11/6/04
 * @since 11/5/04
 */
function urlize($arr1 = array(), $arr2 = array())
{
    global $this_page, $root_dir, $link_root, $include_path, $ssl_stream, $secure_urls, $jzUSER;
    $this_page = setThisPage();
    $arr = $arr1 + $arr2;
    if (!isset($arr['action'])) {
        $action = "";
    } else {
        $action = $arr['action'];
    }
    if (isset($arr['jz_path']) && $arr['jz_path'] == "") {
        unset($arr['jz_path']);
    }
    if ($action != "play" && $action != "playlist") {
        if (isset($_GET['frontend']) && !isset($arr['frontend'])) {
            $arr['frontend'] = $_GET['frontend'];
        } else {
            if (isset($_POST['frontend']) && !isset($arr['frontend'])) {
                $arr['frontend'] = $_POST['frontend'];
            }
        }
        if (isset($_GET['theme']) && $_GET['theme'] != '' && !isset($arr['theme'])) {
            $arr['theme'] = $_GET['theme'];
        } else {
            if (isset($_POST['theme']) && $_POST['theme'] != '' && !isset($arr['theme'])) {
                $arr['theme'] = $_POST['theme'];
            }
        }
    }
    switch ($action) {
        case "play":
            $link = "";
            if ($ssl_stream == "true") {
                $link .= "https://";
            } else {
                $link .= "http://";
            }
            $link .= $_SERVER['HTTP_HOST'];
            if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && strpos($link, ":") === false) {
                $link .= ":" . $_SERVER['SERVER_PORT'];
            }
            $link = str_replace(":443", "", $link);
            $link .= $root_dir . "/mediabroadcast.php?";
            $ENC_FUNC = "jz_track_encode";
            // fairly gross hack for non-mp3 files:
            if (isset($arr['ext'])) {
                $extension = $arr['ext'];
                unset($arr['ext']);
            } else {
                $extension = false;
            }
            break;
        case "image":
            //case "download":
            $link = "";
            if ($_SERVER['SERVER_PORT'] == 443) {
                $link .= "https://";
            } else {
                $link .= "http://";
            }
            $link .= $_SERVER['HTTP_HOST'];
            if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && strpos($link, ":") === false) {
                $link .= ":" . $_SERVER['SERVER_PORT'];
            }
            $link = str_replace(":443", "", $link);
            $link .= $root_dir . "/mediabroadcast.php?image=tr&";
            $ENC_FUNC = "jz_encode";
            // fairly gross hack for non-mp3 files:
            if (isset($arr['ext'])) {
                $extension = $arr['ext'];
                unset($arr['ext']);
            } else {
                $extension = false;
            }
            break;
        case "popup":
            $link = $root_dir . "/popup.php?";
            $ENC_FUNC = "jz_encode";
            $extension = false;
            break;
        default:
            $link = $this_page;
            // setThisPage handles CMS stuff and adds & or ?.
            $ENC_FUNC = "jz_encode";
            $extension = false;
    }
    if ($action == "playlist") {
        $extension = $jzUSER->getSetting('playlist_type');
    }
    //$jz_secure = "true"; // for now.
    $vars = "";
    if ($secure_urls == "true" && !url_full_exception($arr)) {
        foreach ($arr as $key => $val) {
            // if jz_secure, jz_encode our keys and vars.
            if (!url_key_exception($key)) {
                $vars .= "&" . urlencode($ENC_FUNC($key)) . "=" . urlencode($ENC_FUNC($val));
            } else {
                $vars .= "&" . urlencode($key) . "=" . urlencode($val);
            }
        }
    } else {
        foreach ($arr as $key => $val) {
            $vars .= "&" . urlencode($key) . "=" . urlencode($val);
        }
    }
    $link = $link . substr($vars, 1);
    if (!isNothing($extension)) {
        $link .= "&ext." . $extension;
    } else {
        $link .= "&ext.html";
    }
    return $link;
}
Example #3
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
// Let's figure out the path stuff so we'll know how/where to include from$form_action = "index.php?install=step8";
$form_action = setThisPage() . "install=step8";
$form_action2 = setThisPage() . "install=step9";
// Ok, did they want to download the settings file?
if (isset($_POST['saveSettings'])) {
    createSettings($error);
}
// Now let's create the functions to create the settings and users files
function createSettings($save = false)
{
    global $word_written_success, $version, $include_path;
    // Now let's figure out the root dir
    $rootArray = explode("/", $_SERVER['SCRIPT_NAME']);
    $rootArray[count($rootArray) - 1] = "";
    $root_dir = "";
    for ($c = 0; $c < count($rootArray); $c++) {
        if ($rootArray[$c] != "") {
            $root_dir .= "/" . $rootArray[$c];
        }
    }
    $root_dir = $root_dir . "/" . $include_path;
    $root_dir = substr($root_dir, 0, strlen($root_dir) - 1);
    // Now let's figure out the version
    include_once $include_path . 'system.php';
    // Now let's create the dynamic variables from the installer
    if ($_POST['cms_type'] != "standalone") {
Example #4
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
// Let's figure out the path stuff so we'll know how/where to include from$form_action = "index.php?install=step5";
$form_action = setThisPage() . "install=step5";
$form_action2 = setThisPage() . "install=step8";
$form_action3 = setThisPage() . "install=step4";
// Now let's include the left
include_once $include_path . 'install/leftnav.php';
$_POST['cms_type'] = $cms_type;
?>
<div id="main">
	<a href="http://www.jinzora.com" target="_blank"><img src="<?php 
echo $include_path;
?>
install/logo.gif" border="0" align="right" vspace="5" hspace="0"></a>
	<h1><?php 
echo $word_install_type;
?>
</h1>
	<p>
	<?php 
echo $word_install_type_note;
?>
	<div class="go">
		<span class="goToNext">
			<?php 
echo $word_install_type;
?>
Example #5
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
echo '<body onLoad="setup6.db_username.focus();"></body>';
// Let's figure out the path stuff so we'll know how/where to include from$form_action = "index.php?install=step7";
$form_action = setThisPage() . "install=step7";
// Now let's include the left
include_once $include_path . 'install/leftnav.php';
?>
      
<div id="main">
	<a href="http://www.jinzora.com" target="_blank"><img src="<?php 
echo $include_path;
?>
install/logo.gif" border="0" align="right" vspace="5" hspace="0"></a>
	<?php 
$backend = $_POST['backend'];
$importer = $_POST['importer'];
if (!file_exists($include_path . "backend/backends/{$backend}")) {
    die("Invalid backend.");
}
if (!file_exists($include_path . "services/services/importing/{$importer}.php")) {
    die("Invalid importer.");
}
require_once $include_path . 'backend/backend.php';
if (!isset($_POST['customhierarchy'])) {
    $_POST['customhierarchy'] = "";
}
if ($_POST['hierarchysource'] == "custom") {
Example #6
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
// Let's figure out the path stuff so we'll know how/where to include from$form_action = "index.php?install=step3";
$form_action = setThisPage() . "install=step3";
$recheck_action = setThisPage() . "install=step2";
// Choose ezPublish Siteaccess, based on choosen installer language:
switch ($_POST['jz_lang_file']) {
    case "dutch":
        $siteaccess = "nl";
        break;
        // Every other installer language defaults to English Siteaccess:
    // Every other installer language defaults to English Siteaccess:
    case $siteaccess = "en":
        break;
}
// Now let's include the left
include_once $include_path . 'install/leftnav.php';
$fatal = false;
?>

<script language="JavaScript">
<!--
var siteaccess;
var nodeid;
var helpurl;
function popuphelp(siteaccess,nodeid){
	helpurl='http://www.jinzorahelp.com/' + siteaccess + '/layout/set/program/content/view/base/' + nodeid;
	newwindow2=window.open(helpurl,'helpwindow','height=760,width=556');