コード例 #1
0
ファイル: year.php プロジェクト: Birssan/GRR
    } else {
        echo "<td>\n";
        echo make_site_list_html('year.php', $id_site, $from_year, $from_month, $day, getUserName());
        echo "</td><td>";
        echo make_area_list_html('year.php', $id_site, $area, $from_year, $from_month, $day, getUserName());
        echo "</td>\n";
    }
    echo "\n<td><form method=\"get\" action=\"year.php\">";
    echo "<table border=\"0\">\n";
    echo "<tr><td>" . get_vocab("report_start") . get_vocab("deux_points") . "</td>";
    echo "<td>";
    echo genDateSelector("from_", "", $from_month, $from_year, "");
    echo "</td></tr>";
    echo "<tr><td>" . get_vocab("report_end") . get_vocab("deux_points");
    echo "</td><td>\n";
    echo genDateSelector("to_", "", $to_month, $to_year, "");
    echo "</td></tr>\n";
    echo "<tr><td>\n";
    echo "<input type=\"hidden\" name=\"area\" value=\"{$area}\" />\n";
    echo "<input type=\"submit\" name=\"valider\" value=\"" . $vocab["goto"] . "\" /></td><td> </td></tr>\n";
    echo "</table>\n";
    echo "</form></td>\n";
    echo '<td><a title="' . htmlspecialchars(get_vocab('back')) . '" href="' . page_accueil('no') . '">' . $vocab['back'] . '</a></td>';
    echo "</tr></table>\n";
}
$this_area_name = grr_sql_query1("SELECT area_name FROM " . TABLE_PREFIX . "_area WHERE id={$area}");
echo "<div class=\"titre_planning\">" . ucfirst($this_area_name) . " - " . get_vocab("all_areas") . " </div>\n";
//Used below: localized "all day" text but with non-breaking spaces:
$all_day = preg_replace("/ /", " ", get_vocab("all_day"));
//Get all meetings for this month in the room that we care about
//row[0] = Start time
コード例 #2
0
ファイル: edit_entry.php プロジェクト: jberanek/mrbs_clone
            $params = array('name' => 'month_relative_ord', 'value' => $month_relative_ord, 'disabled' => $disabled, 'options' => $options, 'force_assoc' => TRUE);
            generate_select($params);
            $options = array();
            for ($i = 0; $i < 7; $i++) {
                $i_offset = ($i + $weekstarts) % 7;
                $options[$RFC_5545_days[$i_offset]] = day_name($i_offset);
            }
            $params = array('name' => 'month_relative_day', 'value' => $month_relative_day, 'disabled' => $disabled, 'options' => $options);
            generate_select($params);
            echo "</fieldset>\n";
            echo "</fieldset>\n";
        }
        // Repeat end date
        echo "<div id=\"rep_end_date\">\n";
        echo "<label>" . get_vocab("rep_end_date") . ":</label>\n";
        genDateSelector("rep_end_", $rep_end_day, $rep_end_month, $rep_end_year, '', $disabled);
        echo "</div>\n";
        // Checkbox for skipping past conflicts
        if (!$disabled) {
            echo "<div>\n";
            $params = array('label' => get_vocab("skip_conflicts") . ":", 'name' => 'skip', 'value' => !empty($skip_default));
            generate_checkbox($params);
            echo "</div>\n";
        }
    }
    echo "</fieldset>\n";
}
?>
    <input type="hidden" name="returl" value="<?php 
echo htmlspecialchars($returl);
?>
コード例 #3
0
ファイル: functions.inc.php プロジェクト: JeromeDevome/GRR
function jQuery_DatePicker($typeDate)
{
    if (@file_exists('../include/connect.inc.php')) {
        $racine = "../";
    } else {
        $racine = "./";
    }
    if ($typeDate == 'rep_end' && isset($_GET['id'])) {
        $res = grr_sql_query("SELECT repeat_id FROM " . TABLE_PREFIX . "_entry WHERE id=" . $_GET['id'] . ";");
        if (!$res) {
            fatal_error(0, grr_sql_error());
        }
        $repeat_id = implode('', grr_sql_row($res, 0));
        $res = grr_sql_query("SELECT rep_type, end_date, rep_opt, rep_num_weeks, start_time, end_time FROM " . TABLE_PREFIX . "_repeat WHERE id={$repeat_id}");
        if (!$res) {
            fatal_error(0, grr_sql_error());
        }
        if (grr_sql_count($res) == 1) {
            $row6 = grr_sql_row($res, 0);
            $date = date_parse(date("Y-m-d H:i:s", $row6[1]));
            $day = $date['day'];
            $month = $date['month'];
            $year = $date['year'];
        } else {
            if (isset($_GET['day'])) {
                $day = $_GET['day'];
            } else {
                $day = date("d");
            }
            if (isset($_GET['month'])) {
                $month = $_GET['month'];
            } else {
                $month = date("m");
            }
            if (isset($_GET['year'])) {
                $year = $_GET['year'];
            } else {
                $year = date("Y");
            }
        }
    } else {
        global $start_day, $start_month, $start_year, $end_day, $end_month, $end_year;
        if (isset($_GET['day'])) {
            $day = $_GET['day'];
        } else {
            $day = date("d");
        }
        if (isset($start_day) && $typeDate == 'start') {
            $day = $start_day;
        } elseif (isset($end_day) && $typeDate == 'end') {
            $day = $end_day;
        }
        if (isset($_GET['month'])) {
            $month = $_GET['month'];
        } else {
            $month = date("m");
        }
        if (isset($start_month) && $typeDate == 'start') {
            $month = $start_month;
        } elseif (isset($end_month) && $typeDate == 'end') {
            $month = $end_month;
        }
        if (isset($_GET['year'])) {
            $year = $_GET['year'];
        } else {
            $year = date("Y");
        }
        if (isset($start_year) && $typeDate == 'start') {
            $year = $start_year;
        } elseif (isset($end_year) && $typeDate == 'end') {
            $year = $end_year;
        }
    }
    genDateSelector("" . $typeDate . "_", "{$day}", "{$month}", "{$year}", "");
    echo '<input type="hidden" disabled="disabled" id="mydate_' . $typeDate . '">' . PHP_EOL;
    echo '<script>' . PHP_EOL;
    echo '	$(function() {' . PHP_EOL;
    echo '$.datepicker.setDefaults( $.datepicker.regional[\'fr\'] );' . PHP_EOL;
    echo '	$(\'#mydate_' . $typeDate . '\').datepicker({' . PHP_EOL;
    echo '		beforeShow: readSelected, onSelect: updateSelected,' . PHP_EOL;
    echo '		showOn: \'both\', buttonImageOnly: true, buttonImage: \'images/calendar.png\',buttonText: "Choisir la date"});' . PHP_EOL;
    echo '		function readSelected()' . PHP_EOL;
    echo '		{' . PHP_EOL;
    echo '			$(\'#mydate_' . $typeDate . '\').val($(\'#' . $typeDate . '_day\').val() + \'/\' +' . PHP_EOL;
    echo '			$(\'#' . $typeDate . '_month\').val() + \'/\' + $(\'#' . $typeDate . '_year\').val());' . PHP_EOL;
    echo '			return {};' . PHP_EOL;
    echo '		}' . PHP_EOL;
    echo '		function updateSelected(date)' . PHP_EOL;
    echo '		{' . PHP_EOL;
    echo '			$(\'#' . $typeDate . '_day\').val(date.substring(0, 2));' . PHP_EOL;
    echo '			$(\'#' . $typeDate . '_month\').val(date.substring(3, 5));' . PHP_EOL;
    echo '			$(\'#' . $typeDate . '_year\').val(date.substring(6, 10));' . PHP_EOL;
    echo '		}' . PHP_EOL;
    echo '	});' . PHP_EOL;
    echo '</script>' . PHP_EOL;
}
コード例 #4
0
ファイル: admin_config1.php プロジェクト: Birssan/GRR
<table class="table_adm">
	<tr
	><td>
	<?php 
echo get_vocab('end_bookings');
?>
</td>
<td>
	<?php 
$typeDate = 'end_';
$eday = strftime('%d', Settings::get('end_bookings'));
$emonth = strftime('%m', Settings::get('end_bookings'));
$eyear = strftime('%Y', Settings::get('end_bookings'));
echo '<div class="col-xs-12">' . PHP_EOL;
echo '<div class="form-inline">' . PHP_EOL;
genDateSelector('end_', $eday, $emonth, $eyear, 'more_years');
echo '<input type="hidden" disabled="disabled" id="mydate_' . $typeDate . '">' . PHP_EOL;
echo '<script>' . PHP_EOL;
echo '$(function() {' . PHP_EOL;
echo '$.datepicker.setDefaults( $.datepicker.regional[\'fr\'] );' . PHP_EOL;
echo '$(\'#mydate_' . $typeDate . '\').datepicker({' . PHP_EOL;
echo 'beforeShow: readSelected, onSelect: updateSelected,' . PHP_EOL;
echo 'showOn: \'both\', buttonImageOnly: true, buttonImage: \'../images/calendar.png\',buttonText: "Choisir la date"});' . PHP_EOL;
echo 'function readSelected()' . PHP_EOL;
echo '{' . PHP_EOL;
echo '$(\'#mydate_' . $typeDate . '\').val($(\'#' . $typeDate . '_day\').val() + \'/\' +' . PHP_EOL;
echo '$(\'#' . $typeDate . '_month\').val() + \'/\' + $(\'#' . $typeDate . '_year\').val());' . PHP_EOL;
echo 'return {};' . PHP_EOL;
echo '}' . PHP_EOL;
echo 'function updateSelected(date)' . PHP_EOL;
echo '{' . PHP_EOL;
コード例 #5
0
ファイル: edit_entry.php プロジェクト: verdurin/mrbs-mcr
{
	echo "<INPUT NAME=\"rep_type\" TYPE=\"RADIO\" VALUE=\"" . $i . "\"";
	
	if($i == $rep_type)
		echo " CHECKED";
	
	echo ">" . $lang["rep_type_$i"] . "\n";
}

?>
 </TD>
</TR>

<TR>
 <TD CLASS=CR><B><?echo $lang["rep_end_date"]?></B></TD>
 <TD CLASS=CL><? genDateSelector("rep_end_", $rep_end_day, $rep_end_month, $rep_end_year) ?></TD>
</TR>

<TR>
 <TD CLASS=CR><B><? echo $lang["rep_rep_day"]?></B> <? echo $lang["rep_for_weekly"]?></TD>
 <TD CLASS=CL>
<?php 
# Display day name checkboxes according to language and preferred weekday start.
for ($i = 0; $i < 7; $i++) {
    $wday = ($i + $weekstarts) % 7;
    echo "<INPUT NAME=\"rep_day[{$wday}]\" TYPE=CHECKBOX";
    if ($rep_day[$wday]) {
        echo " CHECKED";
    }
    echo ">" . day_name($wday) . "\n";
}
コード例 #6
0
echo get_string('search');
?>
</H2>

<div id="searchform">
<FORM NAME="main" >
<TABLE BORDER=0>

<!-- Date selectors -->
    <TR><TD CLASS=CR><B><?php 
echo get_string('date');
?>
</B></TD>
     <TD CLASS=CL>
      <?php 
genDateSelector("", $start_day, $start_month, $start_year, false, true);
?>
      <SCRIPT LANGUAGE="JavaScript">ChangeOptionDays(document.main, '');</SCRIPT>
     </TD>
    </TR>

<!-- Start time/period selectors -->
    <?php 
if (!$enable_periods) {
    ?>
    <TR><TD CLASS=CR><B><?php 
    echo get_string('time');
    ?>
</B></TD>
      <TD CLASS=CL><INPUT NAME="hour" SIZE=2 VALUE="<?php 
    if (!$twentyfourhour_format && $start_hour > 12) {
コード例 #7
0
ファイル: report.php プロジェクト: nicolas-san/GRRV4
								<div class="form-inline">
									<?php 
        genDateSelector("From_", $From_day, $From_month, $From_year, "");
        ?>
								</div>
							</div>
						</td></tr>
						<tr><td class="CR"><?php 
        echo get_vocab("report_end") . get_vocab("deux_points");
        ?>
</td>
							<td class="CL">
								<div class="col-xs-12">
									<div class="form-inline">
										<?php 
        genDateSelector("To_", $To_day, $To_month, $To_year, "");
        ?>
									</div>
								</div>
							</td></tr>
							<?php 
        if (!isset($_GET["condition_et_ou"]) || $_GET["condition_et_ou"] != "OR") {
            $_GET["condition_et_ou"] = "AND";
        }
        echo "<tr><td align=\"right\"><input type=\"radio\" name=\"condition_et_ou\" value=\"AND\" ";
        if ($_GET["condition_et_ou"] == "AND") {
            echo "checked=\"checked\"";
        }
        echo " /></td>\n";
        echo "<td>" . get_vocab("valide toutes les conditions suivantes") . "</td></tr>";
        echo "<tr><td align=\"right\"><input type=\"radio\" name=\"condition_et_ou\" value=\"OR\" ";
コード例 #8
0
ファイル: visa_ct.php プロジェクト: rhertzog/lcs
    ?>
<table class='boireaus' border="1"><tr valign='middle' align='center'>
<th><b><a href='visa_ct.php?order_by=jc.id_classe,jm.id_matiere'>Classe(s)</a></b></th>
<th><b><a href='visa_ct.php?order_by=jm.id_matiere,jc.id_classe'>Groupe</a></b></th>
<th><b><a href='visa_ct.php?order_by=ct.id_login,jc.id_classe,jm.id_matiere'>Propriétaire</a></b></th>
<th><b>Nombre<br />de notices</b></th>
<th><b>Nombre<br />de notices<br />"devoirs"</b></th>
<th>
<b>Action</b></th>
<th><b><input type="submit" name="visa_ct" value="Signer les cahiers" onclick="return confirmlink(this, 'La signature d\'un cahier de texte est définitive. Etes-vous sûr de vouloir continuer ?', 'Confirmation de la signature')" /></b>
<p><b>dont la date est inférieure au</b></p>
<?php 
    $bday = strftime("%d", getSettingValue("date_signature"));
    $bmonth = strftime("%m", getSettingValue("date_signature"));
    $byear = strftime("%Y", getSettingValue("date_signature"));
    genDateSelector("begin_", $bday, $bmonth, $byear, "more_years");
    ?>
</th>

<th><b>Nombre de visa</b></th>
<?php 
    if (isset($affichage_volume_docs_joints)) {
        $total_volumes_docs_joints = 0;
        ?>
<th title="Volume des documents joints"><b>Volume</b></th>
<?php 
    }
    ?>
</tr>

<?php 
コード例 #9
0
ファイル: report.php プロジェクト: verdurin/mrbs-mcr
# $sumby: d=by brief description, c=by creator.
if (empty($sumby)) {
    $sumby = "d";
}
# Upper part: The form.
?>
<h1><? echo $lang["report_on"];?></h1>
<form method=post action=report.php>
<table>
<tr><td class="CR"><? echo $lang["report_start"];?></td>
    <td class="CL"> <font size="-1">
    <? genDateSelector("From_", $From_day, $From_month, $From_year); ?>
    </font></td></tr>
<tr><td class="CR"><? echo $lang["report_end"];?></td>
    <td class="CL"> <font size="-1">
    <? genDateSelector("To_", $To_day, $To_month, $To_year); ?>
    </font></td></tr>
<tr><td class="CR"><? echo $lang["match_area"];?></td>
    <td class="CL"><input type=text name=areamatch size=18
    value="<? echo $areamatch_default; ?>">
    </td></tr>
<tr><td class="CR"><? echo $lang["match_room"];?></td>
    <td class="CL"><input type=text name=roommatch size=18
    value="<? echo $roommatch_default; ?>">
    </td></tr>
<tr><td class="CR"><? echo $lang["match_entry"];?></td>
    <td class="CL"><input type=text name=namematch size=18
    value="<? echo $namematch_default; ?>">
    </td></tr>
<tr><td class="CR"><? echo $lang["match_descr"];?></td>
    <td class="CL"><input type=text name=descrmatch size=18
コード例 #10
0
ファイル: functions.php プロジェクト: rtsfc/moodle-block_mrbs
function print_header_mrbs($day = NULL, $month = NULL, $year = NULL, $area = NULL)
{
    global $mrbs_company, $mrbs_company_url, $search_str, $locale_warning;
    $cfg_mrbs = get_config('block/mrbs');
    $strmrbs = get_string('blockname', 'block_mrbs');
    if (!($site = get_site())) {
        redirect($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
    }
    $navlinks = array();
    $navlinks[] = array('name' => $strmrbs, 'link' => $cfgmrbs->serverpath . 'index.php', 'type' => 'misc');
    $pagetitle = '';
    $navigation = build_navigation($navlinks);
    print_header("{$site->shortname}: {$strmrbs}: {$pagetitle}", $strmrbs, $navigation, '', '', true, '', user_login_string($site));
    # If we dont know the right date then make it up
    if (!$day) {
        $day = date("d");
    }
    if (!$month) {
        $month = date("m");
    }
    if (!$year) {
        $year = date("Y");
    }
    if (empty($search_str)) {
        $search_str = "";
    }
    /*
    	if ($unicode_encoding)
    	{
    		header("Content-Type: text/html; charset=utf-8");
    	}
    	else
    	{
    
    		header("Content-Type: text/html; charset=".get_string('charset','block_mrbs'));
    	}
    
    	header("Pragma: no-cache");                          // HTTP 1.0
    	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
    */
    /*<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                          "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
      <HEAD>
    *
    */
    ?>

<?php 
    include "style.php";
    ?>

    <SCRIPT LANGUAGE="JavaScript">

function ChangeOptionDays(formObj, prefix, updatefreerooms, roomsearch){

    var week=new Array(7);
    week[1]="<?php 
    print_string('mon', 'calendar');
    ?>
";
    week[2]="<?php 
    print_string('tue', 'calendar');
    ?>
";
    week[3]="<?php 
    print_string('wed', 'calendar');
    ?>
";
    week[4]="<?php 
    print_string('thu', 'calendar');
    ?>
";
    week[5]="<?php 
    print_string('fri', 'calendar');
    ?>
";
    week[6]="<?php 
    print_string('sat', 'calendar');
    ?>
";
    week[0]="<?php 
    print_string('sun', 'calendar');
    ?>
";
     
     
  var DaysObject = eval("formObj." + prefix + "day");
    var currentDay = DaysObject.selectedIndex;
  var MonthObject = eval("formObj." + prefix + "month");
  var YearObject = eval("formObj." + prefix + "year");

    //wipe current list
    for (j = DaysObject.options.length; j >= 0; j--) {
        DaysObject.options[j] = null;
    }
    var day=DaysObject.selectedIndex+1;
    var month=MonthObject.selectedIndex;
    var year=YearObject.options[YearObject.selectedIndex].value;


    var i=new Date();
    i.setDate(1);
    i.setMonth(month);
    i.setYear(year);

    while (i.getMonth()==month){

      DaysObject.options[i.getDate()-1] = new Option(week[i.getDay()]+" "+i.getDate(),i.getDate());
      i.setTime(i.getTime() + 86400000);
  }
   DaysObject.selectedIndex = currentDay;
   
    if(updatefreerooms){
        updateFreeRooms();
    }
    if(roomsearch){
        RoomSearch();
}
}


    </SCRIPT>
  </HEAD>
  <BODY BGCOLOR="#ffffed" TEXT=black LINK="#5B69A6" VLINK="#5B69A6" ALINK=red>
	   <?php 
    if ($GLOBALS["pview"] != 1) {
        ?>

   <?php 
        # show a warning if this is using a low version of php
        if (substr(phpversion(), 0, 1) == 3) {
            echo get_string('not_php3', 'block_mrbs');
        }
        if (!empty($locale_warning)) {
            echo "[Warning: " . $locale_warning . "]";
        }
        ?>

    <TABLE WIDTH="100%">
      <TR>
        <TD BGCOLOR="#5B69A6">
          <TABLE WIDTH="100%" BORDER=0>
            <TR>
              <TD CLASS="banner" BGCOLOR="#C0E0FF">
          <FONT SIZE=4><B><a href='<?php 
        echo $mrbs_company_url;
        ?>
'><?php 
        echo $mrbs_company;
        ?>
</a></B><BR>
           <A HREF="index.php"><?php 
        echo get_string('mrbs', 'block_mrbs');
        ?>
</A>
                </FONT>
              </TD>
              <TD CLASS="banner" BGCOLOR="#C0E0FF">
                <FORM ACTION="day.php" METHOD=GET name="Form1">
                  <FONT SIZE=2>
<?php 
        genDateSelector("", $day, $month, $year);
        // Note: The 1st arg must match the last arg in the call to ChangeOptionDays below.
        if (!empty($area)) {
            echo "\n                    <INPUT TYPE=HIDDEN NAME=area VALUE={$area}>\n";
        }
        ?>
	            <SCRIPT LANGUAGE="JavaScript">
                    <!--
                    // fix number of days for the $month/$year that you start with
                    ChangeOptionDays(document.Form1, ''); // Note: The 2nd arg must match the first in the call to genDateSelector above.
                    // -->
                    </SCRIPT>
	    <INPUT TYPE=SUBMIT VALUE="<?php 
        echo get_string('goto', 'block_mrbs');
        ?>
">
                  </FONT>
                </FORM>
              </TD>
<?php 
        if (has_capability("block/mrbs:forcebook", get_context_instance(CONTEXT_SYSTEM))) {
            echo '<TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
                  <a href="edit_entry.php?force=TRUE">Forcibly book a room</a>
              </TD>';
        }
        ?>
              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
<a target="popup" title="<?php 
        print_string('roomsearch', 'block_mrbs');
        ?>
" href="roomsearch.php" onclick="this.target='popup'; return openpopup('/blocks/mrbs/web/roomsearch.php', 'popup', 'toolbar=1,location=0,scrollbars,resizable,width=500,height=400', 0);"><?php 
        print_string('roomsearch', 'block_mrbs');
        ?>
</a>
              </TD>

              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
          <A HREF="help.php?day=<?php 
        echo $day;
        ?>
&month=<?php 
        echo $month;
        ?>
&year=<?php 
        echo $year;
        ?>
"><?php 
        echo get_string('help');
        ?>
</A>
              </TD>
              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
          <A HREF="admin.php?day=<?php 
        echo $day;
        ?>
&month=<?php 
        echo $month;
        ?>
&year=<?php 
        echo $year;
        ?>
"><?php 
        echo get_string('admin');
        ?>
</A>
              </TD>
              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
          <A HREF="report.php"><?php 
        echo get_string('report');
        ?>
</A>
              </TD>
              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
                <FORM METHOD=GET ACTION="search.php">
           <FONT SIZE=2><A HREF="search.php?advanced=1"><?php 
        echo get_string('search');
        ?>
</A> </FONT>
                  <INPUT TYPE=TEXT   NAME="search_str" VALUE="<?php 
        echo $search_str;
        ?>
" SIZE=10>
                  <INPUT TYPE=HIDDEN NAME=day        VALUE="<?php 
        echo $day;
        ?>
"        >
                  <INPUT TYPE=HIDDEN NAME=month      VALUE="<?php 
        echo $month;
        ?>
"        >
                  <INPUT TYPE=HIDDEN NAME=year       VALUE="<?php 
        echo $year;
        ?>
"        >
<?php 
        if (!empty($area)) {
            echo "\n                  <INPUT TYPE=HIDDEN NAME=area VALUE={$area}>\n";
        }
        ?>
                </FORM>
              </TD>
<?php 
        # For session protocols that define their own logon box...
        #    if (function_exists('PrintLogonBox')) {
        #        PrintLogonBox();
        #   	}
        ?>
            </TR>
          </TABLE>
        </TD>
      </TR>
    </TABLE>
<?php 
    }
}
コード例 #11
0
ファイル: functions.inc.php プロジェクト: rhertzog/lcs
function print_header($day='',$month='',$year='',$area='',$type_session='with_session',$page='no_admin',$room='')
{
   global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name;
   global $use_prototype, $use_tooltip_js, $desactive_bandeau_sup, $id_site;

   if (!($desactive_VerifNomPrenomUser)) $desactive_VerifNomPrenomUser = '******';
   // On vérifie que les noms et prénoms ne sont pas vides
   VerifNomPrenomUser($type_session);
   if ($type_session == "with_session")
       echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"with_session");
   else
       echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"no_session");

   // Si nous ne sommes pas dans un format imprimable
   if ((!isset($_GET['pview'])) or ($_GET['pview'] != 1)) {

   # If we dont know the right date then make it up
     if (!isset($day) or !isset($month) or !isset($year) or ($day == '') or ($month == '') or ($year == '')) {
         $date_now = mktime();
         if ($date_now < getSettingValue("begin_bookings"))
             $date_ = getSettingValue("begin_bookings");
         else if ($date_now > getSettingValue("end_bookings"))
             $date_ = getSettingValue("end_bookings");
         else
             $date_ = $date_now;
        $day   = date("d",$date_);
        $month = date("m",$date_);
        $year  = date("Y",$date_);
     }
   if (!(isset($search_str))) $search_str = get_vocab("search_for");
   if (empty($search_str)) $search_str = "";
   ?>
   <script type="text/javascript">
    chaine_recherche = "<?php echo $search_str; ?>";
   	function onsubmitForm()
	{
	if(document.pressed == 'a')
	{
  	document.getElementById('day').selectedIndex=<?php $date_now = mktime();echo (date("d",$date_now)-1); ?>;
		document.getElementById('month').selectedIndex=<?php echo (date("m",$date_now)-1);?>;
		document.getElementById('year').selectedIndex=<?php echo (date("Y",$date_now)-strftime("%Y", getSettingValue("begin_bookings")));?>;
  	var p=location.pathname;
	   	if(!p.match("day.php") && !p.match("week.php") && !p.match("week_all.php") && !p.match("month.php") && !p.match("month_all.php") && !p.match("month_all2.php") && !p.match("year.php"))
    document.getElementById('myform').action ="day.php";
	}
    if(document.pressed == 'd')
      document.getElementById('myform').action ="day.php";
    if(document.pressed == 'w')
    <?php
    echo "		document.getElementById('myform').action = \"";
    if ($room=="")
      echo "week_all.php";
		else
      echo "week.php";
    echo "\";\n";
    ?>
    if(document.pressed == 'm')
    <?php
    echo "		document.getElementById('myform').action = \"";
    if ($room=="") {
      if (isset($_SESSION['type_month_all'])) {echo $_SESSION['type_month_all'].".php";}
      else {echo "month_all.php";}
    } else
      echo "month.php";
    echo "\";\n";
    ?>
    return true;
		}
		</script>
    <?php

if (!(isset($desactive_bandeau_sup) and ($desactive_bandeau_sup==1) and ($type_session != 'with_session'))) {
    // On fabrique une date valide pour la réservation si ce n'est pas le cas
    $date_ = mktime(0, 0, 0, $month, $day, $year);
    if ($date_ < getSettingValue("begin_bookings"))
        $date_ = getSettingValue("begin_bookings");
    else if ($date_ > getSettingValue("end_bookings"))
        $date_ = getSettingValue("end_bookings");
    $day   = date("d",$date_);
    $month = date("m",$date_);
    $year  = date("Y",$date_);
?>

   <table width="100%" border="0">
    <tr>
      <td class="border_banner">
       <table width="100%" border="0">
        <tr>
        <?php
        $nom_picture = "./images/".getSettingValue("logo");
        if ((getSettingValue("logo")!='') and (@file_exists($nom_picture)))
         echo "<td class=\"banner\"><img src=\"".$nom_picture."\" class=\"image\" alt=\"logo\" /></td>\n";
         echo "<td class=\"banner\">\n";
          echo "&nbsp;<a href=\"".page_accueil('yes')."day=$day&amp;year=$year&amp;month=$month\">".get_vocab("welcome")."</a>";
          echo " - <b>".getSettingValue("company")."</b>";
          if ($type_session == 'no_session') {
            if ((getSettingValue('sso_statut') == 'cas_visiteur') or (getSettingValue('sso_statut') == 'cas_utilisateur'))
					  {
					    echo "<br />&nbsp;<a href='index.php?force_authentification=y'>".get_vocab("authentification")."</a>";
//					    echo "<br />&nbsp;<small><i><a href='login.php?url=".rawurlencode(str_replace('&amp;','&',get_request_uri()))."'>".get_vocab("connect_local")."</a></i></small>";
// corrige un bug dans le calcul de la page d'accueil après connexion.
					    echo "<br />&nbsp;<small><i><a href='login.php'>".get_vocab("connect_local")."</a></i></small>";
					  }
				    else
					  {
// echo "<br />&nbsp;<a href='login.php?url=".rawurlencode(str_replace('&amp;','&',get_request_uri()))."'>".get_vocab("connect")."</a>";
// corrige un bug dans le calcul de la page d'accueil après connexion.
					    echo "<br />&nbsp;<a href='login.php'>".get_vocab("connect")."</a>";
            }
          } else {
            echo "<br />&nbsp;<b>".get_vocab("welcome_to").grr_htmlSpecialChars($_SESSION['prenom'])." ".grr_htmlSpecialChars($_SESSION['nom'])."</b>";
            echo "<br />&nbsp;<a href=\"my_account.php?day=".$day."&amp;year=".$year."&amp;month=".$month."\">".get_vocab("manage_my_account")."</a>";
            //if ($type_session == "with_session") {
            $parametres_url = '';
                 $_SESSION['chemin_retour'] = '';
                 if (isset($_SERVER['QUERY_STRING']) and ($_SERVER['QUERY_STRING'] != '')) {
                     // Il y a des paramètres à passer
                     $parametres_url = grr_htmlSpecialChars($_SERVER['QUERY_STRING'])."&amp;";
                     $_SESSION['chemin_retour'] = traite_grr_url($grr_script_name)."?". $_SERVER['QUERY_STRING'];
                 }
                 echo " - <a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=fr\"><img src=\"img_grr/fr_dp.png\" alt=\"France\" title=\"france\" width=\"20\" height=\"13\" class=\"image\" /></a>\n";
                 echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=de\"><img src=\"img_grr/de_dp.png\" alt=\"Deutch\" title=\"deutch\" width=\"20\" height=\"13\" class=\"image\" /></a>\n";
                 echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=en\"><img src=\"img_grr/en_dp.png\" alt=\"English\" title=\"English\" width=\"20\" height=\"13\" class=\"image\" /></a>\n";
                 echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=it\"><img src=\"img_grr/it_dp.png\" alt=\"Italiano\" title=\"Italiano\" width=\"20\" height=\"13\" class=\"image\" /></a>\n";
                 echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=es\"><img src=\"img_grr/es_dp.png\" alt=\"Spanish\" title=\"Spanish\" width=\"20\" height=\"13\" class=\"image\" /></a>\n";

            //}
            $disconnect_link = false;
            if (!((getSettingValue("cacher_lien_deconnecter")=='y') and (isset($_SESSION['est_authentifie_sso'])))) {
               // on n'affiche pas le lien logout dans le cas d'un utilisateur LCS connecté.
               $disconnect_link = true;
               if (getSettingValue("authentification_obli") == 1) {
                   echo "<br />&nbsp;<a href=\"./logout.php?auto=0\" >".get_vocab('disconnect')."</a>";
               } else {
                   echo "<br />&nbsp;<a href=\"./logout.php?auto=0&amp;redirect_page_accueil=yes\" >".get_vocab('disconnect')."</a>";
               }
            }
            if ((getSettingValue("Url_portail_sso")!='') and (isset($_SESSION['est_authentifie_sso']))) {
                if ($disconnect_link)
                   echo "&nbsp;-&nbsp;";
                else
                   echo "<br />&nbsp;";
                echo('<a href="'.getSettingValue("Url_portail_sso").'">'.get_vocab("Portail_accueil").'</a>');
             }
             // Cas d'une authentification LASSO
             if ((getSettingValue('sso_statut') == 'lasso_visiteur') or (getSettingValue('sso_statut') == 'lasso_utilisateur')) {
               echo "<br />&nbsp;";
               if ($_SESSION['lasso_nameid'] == NULL)
                 echo "<a href=\"lasso/federate.php\">".get_vocab('lasso_federate_this_account')."</a>";
               else
                 echo "<a href=\"lasso/defederate.php\">".get_vocab('lasso_defederate_this_account')."</a>";
               }
          }
      ?>
     </td>
     <?php
	   if (((isset($area)) and ($area > 0)) or ((isset($room)) and ($room > 0)))
	      // si aucune ressource ni domaine ne sont définis, on affiche pas la colonne de sélection du jour
        $affiche_col_date = TRUE;
	   else
	      $affiche_col_date = FALSE;

     if (($page=="no_admin") and ($affiche_col_date)) {
     ?>
         <td class="banner"  align="center">
           <form id="myform" action="" method="get" onsubmit="return onsubmitForm();"><div>
           <?php
           genDateSelector("", $day, $month, $year,"");
    		   if ((isset($area)) and ($area > 0))
             echo "<input type=\"hidden\" id=\"area_\" name=\"area\" value=\"$area\" />";
    		   if ((isset($room)) and ($room > 0))
             echo "<input type=\"hidden\" id=\"room_\" name=\"room\" value=\"$room\" />";
           ?>
		   <input type="submit" value="<?php echo get_vocab("gototoday") ?>" onclick="document.pressed='a'" />
           <br />
           <br />
           <input type="submit" value="<?php echo get_vocab("allday") ?>" onclick="document.pressed='d'" />
           <input type="submit" value="<?php echo get_vocab("week") ?>" onclick="document.pressed='w'" />
           <input type="submit" value="<?php echo get_vocab("month") ?>" onclick="document.pressed='m'" />
           </div></form>
         </td>
         <?php
     }
     if ($type_session == "with_session") {
          if ((authGetUserLevel(getUserName(),-1,'area') >= 4) or (authGetUserLevel(getUserName(),-1,'user') == 1))  {
           echo "<td class=\"banner\" align=\"center\">";
           echo "<a href='admin_accueil.php?day=$day&amp;month=$month&amp;year=$year'>".get_vocab("admin")."</a>\n";
           if(authGetUserLevel(getUserName(),-1,'area') >= 6)  {
              echo "<br />\n<form action=\"admin_save_mysql.php\" method=\"get\"><div>\n
              <input type=\"hidden\" name=\"flag_connect\" value=\"yes\" />\n
              <input type=\"submit\" value=\"".get_vocab("submit_backup")."\" /></div>\n
              </form>";
              how_many_connected();
           }
           echo "\n</td>";
      }
     }
      ?>
          <td class="banner" align="center">
      <?php
      if (@file_exists($clock_file)) {
        echo "<script type=\"text/javascript\">";
        echo "<!--\n";
        echo "new LiveClock();\n";
        echo "//-->";
        echo "</script><br />";
      }

      echo grr_help("","")."<br />";
      if (verif_access_search(getUserName())) {
          echo "<a href=\"report.php\">".get_vocab("report")."</a><br />";
      }
      echo "<span class=\"small\">".affiche_version()."</span> - ";
      if ($type_session == "with_session") {
          if ($_SESSION['statut'] == 'administrateur') {
              echo affiche_lien_contact("contact_support","identifiant:non","seulement_si_email");
          } else {
              echo affiche_lien_contact("contact_administrateur","identifiant:non","seulement_si_email");
          }
      } else {
          echo affiche_lien_contact("contact_administrateur","identifiant:non","seulement_si_email");
      }

          ?>
         </td>
        </tr>
       </table>
      </td>
     </tr>
    </table>
<?php
}
if (isset($use_prototype))
    echo "<script type=\"text/javascript\" src=\"./include/prototype-1.6.0.3.js\"></script>";
if (isset($use_tooltip_js))
    echo "<script type=\"text/javascript\" src=\"./include/tooltip.js\"></script>";
echo getSettingValue('message_accueil');
  }
}
コード例 #12
0
ファイル: functions.inc.php プロジェクト: HNygard/JM-booking
function print_header($day, $month, $year, $area)
{
    global $lang, $mrbs_company, $search_str, $nrbs_pageheader, $instance, $language_available, $session_selected_language, $header_links;
    global $userinfo, $testSystem;
    global $selected_room;
    if (!isset($selected_room)) {
        $selected_room = 0;
    }
    # If we dont know the right date then make it up
    if (!$day) {
        $day = date("d");
    }
    if (!$month) {
        $month = date("m");
    }
    if (!$year) {
        $year = date("Y");
    }
    if (empty($search_str)) {
        $search_str = "";
    }
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">' . chr(10);
    echo '<html>' . chr(10);
    echo '<head>' . chr(10);
    echo '	<title>JM-booking</title>' . chr(10);
    include "style.inc.php";
    echo '	<link type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" ' . 'rel="stylesheet" />' . chr(10);
    echo '	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script src="js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script type="text/javascript" src="js/bsn.AutoSuggest_2.1.3_comp.js">' . '</script>' . chr(10);
    echo '</head>' . chr(10) . chr(10);
    echo '<body' . $testSystem['bodyAttrib'] . '>' . chr(10);
    if (!isset($GLOBALS["pview"]) || $GLOBALS["pview"] != 1) {
        echo '<table width="100%" class="hiddenprint">' . chr(10);
        if (strlen($nrbs_pageheader) > 0) {
            echo '<tr><td style="text-align:center;">' . $nrbs_pageheader . '</td></tr>' . chr(10);
        }
        echo '	<tr>' . chr(10) . '	<td bgcolor="#5B69A6">' . chr(10) . '		<table width="100%" border=0>' . chr(10) . '			<tr>' . chr(10) . '				<td class="banner" ' . 'style="text-align:center; font-size: 18px; font-weight: bold;">' . $mrbs_company . '</td>' . chr(10) . '				<td class="banner">' . chr(10) . '					<table>' . chr(10) . '						<tr>' . chr(10) . '							<td align="right">' . '<form action="day.php" method="get" style="margin: 0px; padding: 0px;">';
        //formHiddenFields();
        genDateSelector("", $day, $month, $year);
        if (!empty($area)) {
            echo '<input type="hidden" name="area" value=' . $area . '>';
        }
        echo '<input type="submit" value="' . _('View day') . '">' . iconHTML('calendar_view_day') . '</form>';
        echo '</td>' . chr(10);
        // Week
        echo '							<td align="right">' . '<form action="week.php" method="get" style="margin: 0px; padding: 0px;">';
        if (!empty($area)) {
            echo '<input type="hidden" name="area" value="' . $area . '">';
        }
        $thistime = mktime(0, 0, 0, $month, $day, $year);
        $thisweek = date('W', $thistime);
        $thisyear = date('Y', $thistime);
        echo '<select name="week">';
        for ($i = 1; $i <= 52; $i++) {
            echo '<option value="' . $i . '"';
            if ($i == $thisweek) {
                echo ' selected="selected"';
            }
            echo '>' . $i . '</option>';
        }
        echo '</select>';
        echo '<select name="year">';
        for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
            echo '<option value="' . $i . '"';
            if ($i == $thisyear) {
                echo ' selected="selected"';
            }
            echo '>' . $i . '</option>';
        }
        echo '</select>';
        echo '<input type="submit" value="' . _('View week') . '">';
        echo iconHTML('calendar_view_week');
        echo '</form>' . '</td>' . chr(10) . '						</tr>' . chr(10);
        // Month
        echo '						<tr>' . chr(10) . '							<td align="right">' . '<form action="month.php" method="get" style="margin: 0px; padding: 0px;">';
        echo '<input type="hidden" name="area" value="' . $area . '">';
        echo '<input type="hidden" name="day" value="1">';
        $thistime = mktime(0, 0, 0, $month, $day, $year);
        $thismonth = date('n', $thistime);
        $thisyear = date('Y', $thistime);
        echo '<select name="month">';
        for ($i = 1; $i <= 12; $i++) {
            $thismonthtime = mktime(0, 0, 0, $i, 1, $year);
            echo '<option value="' . $i . '"';
            if ($i == $thismonth) {
                echo ' selected="selected"';
            }
            echo '>' . _(date("M", $thismonthtime)) . '</option>';
        }
        echo '</select>';
        echo '<select name="year">';
        for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
            echo '<option value="' . $i . '"';
            if ($i == $thisyear) {
                echo ' selected="selected"';
            }
            echo '>' . $i . '</option>';
        }
        echo '</select>';
        echo '<input type="submit" value="' . _('View month') . '">' . iconHTML('calendar_view_month');
        echo '</form></td>' . chr(10);
        // Find using entry_id
        echo '							<td align="right">';
        echo '<form action="entry.php" method="get" style="margin: 0px; padding: 0px;">';
        echo '<input type="text" id="entry_id_finder" name="entry_id" ' . 'value="' . _('Enter entry ID') . '" ' . 'onclick="document.getElementById(\'entry_id_finder\').value=\'\';">';
        echo '<input type="submit" value="' . _('Find') . '">';
        echo '</form>';
        echo '</td>' . chr(10);
        echo '						</tr>' . chr(10) . '					</table>' . chr(10);
        echo '				</td>' . chr(10);
        echo '				<td class="banner" align="center">' . chr(10);
        echo '					' . _("Logged in as") . ' <a href="user.php?user_id=' . $userinfo['user_id'] . '">' . $userinfo['user_name'] . '</a><br>' . chr(10);
        echo '					<a href="logout.php">' . iconHTML('bullet_delete') . ' ' . _("Log out") . '</a><br>' . chr(10);
        echo '					<a href="admin.php">' . iconHTML('bullet_wrench') . ' ' . _("Administration") . '</a>' . chr(10);
        echo '				</td>' . chr(10);
        echo '			</tr>' . chr(10) . '		</table>' . chr(10);
        echo '		 -:- <a class="menubar" href="./edit_entry2.php?day=' . $day . '&amp;month=' . $month . '&amp;year=' . $year . '&amp;area=' . $area . '&amp;room=' . $selected_room . '">' . iconHTML('page_white_add') . ' ' . _('Make a new entry') . '</a>' . chr(10);
        //echo '		 -:- <a class="menubar" href="./new_entries.php">'.
        //iconHTML('table').' '.
        //_('List with new entries').'</a>'.chr(10);
        echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=not_confirmed">' . iconHTML('email_delete') . ' ' . _('Not confirmed') . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=no_user_assigned">' . iconHTML('user_delete') . ' ' . _('No users assigned') . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=servering">' . iconHTML('drink') . ' ' . 'Servering</a>' . chr(10);
        #echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=next_100">'.
        #iconHTML('page_white_go').' '.
        #_('Next 100').'</a>'.chr(10);
        echo '		 -:- <a class="menubar" href="./statistikk.php">' . iconHTML('chart_bar') . ' ' . 'Statistikk</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./customer_list.php">' . iconHTML('group') . ' ' . _('Customers') . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./invoice_main.php">' . iconHTML('coins') . ' ' . _('Invoice') . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./user_list.php">' . iconHTML('user') . ' ' . _('Userlist') . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="./entry_filters.php?filters=a:1:{i:0;a:3:{i:0;s:10:%22entry_name%22;i:1;s:0:%22%22;i:2;s:0:%22%22;}}&amp;return_to=entry_list">' . iconHTML('find') . ' ' . 'Bookings&oslash;k' . '</a>' . chr(10);
        echo '		 -:- <a class="menubar" href="http://booking.jaermuseet.local/wiki/">' . iconHTML('wiki_icon', '.gif', 'height: 16px;') . ' ' . 'Wiki' . '</a>' . chr(10);
        echo '		 -:-' . chr(10);
        echo '		</td>' . chr(10) . '	</tr>' . chr(10) . '</table>' . chr(10);
    }
}
コード例 #13
0
    echo get_vocab("search_criteria");
    ?>
</legend>
      
        <div id="div_report_start">
          <?php 
    echo "<label>" . get_vocab("report_start") . ":</label>\n";
    genDateSelector("from_", $from_day, $from_month, $from_year);
    ?>
        
        </div>
      
        <div id="div_report_end">
          <?php 
    echo "<label>" . get_vocab("report_end") . ":</label>\n";
    genDateSelector("to_", $to_day, $to_month, $to_year);
    ?>
        </div>
      
        <div id="div_areamatch">                  
          <label for="areamatch"><?php 
    echo get_vocab("match_area");
    ?>
:</label>
          <input type="text" id="areamatch" name="areamatch" value="<?php 
    echo htmlspecialchars($areamatch);
    ?>
">
        </div>   
      
        <div id="div_roommatch">
コード例 #14
0
function print_header($day, $month, $year, $area)
{
    global $search_str, $nrbs_pageheader, $testSystem, $login;
    debugAddToLog(__FILE__, __LINE__, 'Start of glob_inc.inc.php');
    # If we dont know the right date then make it up
    if (!$day) {
        $day = date('d');
    }
    if (!$month) {
        $month = date('m');
    }
    if (!$year) {
        $year = date('Y');
    }
    if (empty($search_str)) {
        $search_str = '';
    }
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">' . chr(10);
    echo '<html>' . chr(10);
    echo '<head>' . chr(10);
    echo '	<title>JM-booking</title>' . chr(10);
    echo '	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' . chr(10);
    echo '  <link rel="SHORTCUT ICON" HREF="./favicon.ico">' . chr(10);
    echo '	<link rel="stylesheet" type="text/css" href="css/jm-booking.css" />' . chr(10);
    echo '	<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" />' . chr(10);
    echo '	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script src="js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>' . chr(10) . chr(10);
    echo '	<script type="text/javascript" src="js/bsn.AutoSuggest_2.1.3_comp.js">' . '</script>' . chr(10);
    echo '</head>' . chr(10) . chr(10);
    echo '<body' . $testSystem['bodyAttrib'] . '>' . chr(10);
    echo '<table width="100%" class="hiddenprint">' . chr(10);
    if (strlen($nrbs_pageheader) > 0) {
        echo '<tr><td style="text-align:center;">' . $nrbs_pageheader . '</td></tr>' . chr(10);
    }
    echo '	<tr>' . chr(10) . '	<td bgcolor="#5B69A6">' . chr(10) . '		<table width="100%" border=0>' . chr(10) . '			<tr>' . chr(10) . '				<td class="banner' . $testSystem['bannerExtraClass'] . '" ' . 'style="text-align:center; font-size: 18px; font-weight: bold;">' . '<a href="./" class="lightbluebg">Booking for<br>J&aelig;rmuseet</a>' . '</td>' . chr(10) . '				<td class="banner' . $testSystem['bannerExtraClass'] . '">' . chr(10) . '					<table>' . chr(10) . '						<tr>' . chr(10) . '							<td align="right">' . '<form action="day.php" method="get" style="margin: 0px; padding: 0px;">';
    genDateSelector("", $day, $month, $year);
    if (!empty($area)) {
        echo '<input type="hidden" name="area" value=' . $area . '>';
    }
    echo '<input type="submit" value="' . __('View day') . '">' . iconHTML('calendar_view_day') . '</form>';
    echo '</td>' . chr(10);
    // Week
    echo '							<td align="right">' . '<form action="week.php" method="get" style="margin: 0px; padding: 0px;">';
    if (!empty($area)) {
        echo '<input type="hidden" name="area" value="' . $area . '">';
    }
    $thistime = mktime(0, 0, 0, $month, $day, $year);
    $thisweek = date('W', $thistime);
    $thisyear = date('Y', $thistime);
    echo '<select name="week">';
    for ($i = 1; $i <= 52; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisweek) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<select name="year">';
    for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisyear) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<input type="submit" value="' . __('View week') . '">';
    echo iconHTML('calendar_view_week');
    echo '</form>' . '</td>' . chr(10) . '						</tr>' . chr(10);
    // Month
    echo '						<tr>' . chr(10) . '							<td align="right">' . '<form action="month.php" method="get" style="margin: 0px; padding: 0px;">';
    echo '<input type="hidden" name="area" value="' . $area . '">';
    echo '<input type="hidden" name="day" value="1">';
    $thistime = mktime(0, 0, 0, $month, $day, $year);
    $thismonth = date('n', $thistime);
    $thisyear = date('Y', $thistime);
    echo '<select name="month">';
    for ($i = 1; $i <= 12; $i++) {
        $thismonthtime = mktime(0, 0, 0, $i, 1, $year);
        echo '<option value="' . $i . '"';
        if ($i == $thismonth) {
            echo ' selected="selected"';
        }
        echo '>' . __(date("M", $thismonthtime)) . '</option>';
    }
    echo '</select>';
    echo '<select name="year">';
    for ($i = $thisyear - 1; $i <= $thisyear + 10; $i++) {
        echo '<option value="' . $i . '"';
        if ($i == $thisyear) {
            echo ' selected="selected"';
        }
        echo '>' . $i . '</option>';
    }
    echo '</select>';
    echo '<input type="submit" value="' . _h('View month') . '">' . iconHTML('calendar_view_month');
    echo '</form></td>' . chr(10);
    // Find using entry_id
    echo '							<td align="right">';
    echo '<form action="entry.php" method="get" style="margin: 0px; padding: 0px;">';
    echo '<input type="text" id="entry_id_finder" name="entry_id" ' . 'value="' . __('Enter entry ID') . '" ' . 'onclick="document.getElementById(\'entry_id_finder\').value=\'\';">';
    echo '<input type="submit" value="' . __('Find') . '">';
    echo '</form>';
    echo '</td>' . chr(10);
    echo '						</tr>' . chr(10) . '					</table>' . chr(10);
    echo '				</td>' . chr(10);
    echo '				<td class="banner' . $testSystem['bannerExtraClass'] . '" align="center">' . chr(10);
    echo '					' . __("Logged in as") . ' <a href="user.php?user_id=' . $login['user_id'] . '">' . htmlentities($login['user_name'], ENT_QUOTES) . '</a><br>' . chr(10);
    echo '					<a href="logout.php">' . iconHTML('bullet_delete') . ' ' . __("Log out") . '</a><br>' . chr(10);
    echo '					<a href="admin.php">' . iconHTML('bullet_wrench') . ' ' . __("Administration") . '</a>' . chr(10);
    echo '				</td>' . chr(10);
    echo '			</tr>' . chr(10) . '		</table>' . chr(10);
    echo '		 -:- <a class="menubar" href="./edit_entry2.php?day=' . $day . '&amp;month=' . $month . '&amp;year=' . $year . '&amp;area=' . $area . '&amp;room=">' . iconHTML('page_white_add') . ' ' . __('Make a new entry') . '</a>' . chr(10);
    //echo '		 -:- <a class="menubar" href="./new_entries.php">'.
    //iconHTML('table').' '.
    //_('List with new entries').'</a>'.chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=not_confirmed">' . iconHTML('email_delete') . ' ' . __('Not confirmed') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=no_user_assigned">' . iconHTML('user_delete') . ' ' . __('No users assigned') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=servering">' . iconHTML('drink') . ' ' . 'Servering</a>' . chr(10);
    #echo '		 -:- <a class="menubar" href="./entry_list.php?listtype=next_100">'.
    #iconHTML('page_white_go').' '.
    #_('Next 100').'</a>'.chr(10);
    echo '		 -:- <a class="menubar" href="./statistikk.php">' . iconHTML('chart_bar') . ' ' . 'Statistikk</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./customer_list.php">' . iconHTML('group') . ' ' . __('Customers') . '</a>' . chr(10);
    if ($login['user_invoice'] || $login['user_invoice_setready']) {
        echo '		 -:- <a class="menubar" href="./invoice_main.php';
        // By default, use the current area when going into the invoice part
        if (!$login['user_invoice']) {
            echo '?area_id=' . $area;
        }
        echo '">' . iconHTML('coins') . ' ' . __('Invoice') . '</a>' . chr(10);
    }
    echo '		 -:- <a class="menubar" href="./user_list.php">' . iconHTML('user') . ' ' . __('Userlist') . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="./entry_filters.php?filters=a:1:{i:0;a:3:{i:0;s:10:%22entry_name%22;i:1;s:0:%22%22;i:2;s:0:%22%22;}}&amp;return_to=entry_list">' . iconHTML('find') . ' ' . 'Bookings&oslash;k' . '</a>' . chr(10);
    echo '		 -:- <a class="menubar" href="http://booking.jaermuseet.local/wiki/">' . iconHTML('wiki_icon', '.gif', 'height: 16px;') . ' ' . 'Wiki' . '</a>' . chr(10);
    echo '		 -:-' . chr(10);
    echo '		</td>' . chr(10) . '	</tr>' . chr(10) . '</table>' . chr(10);
    debugAddToLog(__FILE__, __LINE__, 'Finished printing header');
}
コード例 #15
0
ファイル: changement_d_annee.php プロジェクト: rhertzog/lcs
$test = mysqli_query($GLOBALS["mysqli"], $sql);
if (mysqli_num_rows($test) > 0) {
    echo "<p style='margin-bottom:1em;'>Un ou des professeurs ont paramétré l'ordre d'affichage de leurs enseignements ou le non affichage de certains enseignements en page d'accueil simplifiée.<br />\n\tLes nouveaux enseignements créés avec l'année qui va commencer ne devraient pas avoir les mêmes identifiants (<em>id_groupe</em>), mais par précaution, ces préférences seront supprimées lors de la validation de ce formulaire.</p>";
}
echo "<input type='hidden' name='is_posted' value='1' />\n";
echo "<input type='submit' name='Valider' value='Valider' />\n";
echo "</fieldset>\n";
echo "</form>\n";
echo "<br />\n";
$lday = strftime("%d", getSettingValue("end_bookings"));
$lmonth = strftime("%m", getSettingValue("end_bookings"));
$lyear = date('Y') - 1;
echo "<form action='" . $_SERVER['PHP_SELF'] . "' method='post' name='form1' style='width: 100%;'>\n\t<fieldset style='border: 1px solid grey; background-image: url(\"../images/background/opacite50.png\"); '>\n\t\t" . add_token_field() . "\n\t\t<p>\n\t\t\t<em>Optionnel&nbsp;:</em> Nettoyer les tables 'log' et 'tentative_intrusion'.<br />\n\t\t\tCette table contient les dates de connexion/déconnexion des utilisateurs.<br />\n\t\t\tConserver ces informations au-delà d'une année n'a pas vraiment d'intérêt.<br >\n\t\t\tAu besoin, si vous avez pris soin d'effectuer une sauvegarde de la base, les informations y sont.\n\t\t</p>\n\t\t<p><input type='checkbox' id='clean_log' name='clean_log' value='y' checked /><label for='clean_log'>Nettoyer les logs de connexion antérieurs au</label>&nbsp;:&nbsp;";
genDateSelector("log_", $lday, $lmonth, $lyear, "more_years");
echo "<br />\n\t\t\t<input type='checkbox' id='clean_tentative_intrusion' name='clean_tentative_intrusion' value='y' checked /><label for='clean_tentative_intrusion'>Nettoyer les logs de tentatives d'intrusion antérieurs au</label>&nbsp;:&nbsp;";
genDateSelector("ti_", $lday, $lmonth, $lyear, "more_years");
echo "</p>\n\t\t<input type='hidden' name='is_posted' value='2' />\n\t\t<input type='submit' name='Valider' value='Valider' />\n\n\t\t<p><em>NOTE&nbsp;:</em> La CNIL recommande de ne pas conserver plus de 6 mois de journaux de connexion.</p>\n\t</fieldset>\n</form>\n";
echo "<p><br /></p>\n";
echo "<p style='text-indent:-11em; margin-left:11em;'><em>Optionnel également&nbsp;:</em> Vous pouvez vider les absences de l'année passée, l'emploi du temps, les incidents/sanctions du module discipline en consultant la page de <a href='../utilitaires/clean_tables.php#nettoyage_par_le_vide'>Nettoyage de la base</a>.</p>\n";
echo "<p><br /></p>\n";
echo "<a name='svg_ext'></a>";
echo "<p><em>NOTES&nbsp;:</em></p>\n";
echo "<ul>\n";
echo "<li>\n";
echo "<p>La sauvegarde sur périphérique externe permet de remettre en place un GEPI si jamais votre GEPI en ligne subit des dégats (<em>crash du disque dur hébergeant votre GEPI, incendie du local serveur,...</em>).<br />Vous n'aurez normalement jamais besoin de ces sauvegardes, mais mieux vaut prendre des précautions.</p>\n";
echo "</li>\n";
echo "<li>\n";
echo "<p>Lors de l'initialisation de l'année, la date à laquelle une période a été close pour telle classe sera réinitialisée.<br />Ce n'était pas le cas pour une initialisation faite avant le 17/09/2012.<br />Pour forcer cette réinitialisation, <a href='" . $_SERVER['PHP_SELF'] . "?reinit_dates_verrouillage_periode=y" . add_token_in_url() . "'>cliquer ici</a>.<br />Cette date de verrouillage présente un intérêt pour l'accès des responsables et élèves aux appréciations des bulletins dans le cas où vous avez choisi un accès automatique N jours après la clôture de la période.</p>\n";
if (getSettingValue("active_module_absence") == "2") {
    echo "<p>Ces dates de verrouillage, indiquant à quelle date la période de notes a été close, n'ont rien à voir avec les dates déclarées pour les fins de périodes d'absences dans la page de Verrouillage.<br />\n\tLes dates de fin de période affichées dans la page de Verrouillage concernent la liste des élèves qui seront présentés dans vos groupes/classes pour la saisie des absences (<em>tel élève arrivé au 2è trimestre ou ayant changé de classe,... doit ou ne doit pas apparaître sur telle période dans tel groupe/classe</em>).</p>\n";
}
コード例 #16
0
function print_user_header_mrbs($day = NULL, $month = NULL, $year = NULL, $area = NULL)
{
    global $mrbs_company, $mrbs_company_url, $search_str, $locale_warning;
    $cfg_mrbs = get_config('block/mrbs');
    $strmrbs = get_string('blockname', 'block_mrbs');
    if (!($site = get_site())) {
        redirect($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
    }
    $navlinks = array();
    $navlinks[] = array('name' => $strmrbs, 'link' => $cfgmrbs->serverpath . 'index.php', 'type' => 'misc');
    $pagetitle = '';
    $navigation = build_navigation($navlinks);
    print_header("{$site->shortname}: {$strmrbs}: {$pagetitle}", $strmrbs, $navigation, '', '', true, '', user_login_string($site));
    # If we dont know the right date then make it up
    if (!$day) {
        $day = date("d");
    }
    if (!$month) {
        $month = date("m");
    }
    if (!$year) {
        $year = date("Y");
    }
    if (empty($search_str)) {
        $search_str = "";
    }
    /*
        if ($unicode_encoding)
        {
            header("Content-Type: text/html; charset=utf-8");
        }
        else
        {
            
            header("Content-Type: text/html; charset=".get_string('charset','block_mrbs'));
        }
    
        header("Pragma: no-cache");                          // HTTP 1.0
        header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
    */
    /*<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                          "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
      <HEAD>
    *  
    */
    ?>

<?php 
    include "style.php";
    ?>
 <TITLE><?php 
    echo get_string('mrbs', 'block_mrbs');
    ?>
</TITLE>
    <SCRIPT LANGUAGE="JavaScript">

<!-- Begin

/*   Script inspired by "True Date Selector"
     Created by: Lee Hinder, lee.hinder@ntlworld.com 
     
     Tested with Windows IE 6.0
     Tested with Linux Opera 7.21, Mozilla 1.3, Konqueror 3.1.0
     
*/

function daysInFebruary (year){
  // February has 28 days unless the year is divisible by four,
  // and if it is the turn of the century then the century year
  // must also be divisible by 400 when it has 29 days
  return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}

//function for returning how many days there are in a month including leap years
function DaysInMonth(WhichMonth, WhichYear)
{
  var DaysInMonth = 31;
  if (WhichMonth == "4" || WhichMonth == "6" || WhichMonth == "9" || WhichMonth == "11")
    DaysInMonth = 30;
  if (WhichMonth == "2")
    DaysInMonth = daysInFebruary( WhichYear );
  return DaysInMonth;
}

//function to change the available days in a months
function ChangeOptionDays(formObj, prefix)
{
  var DaysObject = eval("formObj." + prefix + "day");
  var MonthObject = eval("formObj." + prefix + "month");
  var YearObject = eval("formObj." + prefix + "year");

  if (DaysObject.selectedIndex && DaysObject.options)
    { // The DOM2 standard way
    // alert("The DOM2 standard way");
    var DaySelIdx = DaysObject.selectedIndex;
    var Month = parseInt(MonthObject.options[MonthObject.selectedIndex].value);
    var Year = parseInt(YearObject.options[YearObject.selectedIndex].value);
    }
  else if (DaysObject.selectedIndex && DaysObject[DaysObject.selectedIndex])
    { // The legacy MRBS way
    // alert("The legacy MRBS way");
    var DaySelIdx = DaysObject.selectedIndex;
    var Month = parseInt(MonthObject[MonthObject.selectedIndex].value);
    var Year = parseInt(YearObject[YearObject.selectedIndex].value);
    }
  else if (DaysObject.value)
    { // Opera 6 stores the selectedIndex in property 'value'.
    // alert("The Opera 6 way");
    var DaySelIdx = parseInt(DaysObject.value);
    var Month = parseInt(MonthObject.options[MonthObject.value].value);
    var Year = parseInt(YearObject.options[YearObject.value].value);
    }

  // alert("Day="+(DaySelIdx+1)+" Month="+Month+" Year="+Year);

  var DaysForThisSelection = DaysInMonth(Month, Year);
  var CurrentDaysInSelection = DaysObject.length;
  if (CurrentDaysInSelection > DaysForThisSelection)
  {
    for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
    {
      DaysObject.options[DaysObject.options.length - 1] = null
    }
  }
  if (DaysForThisSelection > CurrentDaysInSelection)
  {
    for (i=0; i<DaysForThisSelection; i++)
    {
      DaysObject.options[i] = new Option(eval(i + 1));
    }
  }
  if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex = 0;
  if (DaySelIdx >= DaysForThisSelection)
    DaysObject.selectedIndex = DaysForThisSelection-1;
  else
    DaysObject.selectedIndex = DaySelIdx;
}

  //  End -->
    </SCRIPT>
  </HEAD>
  <BODY BGCOLOR="#ffffed" TEXT=black LINK="#5B69A6" VLINK="#5B69A6" ALINK=red>
       <?php 
    if ($GLOBALS["pview"] != 1) {
        ?>

   <?php 
        # show a warning if this is using a low version of php
        if (substr(phpversion(), 0, 1) == 3) {
            echo get_string('not_php3', 'block_mrbs');
        }
        if (!empty($locale_warning)) {
            echo "[Warning: " . $locale_warning . "]";
        }
        ?>

    <TABLE WIDTH="100%">
      <TR>
        <TD BGCOLOR="#5B69A6">
          <TABLE WIDTH="100%" BORDER=0>
            <TR>
              <TD CLASS="banner" BGCOLOR="#C0E0FF">
          <FONT SIZE=4><B><a href='<?php 
        echo $mrbs_company_url;
        ?>
'><?php 
        echo $mrbs_company;
        ?>
</a></B><BR>
           <?php 
        echo get_string('mrbs', 'block_mrbs');
        ?>
                </FONT>
              </TD>
              <TD CLASS="banner" BGCOLOR="#C0E0FF">
                <FORM ACTION="userweek.php" METHOD=GET name="Form1">
                  <FONT SIZE=2>
<?php 
        genDateSelector("", $day, $month, $year);
        // Note: The 1st arg must match the last arg in the call to ChangeOptionDays below.
        if (!empty($area)) {
            echo "\r\n                    <INPUT TYPE=HIDDEN NAME=area VALUE={$area}>\n";
        }
        ?>
                <SCRIPT LANGUAGE="JavaScript">
                    <!--
                    // fix number of days for the $month/$year that you start with
                    ChangeOptionDays(document.Form1, ''); // Note: The 2nd arg must match the first in the call to genDateSelector above.
                    // -->
                    </SCRIPT>
        <INPUT TYPE=SUBMIT VALUE="<?php 
        echo get_string('goto', 'block_mrbs');
        ?>
">
                  </FONT>
                </FORM>
              </TD>


              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
          <A HREF="help.php?day=<?php 
        echo $day;
        ?>
&month=<?php 
        echo $month;
        ?>
&year=<?php 
        echo $year;
        ?>
"><?php 
        echo get_string('help');
        ?>
</A>
              </TD>
             
<?php 
        # For session protocols that define their own logon box...
        #    if (function_exists('PrintLogonBox')) {
        #        PrintLogonBox();
        #       }
        ?>
            </TR>
          </TABLE>
        </TD>
      </TR>
    </TABLE>
<?php 
    }
}
コード例 #17
0
ファイル: search.php プロジェクト: verdurin/mrbs-mcr
}
# Need all these different versions with different escaping.
# search_str must be left as the html-escaped version because this is
# used as the default value for the search box in the header.
if (!empty($search_str)) {
    $search_text = unslashes($search_str);
    $search_url = urlencode($search_text);
    $search_str = htmlspecialchars($search_text);
}
print_header($day, $month, $year, $area);
if (!empty($advanced)) {
    echo "<H3>" . get_vocab("advanced_search") . "</H3>";
    echo "<FORM METHOD=GET ACTION=\"search.php\">";
    echo get_vocab("search_for") . " <INPUT TYPE=TEXT SIZE=25 NAME=\"search_str\"><br>";
    echo get_vocab("from") . " ";
    genDateSelector("", $day, $month, $year);
    echo "<br><INPUT TYPE=SUBMIT VALUE=\"" . get_vocab("search_button") . "\">";
    echo "</FORM>";
    include "trailer.inc";
    exit;
}
if (!$search_str) {
    echo "<H3>" . get_vocab("invalid_search") . "</H3>";
    include "trailer.inc";
    exit;
}
# now is used so that we only display entries newer than the current time
echo "<H3>" . get_vocab("search_results") . ": \"<font color=\"blue\">{$search_str}</font>\"</H3>\n";
$now = mktime(0, 0, 0, $month, $day, $year);
# This is the main part of the query predicate, used in both queries:
$sql_pred = "( " . sql_syntax_caseless_contains("E.create_by", $search_text) . " OR " . sql_syntax_caseless_contains("E.name", $search_text) . " OR " . sql_syntax_caseless_contains("E.description", $search_text) . ") AND E.end_time > {$now}";
コード例 #18
0
ファイル: index_template.php プロジェクト: alhousseyni/gepi
	  <fieldset class="no_bordure">
		<legend class="invisible">Version</legend>
        Date de début des cahiers de textes :
<?php
        $bday = strftime("%d", getSettingValue("begin_bookings"));
        $bmonth = strftime("%m", getSettingValue("begin_bookings"));
        $byear = strftime("%Y", getSettingValue("begin_bookings"));
        genDateSelector("begin_", $bday, $bmonth, $byear,"more_years")
?>
	  <br />
        Date de fin des cahiers de textes :
<?php
        $eday = strftime("%d", getSettingValue("end_bookings"));
        $emonth = strftime("%m", getSettingValue("end_bookings"));
        $eyear= strftime("%Y", getSettingValue("end_bookings"));
        genDateSelector("end_",$eday,$emonth,$eyear,"more_years")
?>
		<input type="hidden" name="is_posted" value="1" />
	  </fieldset>

	  <h2>Accès public</h2>
	  <fieldset class="no_bordure">
		<legend class="invisible">accès public</legend>
		  <input type='radio' 
				 name='cahier_texte_acces_public' 
				 id='cahier_texte_acces_public_n' 
				 value='no'
			 onchange='changement();'
				<?php if (getSettingValue("cahier_texte_acces_public") == "no") echo " checked='checked'";?> /> 
		<label for='cahier_texte_acces_public_n' style='cursor: pointer;'>
		  Désactiver la consultation publique des cahiers de textes 
コード例 #19
0
ファイル: edit_entry.php プロジェクト: verdurin/mrbs-mcr
            if ($i == $rep_type) {
                echo " CHECKED";
            }
            echo ">" . get_vocab("rep_type_{$i}") . "\n";
        }
        ?>
 </TD>
</TR>

<TR>
 <TD CLASS=CR><B><?php 
        echo get_vocab("rep_end_date");
        ?>
</B></TD>
 <TD CLASS=CL><?php 
        genDateSelector("rep_end_", $rep_end_day, $rep_end_month, $rep_end_year);
        ?>
</TD>
</TR>

<TR>
 <TD CLASS=CR><B><?php 
        echo get_vocab("rep_rep_day");
        ?>
</B> <?php 
        echo get_vocab("rep_for_weekly");
        ?>
</TD>
 <TD CLASS=CL>
<?php 
        # Display day name checkboxes according to language and preferred weekday start.
コード例 #20
0
ファイル: search.php プロジェクト: bdwong-mirrors/mrbs
      <fieldset>
      <legend><?php 
        echo get_vocab("advanced_search");
        ?>
</legend>
        <div id="div_search_str">
          <label for="search_str"><?php 
        echo get_vocab("search_for");
        ?>
:</label>
          <input type="search" id="search_str" name="search_str" required>
        </div>   
        <div id="div_search_from">
          <?php 
        echo "<label>" . get_vocab("from") . ":</label>\n";
        genDateSelector("from_", $day, $month, $year);
        ?>
        </div> 
        <div id="search_submit">
          <input class="submit" type="submit" value="<?php 
        echo get_vocab("search_button");
        ?>
">
        </div>
      </fieldset>
    </form>
    <?php 
        output_trailer();
        exit;
    }
    if (!isset($search_str) || $search_str == '') {
コード例 #21
0
ファイル: report.php プロジェクト: bdwong-mirrors/mrbs
function generate_search_criteria(&$vars)
{
    global $booking_types, $select_options;
    global $private_somewhere, $approval_somewhere, $confirmation_somewhere;
    global $user_level, $tbl_entry, $tbl_area, $tbl_room;
    global $field_natures, $field_lengths;
    global $report_search_field_order;
    echo "<fieldset>\n";
    echo "<legend>" . get_vocab("search_criteria") . "</legend>\n";
    foreach ($report_search_field_order as $key) {
        switch ($key) {
            case 'report_start':
                echo "<div id=\"div_report_start\">\n";
                echo "<label>" . get_vocab("report_start") . ":</label>\n";
                genDateSelector("from_", $vars['from_day'], $vars['from_month'], $vars['from_year']);
                echo "</div>\n";
                break;
            case 'report_end':
                echo "<div id=\"div_report_end\">\n";
                echo "<label>" . get_vocab("report_end") . ":</label>\n";
                genDateSelector("to_", $vars['to_day'], $vars['to_month'], $vars['to_year']);
                echo "</div>\n";
                break;
            case 'areamatch':
                $options = sql_query_array("SELECT area_name FROM {$tbl_area} ORDER BY area_name");
                if ($options === FALSE) {
                    trigger_error(sql_error(), E_USER_WARNING);
                    fatal_error(FALSE, get_vocab("fatal_db_error"));
                }
                echo "<div id=\"div_areamatch\">\n";
                $params = array('label' => get_vocab("match_area") . ':', 'name' => 'areamatch', 'options' => $options, 'force_indexed' => TRUE, 'value' => $vars['areamatch']);
                generate_datalist($params);
                echo "</div>\n";
                break;
            case 'roommatch':
                // (We need DISTINCT because it's possible to have two rooms of the same name
                // in different areas)
                $options = sql_query_array("SELECT DISTINCT room_name FROM {$tbl_room} ORDER BY room_name");
                if ($options === FALSE) {
                    trigger_error(sql_error(), E_USER_WARNING);
                    fatal_error(FALSE, get_vocab("fatal_db_error"));
                }
                echo "<div id=\"div_roommatch\">\n";
                $params = array('label' => get_vocab("match_room") . ':', 'name' => 'roommatch', 'options' => $options, 'force_indexed' => TRUE, 'value' => $vars['roommatch']);
                generate_datalist($params);
                echo "</div>\n";
                break;
            case 'typematch':
                echo "<div id=\"div_typematch\">\n";
                $options = array();
                foreach ($booking_types as $type) {
                    $options[$type] = get_type_vocab($type);
                }
                $params = array('label' => get_vocab("match_type") . ':', 'name' => 'typematch[]', 'id' => 'typematch', 'options' => $options, 'force_assoc' => TRUE, 'value' => $vars['typematch'], 'multiple' => TRUE, 'attributes' => 'size="5"');
                generate_select($params);
                echo "<span>" . get_vocab("ctrl_click_type") . "</span>\n";
                echo "</div>\n";
                break;
            case 'namematch':
                echo "<div id=\"div_namematch\">\n";
                $params = array('label' => get_vocab("match_entry") . ':', 'name' => 'namematch', 'value' => $vars['namematch']);
                generate_input($params);
                echo "</div>\n";
                break;
            case 'descrmatch':
                echo "<div id=\"div_descrmatch\">\n";
                $params = array('label' => get_vocab("match_descr") . ':', 'name' => 'descrmatch', 'value' => $vars['descrmatch']);
                generate_input($params);
                echo "</div>\n";
                break;
            case 'creatormatch':
                echo "<div id=\"div_creatormatch\">\n";
                $params = array('label' => get_vocab("createdby") . ':', 'name' => 'creatormatch', 'value' => $vars['creatormatch']);
                generate_input($params);
                echo "</div>\n";
                break;
            case 'match_private':
                // Privacy status
                // Only show this part of the form if there are areas that allow private bookings
                if ($private_somewhere) {
                    // If they're not logged in then there's no point in showing this part of the form because
                    // they'll only be able to see public bookings anyway (and we don't want to alert them to
                    // the existence of private bookings)
                    if (empty($user_level)) {
                        echo "<input type=\"hidden\" name=\"match_private\" value=\"" . PRIVATE_NO . "\">\n";
                    } else {
                        echo "<div id=\"div_privacystatus\">\n";
                        $options = array(PRIVATE_BOTH => get_vocab("both"), PRIVATE_NO => get_vocab("default_public"), PRIVATE_YES => get_vocab("default_private"));
                        $params = array('label' => get_vocab("privacy_status") . ':', 'name' => 'match_private', 'options' => $options, 'value' => $vars['match_private']);
                        generate_radio_group($params);
                        echo "</div>\n";
                    }
                }
                break;
            case 'match_confirmed':
                // Confirmation status
                // Only show this part of the form if there are areas that require approval
                if ($confirmation_somewhere) {
                    echo "<div id=\"div_confirmationstatus\">\n";
                    $options = array(CONFIRMED_BOTH => get_vocab("both"), CONFIRMED_YES => get_vocab("confirmed"), CONFIRMED_NO => get_vocab("tentative"));
                    $params = array('label' => get_vocab("confirmation_status") . ':', 'name' => 'match_confirmed', 'options' => $options, 'value' => $vars['match_confirmed']);
                    generate_radio_group($params);
                    echo "</div>\n";
                }
                break;
            case 'match_approved':
                // Approval status
                // Only show this part of the form if there are areas that require approval
                if ($approval_somewhere) {
                    echo "<div id=\"div_approvalstatus\">\n";
                    $options = array(APPROVED_BOTH => get_vocab("both"), APPROVED_YES => get_vocab("approved"), APPROVED_NO => get_vocab("awaiting_approval"));
                    $params = array('label' => get_vocab("approval_status") . ':', 'name' => 'match_approved', 'options' => $options, 'value' => $vars['match_approved']);
                    generate_radio_group($params);
                    echo "</div>\n";
                }
                break;
            default:
                // Must be a custom field
                $var = "match_{$key}";
                global ${$var};
                $params = array('label' => get_loc_field_name($tbl_entry, $key) . ':', 'name' => $var, 'value' => isset(${$var}) ? ${$var} : NULL);
                echo "<div>\n";
                // Output a checkbox if it's a boolean or integer <= 2 bytes (which we will
                // assume are intended to be booleans)
                if ($field_natures[$key] == 'boolean' || $field_natures[$key] == 'integer' && isset($field_lengths[$key]) && $field_lengths[$key] <= 2) {
                    generate_checkbox($params);
                } else {
                    // If $select_options is defined we want to force a <datalist> and not a
                    // <select>.  That's because if we have options such as
                    // ('tea', 'white coffee', 'black coffee') we want the user to be able to type
                    // 'coffee' which will match both 'white coffee' and 'black coffee'.
                    if (isset($select_options["entry.{$key}"]) && !empty($select_options["entry.{$key}"])) {
                        $params['options'] = $select_options["entry.{$key}"];
                        // We force the values to be used and not the keys.   We will convert
                        // back to values when we construct the SQL query.
                        $params['force_indexed'] = TRUE;
                        generate_datalist($params);
                    } else {
                        $params['field'] = "entry.{$key}";
                        generate_input($params);
                    }
                }
                echo "</div>\n";
                break;
        }
        // switch
    }
    echo "</fieldset>\n";
}
コード例 #22
0
ファイル: index.php プロジェクト: rhertzog/lcs
$last_date = max($last_date1, $last_date2);
if ($last_date != "-1") {
    $sday = strftime("%d", $last_date);
    $smonth = strftime("%m", $last_date);
    $syear = strftime("%Y", $last_date);
    echo "<br />\n";
    echo "<div style=\"width:100%;\">\n";
    echo "<fieldset style=\"border: 1px solid grey; padding-top: 8px; padding-bottom: 8px;  margin-left: auto; margin-right: auto;\">\n";
    echo "<legend style=\"border: 1px solid grey; font-variant: small-caps;\">Suppression de notices</legend>\n";
    echo "<table border='0' width='100%' summary=\"Tableau de...\">\n";
    echo "<tr>\n<td>\n";
    echo "<form action=\"./index.php\" method=\"post\" style=\"width: 100%;\">\n";
    echo add_token_field();
    echo "Date de la notice la plus ancienne : " . strftime("%A %d %B %Y", $last_date) . "<br /><br />";
    echo "<b>Effacer toutes les données</b> (textes et documents joints) du cahier de textes avant la date ci-dessous :<br />\n";
    genDateSelector("sup_", $sday, $smonth, $syear, "more_years");
    echo "<input type='hidden' name='action' value='sup_serie' />\n";
    echo "<input type='hidden' name='id_groupe' value='" . $current_group["id"] . "' />\n";
    ?>
    <input type="hidden" name="uid_post" value="<?php 
    echo $uid;
    ?>
" />
    <?php 
    echo "<input type='submit' value='Valider' onclick=\"return confirmlink(this,'Etes-vous sûr de vouloir supprimer les notices et les documents joints jusqu\\'à la date selectionnée ?','Confirmation de suppression')\" />\n";
    echo "</form>\n";
    echo "</td>\n</tr>\n</table>\n</fieldset>\n";
    echo "</div>\n";
    echo "</div>\n";
}
$_SESSION['cacher_header'] = "n";