コード例 #1
0
ファイル: tableChapitre.php プロジェクト: jpainam/cosba
        <?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 {
        echo "<img style='cursor:pointer' src='" . img_delete_disabled() . "' />";
    }
    echo "</td><td align='center'>" . "<img style='cursor:pointer' title='Ajouter des lecons a ce chapitre' src='" . img_plus() . "' " . "onclick=\"chargerLecon(" . $chap['IDCHAPITRE'] . ");\"  /></td></tr>";
    $i++;
}
?>
    </tbody>
</table>
<script>
    $(document).ready(function () {
        if (!$.fn.DataTable.isDataTable("#tableChapitre")) {
            $("#tableChapitre").DataTable({
                bInfo: false,
                paging: false,
                scrollY: 100,
                searching: false,
                columns: [
                    {"width": "5%"},
コード例 #2
0
ファイル: tableActivite.php プロジェクト: jpainam/cosba
        <?php 
$i = 1;
foreach ($activites as $act) {
    echo "<tr><td>" . $i . "</td><td>" . $act['TITRE'] . "</td>";
    echo "<td align='center'>";
    if (isAuth(525)) {
        echo "<img style='cursor:pointer' src='" . img_edit() . "' " . "onclick=\"modifierActivite(" . $act['IDACTIVITE'] . ")\" />&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=\"supprimerActivite(" . $act['IDACTIVITE'] . ")\" />";
    } else {
        echo "<img style='cursor:pointer' src='" . img_delete_disabled() . "' />";
    }
    echo "</td><td align='center'>" . "<img style='cursor:pointer' title='Ajouter les chapitres de cette activite' src='" . img_plus() . "' " . "onclick=\"chargerChapitre(" . $act['IDACTIVITE'] . ");\"  /></td></tr>";
    $i++;
}
?>
    </tbody>
</table>
<script>
    $(document).ready(function () {
        if (!$.fn.DataTable.isDataTable("#tableActivite")) {
            $("#tableActivite").DataTable({
                bInfo: false,
                paging: false,
                scrollY: 100,
                searching: false,
                columns: [
                    {"width": "5%"},