예제 #1
0
<label>Chapitre : </label>
<input type="text" name="txtchapitre" size="30" /> 
<img style="cursor: pointer; vertical-align: bottom" src="<?php 
echo img_add();
?>
" 
     onclick="ajouterChapitre(<?php 
echo $activite['IDACTIVITE'];
?>
);"/>
<br/>
<span style="font-size: 10px;margin:0; padding:0">Activit&eacute; : <?php 
echo $activite['TITRE'];
?>
 </span>
<table class="dataTable" id="tableChapitre">
    <thead><tr><th>N°</th><th>Titre</th><th></th><th></th></tr></thead>
    <tbody>
        <?php 
$i = 1;
foreach ($chapitres as $chap) {
    echo "<tr><td>" . $i . "</td><td>" . $chap['TITRE'] . "</td>";
    echo "<td align='center'>";
    if (isAuth(525)) {
        echo "<img style='cursor:pointer' src='" . img_edit() . "'  " . "onclick=\"modifierChapitre(" . $chap['IDCHAPITRE'] . "," . $chap['ACTIVITE'] . ")\" />&nbsp;&nbsp;";
    } else {
        echo "<img style='cursor:pointer' src='" . img_edit_disabled() . "' />&nbsp;&nbsp;";
    }
    if (isAuth(524)) {
        echo "<img style='cursor:pointer' src='" . img_delete() . "' " . "onclick=\"supprimerChapitre(" . $chap['IDCHAPITRE'] . ", " . $chap['ACTIVITE'] . ")\" />";
    } else {
예제 #2
0
파일: manage.php 프로젝트: CJloHuK/iou-web
      * Image add                                                             *
      *************************************************************************/
 /*************************************************************************
  * Image add                                                             *
  *************************************************************************/
 case 'img_add':
     if (isset($_POST['action'])) {
         // Form completed, updating the DB
         if (isset($_POST['img_name']) && isset($_FILES['img_file']['tmp_name']) && isset($_FILES['img_file']['type']) && ($_FILES['img_file']['type'] = 'image/png')) {
             $img_name = $_POST['img_name'];
             $img_id = $_GET['img_id'];
             $img_info = $_POST['img_info'] ? $_POST['img_info'] : '';
             $hndl = fopen($_FILES['img_file']['tmp_name'], 'r');
             $imgdata = '';
             $imgdata = fread($hndl, $_FILES['img_file']['size']);
             img_add($img_name, $img_info, $imgdata, 0);
             header("Cache-Control: no-cache, must-revalidate");
             // HTTP/1.1
             header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
             // Date in the past
             header("Location: " . BASE_WWW . "/laboratories.php");
             exit;
             // TODO should redirect: http://192.168.211.128/manage.php?action=img_edit&img_id=31
         } else {
             //header('Cache-Control: no-cache, must-revalidate');     // HTTP/1.1
             //header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');       // Date in the past
             //header('HTTP/1.1 403 Forbidden');                                       // Forbidden
         }
     } else {
         // Fill the form
         page_header('Manage');