Expand|Select|Wrap|Line Numbers
- function print_rezBilet($rezBilet,$posRezBilet1){
- $step=$_SESSION['cekor'];
- $max=$_SESSION['max'];
- $curr= $_SESSION['currentRezBilet']+$step-1 ;
- if($max<$curr)
- $curr=$max;
- //vo ovie dve promenlivi se zacuvuva brojot na prikazanata strana i
- //vkupniot broj na strani
- $currPage=ceil($curr / $_SESSION['cekor']);
- $maxPage=ceil($max / $_SESSION['cekor']);
- if (!$rezBilet) {
- echo error_message('Не се внесени резервации на билети');
- echo <<<END
- <tr><form method="post" action="$posRezBilet1" ><td align="center">
- <center>
- <input type="submit" value="Додади нов резервација" name="newRezBilet" class="button">
- </center>
- </td>
- </form>
- </tr>
- END;
- }
- else {
- echo <<<END
- <center><table cellpadding='2' cellspacing='1' bordercolor='#993300'>
- <tr>
- <th scope='col'>Измени</th>
- <th scope='col'>Бриши</th>
- <th scope='col'>ТуристID<a href="?orderColumnRezBilet=turist_id&orderRezBilet=desc"/><img src="../images/dole.gif" width="10" height="10" border="0"/></a><a href="?orderColumnRezBilet=turist_id&orderRezBilet=asc"/><img src="../images/gore.gif" width="10" height="10" border="0"/></a></th>
- <th scope='col'>БилетId<a href="?orderColumnRezBilet=b_id&orderRezBilet=desc"/><img src="../images/dole.gif" width="10" height="10" border="0"/></a><a href="?orderColumnRezBilet=b_id&orderRezBilet=asc"/><img src="../images/gore.gif" width="10" height="10" border="0"/></a></th>
- <th scope='col'>Дата на резервирање <a href="?orderColumnRezBilet=rez_data&orderRezBilet=desc"/><img src="../images/dole.gif" width="10" height="10" border="0"/></a><a href="?orderColumnRezBilet=rez_data&orderRezBilet=asc"/><img src="../images/gore.gif" width="10" height="10" border="0"/></a></th>
- <th scope='col'>Количина<a href="?orderColumnRezBilet=kolicina&orderRezBilet=desc"/><img src="../images/dole.gif" width="10" height="10" border="0"/></a><a href="?orderColumnRezBilet=kolicina&orderRezBilet=asc"/><img src="../images/gore.gif" width="10" height="10" border="0"/></a></th>
- </tr>
- END;
- $poraka="Dali sakas";
- foreach($rezBilet as $rezB)
- {
- echo '<tr>';
- echo '<td align="center"><a href="?modifyRezBilet='.
- htmlentities($rezB['TURIST_ID'])." ".htmlentities($rezB['B_ID']).'" /><img src="../images/edit.png" width="24" height="24" border="0" /></a></td>';
- echo '<td align="center"><a href="?deleteRezBilet='.
- htmlentities($rezB['TURIST_ID'])." ".htmlentities($rezB['B_ID']).'" /><img src="../images/delete2.png" width="24" height="24" border="0" /></a></td>';
- echo '<td>'.$rezB['TURIST_ID'].'<a href="?showTur='.
- htmlentities($rezB['TURIST_ID']).'" onclick="showListTurist();return false;" /><img align="right" src="../images/details.png" width="14" height="14" border="0" /></a></td>';
- echo '<td>'.$rezB['B_ID'].'<a href="?showBil='.
- htmlentities($rezB['B_ID']).'" onclick="showListBilet(); return false;" /><img align="right" src="../images/details.png" width="14" height="14" border="0" /></a></td>';
- echo '<td>'.$rezB['REZ_DATA'].'</td>';
- echo '<td>'.$rezB['KOLICINA'].'</td>';
- echo '</tr>';
- }
- echo <<<END
- <tr><form method="post" action="$posRezBilet1"><td align="center">
- <a href="?newRezBilet2=vnesi" /><img src="../images/user1_add.png" width="36" height="36" border="0" /></a></td><td colspan="1" align="center">
- <input type="submit" value="Додади нова резервација" name="newRezBilet" class="button">
- </td>
- <td colspan="2"><div align="center">
- <input type="submit" value="< Претходни $step" name="previousRezBilet" class="button">
- <input type="submit" value="Следни $step >" name="nextRezBilet" class="button">
- </div>
- </td>
- <td>
- <select name="cekor" style="background:#F1D798" onchange="MM_jumpMenu('parent',this,0)">
- <option value="" style="background:#F1D798">прикажи</option>
- <option value="?cekor=5" style="background:#F1D798">5</option>
- <option value="?cekor=10" style="background:#F1D798">10</option>
- <option value="?cekor=15" style="background:#F1D798">15</option>
- <option value="?cekor=20" style="background:#F1D798">20</option>
- <option value="?cekor=25" style="background:#F1D798">25</option>
- <option value="?cekor=30" style="background:#F1D798">30</option>
- </select>
- </td>
- <td align="center">$currPage/$maxPage Страна</td>
- </tr>
- </form>
- </table></center>
- END;
- }
- }
and here is the part where the JavaScript functions are:
Expand|Select|Wrap|Line Numbers
- <script type="text/JavaScript">
- <!--
- function MM_jumpMenu(targ,selObj,restore){ //v3.0
- eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
- if (restore) selObj.selectedIndex=0;
- }
- function MM_popupMsg(msg) { //v1.0
- confirm(msg);
- }
- //-->
- </script>
- <!-- TinyMCE -->
- <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
- <script language="javascript" type="text/javascript">
- tinyMCE.init({
- mode : "textareas",
- theme : "simple"
- });
- function fileBrowserCallBack(field_name, url, type, win) {
- // This is where you insert your custom filebrowser logic
- alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);
- // Insert new URL, this would normaly be done in a popup
- win.document.forms[0].elements[field_name].value = "someurl.htm";
- }
- function showListTurist()
- {
- <?php
- $_SESSION['showTur']=$_GET['showTur'];
- ?>
- sList = window.open("turist_prozorecB.php", "turist", "width=800,height=200, scrollbars=yes");
- }
- function showListBilet()
- {
- <?php
- $_SESSION['showBil']=$_GET['showBil'];
- echo "neso";
- ?>
- sList = window.open("bilet_prozorecB.php", "bilet", "width=800,height=100, scrollbars=1");
- }
- function showListTurInsert()
- {
- sList = window.open("turist_prozorecList.php", "turisti", "width=800,height=700, scrollbars=1");
- }
- function showListBilInsert()
- {
- sList = window.open("bilet_prozorecList.php", "bileti", "width=800,height=700, scrollbars=1");
- }
- </script>
- <!-- /TinyMCE -->
Expand|Select|Wrap|Line Numbers
- <tr>
- <td colspan=3 align="right">
- Турист:
- <input type="text" name="turistid" size="29" value=$turistid>
- <input type="button" value="излистај" onClick="showListTurInsert()" class="button">
- </td>
- </tr>