Esempio n. 1
0
function CheckCookie()
{
    // Resets app to the index page if timeout is reached
    $session_timeout = param_extract("session_timeout");
    if (!isset($_COOKIE["bookings_user_id"])) {
        echo "<html><head>\n";
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
        echo "<title>Session has expired</title>\n";
        echo "<script type=\"text/javascript\"><!-- \n";
        echo "top.location = \"index.php\";\n";
        echo " --></script>\n";
        echo "</head>\n";
        echo "<body></body>\n";
        echo "</html>\n";
        exit;
    }
}
Esempio n. 2
0
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    OpenBookings.org 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 OpenBookings.org; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
require_once "config.php";
require_once "connect_db.php";
require_once "functions.php";
$logo_file = param_extract("logo_file");
$welcome_message = param_extract("welcome_message");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title><?php 
echo $app_title . " :: " . Translate("Intro", 1);
?>
</title>
Esempio n. 3
0
?>
</option></select></td></tr>
			<tr><td colspan="3" style="height:10px"></td></tr>
			<tr><td style="text-align:right"><?php 
echo Translate("Administrator email", 1);
?>
 :</td><td colspan="2"><input id="admin_email" name="admin_email" style="width:280px" value="<?php 
echo $admin_email;
?>
"></td></tr>
			<tr><td colspan="3" style="height:10px"></td></tr>
			<tr><td style="text-align:right"><?php 
echo Translate("Session timeout", 1);
?>
 :</td><td><input id="session_timeout" name="session_timeout" style="width:70px" value="<?php 
echo param_extract("session_timeout");
?>
"></td><td><?php 
echo Translate("seconds", 1);
?>
 ( 0 = <?php 
echo Translate("Never", 1);
?>
 )</td></tr>
		</table>

	</td></tr></table>

</td></tr>

</table>
 $timezones_list .= "<option value=\"+46800\">(GMT+13) Nuku'alofa</option>";
 // gets user infos
 $sql = "SELECT user_id, login, last_name, first_name, email, locked, profile_id, language, date_format, user_timezone ";
 $sql .= "FROM rs_data_users WHERE user_id = " . $_COOKIE["bookings_user_id"] . ";";
 $user = db_query($database_name, $sql, "no", "no");
 $user_ = fetch_array($user);
 $title = Translate("User details", 1);
 $login = $user_["login"];
 $last_name = stripslashes($user_["last_name"]);
 $first_name = stripslashes($user_["first_name"]);
 $email = $user_["email"];
 $language = $user_["language"];
 if ($user_["date_format"] != "") {
     $date_format = $user_["date_format"];
 } else {
     $date_format = param_extract("default_date_format");
 }
 $user_timezone = $user_["user_timezone"];
 $languages_list = "";
 $sql = "SHOW COLUMNS FROM rs_param_lang";
 $columns = db_query($database_name, $sql, "no", "no");
 while ($columns_ = fetch_array($columns)) {
     if ($columns_["Field"] != "lang_id") {
         if ($columns_["Field"] == $language) {
             $languages_list .= "<option selected>";
         } else {
             $languages_list .= "<option>";
         }
         $languages_list .= $columns_["Field"] . "</option>";
     }
 }
Esempio n. 5
0
         $first_availability = getAvailability($get_object_id, $start_date, $get_duration);
         $script = "parent.document.getElementById(\"info_display\").innerHTML = \"" . $first_availability . "\";\n";
     } else {
         // displays error to user
         $error_message .= !$get_object_id["ok"] ? $get_object_id["error"] . "<br>" : "";
         $error_message .= !$get_start_date["ok"] ? $get_start_date["error"] . "<br>" : "";
         $error_message .= !$get_start_hour["ok"] ? $get_start_hour["error"] . "<br>" : "";
         $error_message .= !$get_duration["ok"] ? $get_duration["error"] . "<br>" : "";
         $script = "parent.document.getElementById(\"info_display\").innerHTML = \"" . $error_message . "\";\n";
     }
     break;
 case "export_localization":
     // ****************************************************************************
     $absolute_csvfile_path = dirname($_SERVER["SCRIPT_FILENAME"]) . "/openbookings_localization.csv";
     $file_handle = fopen($absolute_csvfile_path, "w");
     fwrite($file_handle, "THIS IS AN OPENBOOKINGS.ORG " . param_extract("app_version") . " LOCALIZATION EXCHANGE FILE (see http://www.openbookings.org for informations).\n");
     $columns_list_sql = "";
     $columns_array = array();
     $sql = "SHOW COLUMNS FROM rs_param_lang";
     $columns = db_query($database_name, $sql, "no", "no");
     $line = "";
     while ($columns_ = fetch_array($columns)) {
         if ($columns_["Field"] != "lang_id") {
             $columns_array[] = $columns_["Field"];
             $line .= "\"" . $columns_["Field"] . "\";";
         }
     }
     fwrite($file_handle, substr($line, 0, -1) . "\n");
     $sql = "SELECT " . implode(",", $columns_array) . " FROM rs_param_lang;";
     $localization = db_query($database_name, $sql, "no", "no");
     while ($localization_ = fetch_array($localization)) {
Esempio n. 6
0
	<span class="small_text"><a href="settings.php" target="middle_frame"><?php 
    echo Translate("Settings", 1);
    ?>
</a> | <a href="users.php" target="middle_frame"><?php 
    echo Translate("Users", 1);
    ?>
</a></span>
	<br><br>

<?php 
}
?>

<table style="font-size:10px;text-align:center" summary="">
	<tr><td style="color:#808080">OpenBookings.org <?php 
echo param_extract("app_version");
?>
<br>&copy; 2005-<?php 
echo date("Y");
?>
 J&eacute;r&ocirc;me Roger</td></tr>
	<tr><td><a href="http://www.openbookings.org" target="_blank">http://www.openbookings.org</a></td></tr>
</table>

</center>

<iframe id="iframe_action" name="iframe_action"></iframe>

<form id="form_action" method="post" action="actions.php" target="iframe_action">
	<input type="hidden" id="action_" name="action_" value="">
</form>
			$("booking_infos").style.visibility = "visible";
		}

		function HideInfos() { $("booking_infos").style.visibility = "hidden"; }

	--></script>

</head>

<body style="text-align:left; margin:10px">

<?php 
// the function "param_extract()" is implemented in the file "functions.php"
$free_color = param_extract("free_color");
$validated_color = param_extract("validated_color");
$unvalidated_color = param_extract("unvalidated_color");
$sql = "SELECT family_name FROM rs_param_families WHERE family_id = '" . $_REQUEST["family_id"] . "';";
$temp = db_query($database_name, $sql, "no", "no");
$temp_ = fetch_array($temp);
$html = "<span class=\"big_text\">" . $temp_["family_name"] . " - " . Translate("Week #", 1) . " " . $_GET["week"] . "/" . $_GET["year"] . "</span><br>";
// gets monday's date of selected week
$monday = getMonday($_GET["year"], $_GET["week"]);
$html .= "<div id=\"div_main\" style=\"width:" . ($object_column_width + $day_width * 7) . "px\">";
$html .= "<table class=\"table5\" summary=\"\">\n\n";
$html .= "<tr>\n";
$html .= "<th style=\"width:" . $object_column_width . "px\">" . Translate("Objects", 1) . "</th>\n";
for ($day_nr = 0; $day_nr <= 6; $day_nr++) {
    if (date("Y-m-d", $monday + $day_nr * 86400) == date("Y-m-d")) {
        $day_color = "red";
    } else {
        $day_color = "black";
Esempio n. 8
0
a:link { color:blue; text-decoration:none; }
a:visited { color:blue; text-decoration:none; }
a:hover { color:red; text-decoration:none; }

body {
	background:#<?php 
echo param_extract("background_color");
?>
;
	font-family:<?php 
echo param_extract("font_family");
?>
;
	font-size:<?php 
echo param_extract("font_size");
?>
px;
}

div {
	position:absolute;
}

table {
	border-collapse:collapse;
	font-size:<?php 
echo $font_size;
?>
px;
}
Esempio n. 9
0
    (at your option) any later version.

    OpenBookings.org 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 OpenBookings.org; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
require_once "config.php";
require_once "connect_db.php";
require_once "functions.php";
// application_access_level : 1 = anyone, 2 = guests, 3 = users
// self_registration_mode : no_validation, email_validation, admin_validation, no_self_registration
$self_registration_mode = param_extract("self_registration_mode");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title><?php 
echo $app_title;
?>
</title>