Example #1
0
                <div class="box-body no-padding">
                    <table class="table table-hover table-pages">
                        <thead>
                        <tr>
                            <td class="activated">&nbsp;</td>
                            <td class="id"><?php 
echo sortLink('id', Yii::t('cookyii.page', 'ID'));
?>
</td>
                            <td class="name"><?php 
echo sortLink('title', Yii::t('cookyii.page', 'Title'));
?>
</td>
                            <td class="updated"><?php 
echo sortLink('updated_at', Yii::t('cookyii.page', 'Updated at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="pages.list.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('cookyii.page', 'Pages not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('cookyii.page', 'Edit page'), 'ng-class' => '{deactivated:!page.activated,deleted:page.deleted}'];
Example #2
0
						<?php 
    sortLink('name', _('Name'));
    ?>
</td>
						<?php 
    if (!$hideMTime) {
        ?>
							<td><?php 
        sortLink('mtime', _('Last modification'));
        ?>
</td>
						<?php 
    }
    ?>
						<td><?php 
    sortLink('bytes', _('Size'));
    ?>
</td>
					</tr>
				</thead>
				<tbody>
					<?php 
    foreach ($elements as $element) {
        ?>
						<tr>
							<td class="name" 
							<?php 
        if (!$element['readable']) {
            echo 'colspan="3"';
        } elseif ($element['countonly']) {
            echo 'colspan="2"';
Example #3
0
     afficheDetails($_GET['id'], 'W');
     echo "\r\n                <form name='delete' action='wok.php' method='post'>\r\n                <div class='form_settings'>\r\n                <input type='hidden'name='cmd'value='delete'>\r\n                <input type='hidden'name='id'value='" . $_GET['id'] . "'>\r\n                <p style='color:red;text-align:center;'>Attention, cette action est définitive !</p>\r\n                <p style='padding-top: 15px;'>\r\n                <input type='submit' name='button' value='Confirmer' class='submit'>\r\n                </p>\r\n                </div>\r\n                </form>";
     break;
     /*
      *     La liste des réponses à une proposition
      * 
      */
 /*
  *     La liste des réponses à une proposition
  * 
  */
 case "Rdetail":
     echo "Détails de la question sélectionnée.";
     afficheDetails($_GET['id'], 'M');
     echo "<h2>Liste des réponses obtenues pour cette question</h2>\r\n                <p>Vous pouvez choisir les solutions qui vous intéressent dans la liste ci-dessous et réaliser la transaction (payer l'autre équipe) en suivant le lien 'Accepter'. Si un <img src='images/accept.png'> apparait, c'est que vous avez déjà sélectionné cette proposition et payé l'autre équipe pour cela.";
     echo "<table>\r\n            <tr><th>" . sortLink("equipe&cmd={$cmd}", "Equipe") . "</th><th>" . sortLink("titre&cmd={$cmd}", "Titre") . "</th><th>" . sortLink("desc&cmd={$cmd}", "Description") . "</th><th>" . sortLink("presta&cmd={$cmd}", "Date") . "</th><th>" . sortLink("time&cmd={$cmd}", "Prix proposé") . "</th><th></th></tr>";
     $sql = "SELECT M.id, type, user_name, titre, description, timestamp, price FROM market M, sk_users U WHERE market_id = '" . $_GET['id'] . "' AND user_id =U.id ";
     //            echo "<p>$sql";
     $detail = mysqli_query($mysqli, $sql);
     while (list($id, $type, $idUser, $titre, $description, $timestamp, $price) = mysqli_fetch_row($detail)) {
         if ($type == 'Payed') {
             $tmp = "<img src='images/accept.png'>";
         } else {
             $tmp = "<a href='" . $_SERVER['PHP_SELF'] . "?cmd=Accept&idD=" . $_GET['id'] . "&idR={$id}'> Accepter</a>";
         }
         echo "<tr><td>{$idUser}</td><td>{$titre}</td><td>{$description}</td><td>{$timestamp}</td><td>{$price}</td><td>{$tmp}</td></tr>";
     }
     echo "</table>";
     break;
     /*
      *     proposition acceptée, on affiche le formulaire de règlement
Example #4
0
                        <tr>
                            <td class="activated">&nbsp;</td>
                            <td class="id"><?php 
echo sortLink('id', Yii::t('cookyii.account', 'ID'));
?>
</td>
                            <td class="name"><?php 
echo sortLink('name', Yii::t('cookyii.account', 'Name'));
?>
</td>
                            <td class="email"><?php 
echo sortLink('email', Yii::t('cookyii.account', 'Email'));
?>
</td>
                            <td class="updated"><?php 
echo sortLink('updated_at', Yii::t('cookyii.account', 'Updated at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="accounts.list.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('cookyii.account', 'Accounts not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('cookyii.account', 'Edit account'), 'ng-class' => '{deactivated:!account.activated,deleted:account.deleted}'];
Example #5
0
?>
</td>
                            <td class="subject"><?php 
echo sortLink('subject', Yii::t('cookyii.postman', 'Subject'));
?>
</td>
                            <td class="address"><?php 
echo Yii::t('cookyii.postman', 'Address');
?>
</td>
                            <td class="created"><?php 
echo sortLink('created_at', Yii::t('cookyii.postman', 'Created at'));
?>
</td>
                            <td class="sent"><?php 
echo sortLink('sent_at', Yii::t('cookyii.postman', 'Sent at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="messages.list.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('cookyii.postman', 'Messages not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('cookyii.postman', 'Edit message'), 'ng-class' => '{deactivated:message.activated===0,deleted:message.deleted}'];
Example #6
0
                        <thead>
                        <tr>
                            <td class="id"><?php 
echo sortLink('id', Yii::t('cookyii.postman', 'ID'));
?>
</td>
                            <td class="code"><?php 
echo sortLink('code', Yii::t('cookyii.postman', 'Code'));
?>
</td>
                            <td class="subject"><?php 
echo sortLink('subject', Yii::t('cookyii.postman', 'Subject'));
?>
</td>
                            <td class="updated"><?php 
echo sortLink('updated_at', Yii::t('cookyii.postman', 'Updated at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="templates.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('cookyii.postman', 'Templates not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('cookyii.postman', 'Edit template'), 'ng-class' => '{deleted:template.deleted}'];
Example #7
0
function listeMarketPlace($cmd, $type, $sqlTmp)
{
    global $mysqli, $loggedInUser;
    $flagSelf = substr($cmd, 0, 1) == 'y' ? true : false;
    // On détermine si on affiche les données de l'équipe ($flagself true) ou des autres équipes ($flagself false)
    $userIsBanker = $loggedInUser->role == 6 ? true : false;
    // On affiche les données de la table Market pour $type
    $sql = "SELECT M.id, display_name, email, titre, description, price, timestamp, prestation_name \n            FROM market M, sk_users U, prestation P \n            WHERE P.id = prestation_id AND U.id = M.user_id AND type = '{$type}'{$sqlTmp}";
    //debug    echo "<br/>$sql";
    if ($result = mysqli_query($mysqli, $sql)) {
        $nbLignes = mysqli_num_rows($result);
        if ($nbLignes > 0) {
            echo "<table>" . "<tr><th>" . sortLink("equipe&cmd={$cmd}", "Qui") . "</th><th>" . sortLink("titre&cmd={$cmd}", "Quoi") . "</th><th>" . sortLink("desc&cmd={$cmd}", "Description") . "</th><th>" . sortLink("presta&cmd={$cmd}", "Prestation") . "</th><th>" . sortLink("price&cmd={$cmd}", "Prix") . "</th><th>" . sortLink("time&cmd={$cmd}", "Date dépot") . "</th><th></th></tr>";
            while (list($idMarket, $idUser, $email, $titre, $description, $price, $timestamp, $prestation) = mysqli_fetch_row($result)) {
                $nbLignesDetail = countMarketReply($idMarket);
                $iconDetail = iconMarketReply($idMarket, "");
                if ($flagSelf) {
                    // On fait la liste des $type postés par l'équipe connectée
                    // On vérifie d'abord si elle a reçu des réponses
                    if ($nbLignesDetail > 0) {
                        $tmp = "<a href='" . $_SERVER['PHP_SELF'] . "?cmd=Rdetail&id={$idMarket}'>({$nbLignesDetail}) {$iconDetail} </a>";
                    } else {
                        // pas de réponse, on peut l'efffacer
                        $tmp = "<a href='" . $_SERVER['PHP_SELF'] . "?cmd=delete&id={$idMarket}'><img src='images/delete.png'></a>";
                    }
                } else {
                    // On fait la liste des $type postés par les autres équipes
                    if ($userIsBanker) {
                        $tmp = "<a href='" . $_SERVER['PHP_SELF'] . "?cmd=detail&id={$idMarket}'>" . iconMarketReply($idMarket, $loggedInUser->user_id) . "</a>";
                    } else {
                        $tmp = "<img src='images/lock.png'>";
                    }
                }
                echo "<tr><td><a href='mailto:{$email}'>{$idUser}</a></td><td>{$titre}</td><td>{$description}</td><td>{$prestation}</td><td>{$price}</td><td>{$timestamp}</td><td>{$tmp}</td></tr>";
            }
            echo "</table>";
        } else {
            if ($flagSelf) {
                echo "<h3>Vous n'avez encore rien déposé</h3>";
            } else {
                echo "<h3>Il n'y a pas encore de demande des autres équipes</h3>";
            }
        }
    }
}
Example #8
0
    switch ($_GET['sort']) {
        case "ccredit":
            $sortOrder = " ORDER BY count(credit) DESC";
            break;
        case "cdebit":
            $sortOrder = " ORDER BY count(debit) DESC";
            break;
        case "credit":
            $sortOrder = " ORDER BY sum(credit) DESC";
            break;
        case "debit":
            $sortOrder = " ORDER BY sum(debit) DESC";
            break;
        case "solde":
            $sortOrder = " ORDER BY coalesce(sum(credit), 0)- coalesce(sum(debit), 0) DESC";
            break;
        default:
            $sortOrder = "ORDER BY teamId";
    }
    if ($result = mysqli_query($mysqli, "SELECT U.teamId, display_name, coalesce(sum(debit), 0) as totalDebit ,count(debit), coalesce(sum(credit),0) as totalCredit, count(credit),  coalesce(sum(credit), 0)- coalesce(sum(debit), 0) FROM account A, sk_users U WHERE A.account1 = U.id GROUP BY account1 {$sortOrder}")) {
        echo "<table style='width:100%; border-spacing:0;'>" . "<tr><th>" . sortLink("team", "Team") . "</th>\n\t\t\t\t  \t\t\t\t\t   <th>" . sortLink("user", "User") . "</th>\r\n                                       <th>" . sortLink("debit", "Débit") . " (" . sortLink("cdebit", "nb") . ")</th>\r\n                                       <th>" . sortLink("credit", "Crédit") . " (" . sortLink("ccredit", "nb") . ")</th>\r\n                                       <th width='50%'>" . sortLink("solde", "Solde") . "</th></tr>";
        /* fetch associative array */
        while (list($teamName, $userName, $debit, $debitTrans, $credit, $creditTrans, $solde) = mysqli_fetch_row($result)) {
            echo "<tr><td>{$teamName}</td><td>{$userName}</td><td style='text-align: right;'>" . number_format($debit) . " ({$debitTrans}) </td><td  style='text-align: right;'>" . number_format($credit) . " ({$creditTrans})</td><td>" . number_format($solde) . "</td></tr>";
        }
        echo "</table>\r\n\t\t<br/>\r\n* * * * End Of Report * * * *";
        /* Libération du jeu de résultats */
        mysqli_free_result($result);
    }
}
closePage();
Example #9
0
?>
</td>
                            <td class="name"><?php 
echo sortLink('name', Yii::t('cookyii.client', 'Name'));
?>
</td>
                            <td class="email"><?php 
echo sortLink('email', Yii::t('cookyii.client', 'Email'));
?>
</td>
                            <td class="account"><?php 
echo Yii::t('cookyii.client', 'Account');
?>
</td>
                            <td class="updated"><?php 
echo sortLink('updated_at', Yii::t('cookyii.client', 'Updated at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="clients.list.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('cookyii.client', 'Clients not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('cookyii.client', 'Edit client'), 'ng-class' => '{deleted:client.deleted}'];
Example #10
0
                        <tr>
                            <td class="activated">&nbsp;</td>
                            <td class="id"><?php 
echo sortLink('id', Yii::t('account', 'ID'));
?>
</td>
                            <td class="name"><?php 
echo sortLink('name', Yii::t('account', 'Name'));
?>
</td>
                            <td class="email"><?php 
echo sortLink('email', Yii::t('account', 'Email'));
?>
</td>
                            <td class="updated"><?php 
echo sortLink('updated_at', Yii::t('account', 'Updated at'));
?>
</td>
                            <td class="actions">&nbsp;</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-show="accounts.list.length === 0">
                            <td colspan="6" class="text-center text-italic text-light">
                                <?php 
echo Yii::t('account', 'Accounts not found');
?>
                            </td>
                        </tr>
                        <?php 
$options = ['title' => Yii::t('account', 'Edit account'), 'ng-class' => '{deactivated:!account.activated,deleted:account.deleted}'];