diff --git a/configure b/configure deleted file mode 100755 index fece1fe74..000000000 --- a/configure +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------- -# Copyright (c) 2010 Sourcefabric O.P.S. -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# -# Campcaster is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Campcaster is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Run this script to configure the environment. -# This script in effect calls the real automake / autoconf configure script -#------------------------------------------------------------------------------- - -# assume we're in $basedir -reldir=`dirname $0` -basedir=`cd $reldir; pwd;` -test -z "$basedir" && basedir=. - -bindir=$basedir/bin -tmpdir=$basedir/tmp - - -autogen=$bindir/autogen.sh -configure=$tmpdir/configure - -if [ ! -x $configure ]; then - (cd $basedir && $autogen $*) -fi - -(cd $tmpdir && $configure $*) - diff --git a/htmlUI/Input.php b/htmlUI/Input.php new file mode 100644 index 000000000..a1b3ceab7 --- /dev/null +++ b/htmlUI/Input.php @@ -0,0 +1,187 @@ + $value) { + $decodedKey = stripslashes($key); + if (is_array($value)) { + $decodedValue = Input::CleanMagicQuotes($value); + } else { + $decodedValue = stripslashes($value); + } + $gpcList[$decodedKey] = $decodedValue; + } + return $gpcList; + } // fn CleanMagicQuotes + + + /** + * Get an input value from the $_REQUEST array and check its type. + * The default value is returned if the value is not defined in the + * $_REQUEST array, or if the value does not match the required type. + * + * The type 'checkbox' is special - you cannot specify a default + * value for this. The return value will be TRUE or FALSE, but + * you can change this by specifying 'numeric' as the 3rd parameter + * in which case it will return '1' or '0'. + * + * Use Input::IsValid() to check if any errors were generated. + * + * @param string $p_varName + * The index into the $_REQUEST array. + * + * @param string $p_type + * The type of data expected; can be: + * "int" + * "string" + * "array" + * "checkbox" + * "boolean" + * + * Default is 'string'. + * + * @param mixed $p_defaultValue + * The default value to return if the value is not defined in + * the $_REQUEST array, or if the value does not match + * the required type. + * + * @param boolean $p_errorsOk + * Set to true to ignore any errors for this variable (i.e. + * Input::IsValid() will still return true even if there + * are errors for this varaible). + * + * @return mixed + */ + function Get($p_varName, $p_type = 'string', $p_defaultValue = null, $p_errorsOk = false) + { + global $g_inputErrors; + $p_type = strtolower($p_type); + + if ($p_type == 'checkbox') { + if (strtolower($p_defaultValue) != 'numeric') { + return isset($_REQUEST[$p_varName]); + } else { + return isset($_REQUEST[$p_varName]) ? '1' : '0'; + } + } + if (!isset($_REQUEST[$p_varName])) { + if (!$p_errorsOk) { + $g_inputErrors[$p_varName] = 'not set'; + } + return $p_defaultValue; + } + // Clean the slashes + if (get_magic_quotes_gpc()) { + if (is_array($_REQUEST[$p_varName])) { + $_REQUEST[$p_varName] = Input::CleanMagicQuotes($_REQUEST[$p_varName]); + } else { + $_REQUEST[$p_varName] = stripslashes($_REQUEST[$p_varName]); + } + } + switch ($p_type) { + case 'boolean': + $value = strtolower($_REQUEST[$p_varName]); + if ( ($value == "true") || (is_numeric($value) && ($value > 0)) ) { + return true; + } else { + return false; + } + break; + case 'int': + if (!is_numeric($_REQUEST[$p_varName])) { + if (!$p_errorsOk) { + $g_inputErrors[$p_varName] = 'Incorrect type. Expected type '.$p_type + .', but received type '.gettype($_REQUEST[$p_varName]).'.' + .' Value is "'.$_REQUEST[$p_varName].'".'; + } + return $p_defaultValue; + } + break; + case 'string': + if (!is_string($_REQUEST[$p_varName])) { + if (!$p_errorsOk) { + $g_inputErrors[$p_varName] = 'Incorrect type. Expected type '.$p_type + .', but received type '.gettype($_REQUEST[$p_varName]).'.' + .' Value is "'.$_REQUEST[$p_varName].'".'; + } + return $p_defaultValue; + } + break; + case 'array': + if (!is_array($_REQUEST[$p_varName])) { + // Create an array if it isnt one already. + // Arrays are used with checkboxes and radio buttons. + // The problem with them is that if there is only one + // checkbox, the given value will not be an array. So + // we make it easy for the programmer by always returning + // an array. + $newArray = array(); + $newArray[] = $_REQUEST[$p_varName]; + return $newArray; +// if (!$p_errorsOk) { +// $g_inputErrors[$p_varName] = 'Incorrect type. Expected type '.$p_type +// .', but received type '.gettype($_REQUEST[$p_varName]).'.' +// .' Value is "'.$_REQUEST[$p_varName].'".'; +// } +// return $p_defaultValue; + } + } + return $_REQUEST[$p_varName]; + } // fn get + + + /** + * Return FALSE if any calls to Input::Get() resulted in an error. + * @return boolean + */ + function IsValid() + { + global $g_inputErrors; + if (count($g_inputErrors) > 0) { + return false; + } else { + return true; + } + } // fn isValid + + + /** + * Return a default error string. + * @return string + */ + function GetErrorString() + { + global $g_inputErrors; + ob_start(); + print_r($g_inputErrors); + $str = ob_get_clean(); + return $str; + } // fn GetErrorString + +} // class Input + +?> \ No newline at end of file diff --git a/htmlUI/init_load_once.php b/htmlUI/init_load_once.php index fe0da9fc8..f11398400 100644 --- a/htmlUI/init_load_once.php +++ b/htmlUI/init_load_once.php @@ -4,6 +4,12 @@ session_start(); // initialize objects ############################################### $Smarty = new Smarty; +$Smarty->caching = false; +$Smarty->template_dir = dirname(__FILE__).'/templates/'; +$Smarty->compile_dir = dirname(__FILE__).'/templates_c/'; +//$Smarty->config_dir = '/web/www.example.com/guestbook/configs/'; +//$Smarty->cache_dir = '/web/www.example.com/guestbook/cache/'; + $uiBrowser = new uiBrowser($CC_CONFIG); $uiBrowser->init(); diff --git a/htmlUI/templates/main.tpl b/htmlUI/templates/main.tpl index a7221dc3b..1010a1e89 100644 --- a/htmlUI/templates/main.tpl +++ b/htmlUI/templates/main.tpl @@ -1,5 +1,3 @@ -Hi! - {include file="header.tpl"} {include file="masterpanel.tpl"} {include file="footer.tpl"} diff --git a/index.php b/index.php index cb0df0f09..86c3049bf 100644 --- a/index.php +++ b/index.php @@ -1,10 +1,12 @@ \ No newline at end of file diff --git a/bin/autogen.sh b/install/autogen.sh similarity index 100% rename from bin/autogen.sh rename to install/autogen.sh diff --git a/bin/createDebianPackages.sh b/install/createDebianPackages.sh similarity index 100% rename from bin/createDebianPackages.sh rename to install/createDebianPackages.sh diff --git a/bin/createHubTarball.sh b/install/createHubTarball.sh similarity index 100% rename from bin/createHubTarball.sh rename to install/createHubTarball.sh diff --git a/bin/dist.sh b/install/dist.sh similarity index 100% rename from bin/dist.sh rename to install/dist.sh diff --git a/bin/gen_coverage_data.sh b/install/gen_coverage_data.sh similarity index 100% rename from bin/gen_coverage_data.sh rename to install/gen_coverage_data.sh diff --git a/bin/hubSetup.sh b/install/hubSetup.sh similarity index 100% rename from bin/hubSetup.sh rename to install/hubSetup.sh diff --git a/bin/install-sh b/install/install-sh similarity index 100% rename from bin/install-sh rename to install/install-sh diff --git a/bin/install.py b/install/install.py similarity index 100% rename from bin/install.py rename to install/install.py diff --git a/bin/nightlyBuild.sh b/install/nightlyBuild.sh similarity index 100% rename from bin/nightlyBuild.sh rename to install/nightlyBuild.sh diff --git a/bin/postInstallStation.sh b/install/postInstallStation.sh similarity index 100% rename from bin/postInstallStation.sh rename to install/postInstallStation.sh diff --git a/bin/postUninstall.sh b/install/postUninstall.sh similarity index 100% rename from bin/postUninstall.sh rename to install/postUninstall.sh diff --git a/bin/preInstall.sh b/install/preInstall.sh similarity index 100% rename from bin/preInstall.sh rename to install/preInstall.sh diff --git a/bin/setupDevelopmentEnvironment.sh b/install/setupDevelopmentEnvironment.sh similarity index 100% rename from bin/setupDevelopmentEnvironment.sh rename to install/setupDevelopmentEnvironment.sh diff --git a/bin/setupDevelopmentEnvironmentAndLog.sh b/install/setupDevelopmentEnvironmentAndLog.sh similarity index 100% rename from bin/setupDevelopmentEnvironmentAndLog.sh rename to install/setupDevelopmentEnvironmentAndLog.sh diff --git a/bin/svnUpdate.sh b/install/svnUpdate.sh similarity index 100% rename from bin/svnUpdate.sh rename to install/svnUpdate.sh diff --git a/bin/test_setup_db.sh b/install/test_setup_db.sh similarity index 100% rename from bin/test_setup_db.sh rename to install/test_setup_db.sh diff --git a/bin/updateStudioConfig.sh b/install/updateStudioConfig.sh similarity index 100% rename from bin/updateStudioConfig.sh rename to install/updateStudioConfig.sh diff --git a/bin/upgrade-1.3-to-1.4.sql b/install/upgrade-1.3-to-1.4.sql similarity index 100% rename from bin/upgrade-1.3-to-1.4.sql rename to install/upgrade-1.3-to-1.4.sql diff --git a/bin/user_setup.sh b/install/user_setup.sh similarity index 100% rename from bin/user_setup.sh rename to install/user_setup.sh diff --git a/bin/user_setup_db.sh b/install/user_setup_db.sh similarity index 100% rename from bin/user_setup_db.sh rename to install/user_setup_db.sh diff --git a/ui_browser.php b/ui_browser.php index f4a3a1e6c..117f02c95 100644 --- a/ui_browser.php +++ b/ui_browser.php @@ -282,19 +282,6 @@ if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) { if ($uiBrowser->userid) { $action = isset($_REQUEST['act']) ? $_REQUEST['act'] : null; switch ($action) { - case "fileList": -// $Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->fid)); -// $Smarty->assign('fileList', TRUE); -// -// if ($_REQUEST['tree'] == 'Y') { -// $Smarty->assign('showTree', TRUE); -// } else{ -// $Smarty->assign('showObjects', TRUE); -// } -// -// $Smarty->assign('delOverride', $_REQUEST['delOverride']); - break; - case "permissions": // $Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id)); // $Smarty->assign('permissions', $uiBrowser->permissions($uiBrowser->id)); @@ -427,6 +414,10 @@ if ($uiBrowser->userid) { $Smarty->assign('simpleSearchForm', $uiBrowser->SEARCH->simpleSearchForm($ui_fmask['simplesearch'])); } } +if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) { + echo __FILE__.':line '.__LINE__.": action ($action) processing complete
"; + //var_dump($Smarty); +} $Smarty->display('main.tpl'); ?> \ No newline at end of file diff --git a/var/campcaster_desktop_image_1024x768.png b/var/campcaster_desktop_image_1024x768.png deleted file mode 100644 index b124411b8..000000000 Binary files a/var/campcaster_desktop_image_1024x768.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1280x1024.png b/var/campcaster_desktop_image_1280x1024.png deleted file mode 100644 index 5727ff5d0..000000000 Binary files a/var/campcaster_desktop_image_1280x1024.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1280x800.png b/var/campcaster_desktop_image_1280x800.png deleted file mode 100644 index 4b1cb0797..000000000 Binary files a/var/campcaster_desktop_image_1280x800.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1400x1050.png b/var/campcaster_desktop_image_1400x1050.png deleted file mode 100644 index 1eb3426df..000000000 Binary files a/var/campcaster_desktop_image_1400x1050.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1600x1200.png b/var/campcaster_desktop_image_1600x1200.png deleted file mode 100644 index 131fabfe4..000000000 Binary files a/var/campcaster_desktop_image_1600x1200.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1680x1050.png b/var/campcaster_desktop_image_1680x1050.png deleted file mode 100644 index 182583481..000000000 Binary files a/var/campcaster_desktop_image_1680x1050.png and /dev/null differ diff --git a/var/campcaster_desktop_image_1920x1200.png b/var/campcaster_desktop_image_1920x1200.png deleted file mode 100644 index f44bcaedc..000000000 Binary files a/var/campcaster_desktop_image_1920x1200.png and /dev/null differ diff --git a/var/campcaster_desktop_image_800x600.png b/var/campcaster_desktop_image_800x600.png deleted file mode 100644 index eb98f1c6c..000000000 Binary files a/var/campcaster_desktop_image_800x600.png and /dev/null differ