Example #1
0
if (_session('id_app', 0) > 0) {
    lcm_page_start(_T('title_app_edit'), '', '', 'tools_agenda');
} else {
    lcm_page_start(_T('title_app_new'), '', '', 'tools_agenda');
}
if (_session('id_case', 0) > 0) {
    // Show a bit of background on the case
    show_context_start();
    show_context_case_title(_session('id_case'));
    show_context_case_involving(_session('id_case'));
    show_context_end();
}
// Show the errors (if any)
echo show_all_errors();
// Disable inputs when edit is not allowed for the field
$ac = get_ac_app($app, _session('id_case'));
$admin = $ac['a'];
$write = $ac['w'];
$edit = $ac['e'];
$dis = $edit ? '' : 'disabled="disabled"';
?>

<form action="upd_app.php" method="post">
	<table class="tbl_usr_dtl" width="99%">

		<!-- Start time -->
		<tr>
<?php 
echo "<td>" . f_err_star('start_time') . _T('time_input_date_start') . "</td>\n";
echo "<td>";
$name = $edit ? 'start' : '';
Example #2
0
	$Id: upd_app.php,v 1.24 2007/11/16 16:28:17 mlutfy Exp $
*/
include 'inc/inc.php';
include_lcm('inc_acc');
include_lcm('inc_filters');
// Clear all previous errors
$_SESSION['errors'] = array();
$id_app = _request('id_app', 0);
// Get form data from POST fields
foreach ($_POST as $key => $value) {
    $_SESSION['form_data'][$key] = $value;
}
//
// Check access rights
//
$ac = get_ac_app($id_app);
// XXX FIXME make better check?
if (!$ac['w']) {
    die("access denied");
}
// Convert day, month, year, hour, minute to date/time
// Check submitted information
// XXX for some reason (bad memory), date_start doesn't allow the user to leave
// some fields empty, but date_end (in absolute more) does. Hence extra validation.
//
// Start date
//
$_SESSION['form_data']['start_time'] = get_datetime_from_array($_SESSION['form_data'], 'start', 'start', '', false);
$unix_start_time = strtotime($_SESSION['form_data']['start_time']);
if ($unix_start_time < 0 || !checkdate_sql($_SESSION['form_data']['start_time'])) {
    $_SESSION['errors']['start_time'] = _Ti('time_input_date_start') . 'Invalid date';
Example #3
0
	option) any later version.

	This program 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 this program; if not, write to the Free Software Foundation, Inc.,
	59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

	$Id: app_det.php,v 1.25 2007/11/16 16:29:08 mlutfy Exp $
*/
include 'inc/inc.php';
$app = intval(_request('app'));
$ac = get_ac_app($app);
if (!$ac['r']) {
    die("access denied");
}
// Get the authors participating in the appointment
$q = "SELECT p.*, a.name_first, a.name_middle, a.name_last, c.title AS case_title\n\tFROM lcm_app as p\n\tLEFT JOIN lcm_case as c ON (c.id_case = p.id_case)\n\tLEFT JOIN lcm_author as a ON (a.id_author = p.id_author)\n\tWHERE p.id_app = {$app}";
$result = lcm_query($q);
if (!($row = lcm_fetch_array($result))) {
    die("There is no such appointment.");
}
lcm_page_start(_T('title_app_view') . ' ' . $row['title'], '', '', 'tools_agenda');
echo '<fieldset class="info_box">' . "\n";
echo '<p class="normal_text">' . "\n";
echo _Ti('app_input_title') . $row['title'] . "<br />\n";
echo _Ti('app_input_type') . _Tkw('appointments', $row['type']) . "<br />\n";
if ($row['hidden'] == 'Y') {