Guest djetdail Posted December 3, 2010 Report Share Posted December 3, 2010 Texte Francais : Bonjour; Pour une utilisation de phpvms comme carnet de vol, j'ai modifié le script ~/admin/templates/pireps_list.tpl Chaque pilote peut editer, valider, supprimer son rapport de vol. phpvms est un excellent travail, bravo et merci Ici le début du script modifie, le rajout est en rouge : Texte Anglais (Traduction online sorry ): Hello; For a use of phpvms like notebook of flight, I modified script ~/admin/templates/pireps_list.tpl Each pilot can publish, validate, remove his report of vol. phpvms is an excellent work, cheer and thank you Here the beginning of script modifies, the addition is in red: <div id="pireplist"> <?php if($title!='') echo "<h3>$title</h3>"; ?> <p><?php if(isset($descrip)) { echo $descrip; }?></p> <?php if(!$pireps) { echo '<p>No reports have been found</p></div>'; return; } ?> <!-- <p>There are a total of <?php echo count($pireps);?> flight reports in this category. <a href="<?php echo SITE_URL?>/admin/index.php/pirepadmin/approveall">Click to approve all</a></p> --> <?php if($_GET['module'] == 'pirepadmin' && $_GET['page'] == 'viewall') { Template::Show('pireps_filter.tpl'); } if(isset($paginate)) { ?> <div style="float: right;"> <a href="?admin=<?php echo $admin?>&start=<?php echo $start?>">Next Page</a> <br /> </div> <?php } ?> <table id="tabledlist" class="tablesorter" style="height: 100%"> <thead> <tr> <th></th> <th colspan="3">Details</th> </tr> </thead> <tbody> <?php foreach($pireps as $pirep) { if($pirep->accepted == PIREP_PENDING) $td_class = 'pending'; else $td_class = ''; $error = false; ?> <tr class="<?php echo $class?> pirep_list" id="row<?php echo $pirep->pirepid;?>"> <td align="center" valign="top" nowrap="nowrap" style="width: 27px;" class="<?php echo $td_class;?>"> <img height="25px" width="25px" src="<?php echo PilotData::GetPilotAvatar($pirep->pilotid);?>" align="left" /> </td> <td align="left" valign="top" nowrap class="<?php echo $td_class;?>"> <strong><a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/viewpilots?action=viewoptions&pilotid=<?php echo $pirep->pilotid;?>"> <?php echo PilotData::GetPilotCode($pirep->code, $pirep->pilotid) . ' - ' .$pirep->firstname .' ' . $pirep->lastname;?></a></strong> <strong>VOL:</strong> <?php echo $pirep->code . $pirep->flightnum; ?></div> <strong>Dep/Arr: </strong><?php echo $pirep->depicao; ?>/<?php echo $pirep->arricao; ?> <strong>Temps vol: </strong><?php echo $pirep->flighttime; ?> <br /> <strong>Date: </strong><?php echo date(DATE_FORMAT, $pirep->submitdate); ?> <strong>Current Status: </strong> <?php if($pirep->accepted == PIREP_ACCEPTED) echo 'Accepted'; elseif($pirep->accepted == PIREP_REJECTED) echo 'Rejected'; elseif($pirep->accepted == PIREP_PENDING) echo 'Approval Pending'; ?> <?php # If there was an error, don't allow the PIREP to go through if($pirep->aircraft == '') { $error = true; } echo $pilotcode; if(Auth::LoggedIn() && Auth::$userinfo->pilotid == $pirep->pilotid) { ?> <table width="100%" style="border: none;"> <tr> <td style="border: none;" align="left"> <button class="{button:{icons:{primary:'ui-icon-arrowthick-1-s'}}}" href="#" onclick="$('#details_dialog_<?php echo $pirep->pirepid;?>').toggle()">Details</button> <button class="jqModal {button:{icons:{primary:'ui-icon-script'}}}" id="dialog_details" href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/viewlog?pirepid=<?php echo $pirep->pirepid;?>">Log</button> <button class="jqModal {button:{icons:{primary:'ui-icon-comment'}}}" id="dialog_comments" href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/viewcomments?pirepid=<?php echo $pirep->pirepid;?>"> Comments <span style="font-size: 12px; margin-top: -3px">(<?php echo PIREPData::getCommentCount($pirep->pirepid); ?>)</span></button> <button class="jqModal {button:{icons:{primary:'ui-icon-note'}}}" id="dialog_addcomment" href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/addcomment?pirepid=<?php echo $pirep->pirepid;?>"> Add Comment</button> </td> <td style="border: none;" align="right"> <?php # If there was an error, don't allow the PIREP to go through if($error == false) { ?> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep" id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button> <?php } ?> <button id="dialog" class="jqModal {button:{icons:{primary:'ui-icon-closethick'}}}" href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/rejectpirep?pirepid=<?php echo $pirep->pirepid;?>&pilotid=<?php echo $pirep->pilotid; ?>">Reject</button> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location = '<?php echo SITE_URL?>/admin/index.php/pirepadmin/editpirep?pirepid=<?php echo $pirep->pirepid;?>&pilotid=<?php echo $pirep->pilotid?>'">Edit</button> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="deletepirep" id="<?php echo $pirep->pirepid;?>" class="deleteitem {button:{icons:{primary:'ui-icon-trash'}}}">Delete</button> </td> </tr> </table> <?php } ........ continuation of script // Bons vols Hervé Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.