<body>
        <div class="container">
            <?php 
showHeader();
showAppropriateMenu();
?>
            <br>
            <fieldset id="assignation">
                <legend> Retirer une assignation : </legend>
                <form action="../view/view_retirer_assignation_suite.php" method="post">
                    <br>
                    
                    à un utilisateur :
                    <br>
                    <?php 
showUserList(getListUser(), "liste_utilisateur");
?>
                    <input type="text" name="search_user" 
                    onKeyUp="arrayFilter(this.value, this.form.liste_utilisateur)" 
                    onChange="arrayFilter(this.value, this.form.liste_utilisateur)"
                    >
                    <input type="submit" name="retirer_utilisateur" value="Continuer" class="btn btn-default" /> 
                    <br>
                    
                    <br>
                    
                    ou d'un plan-cadre en élaboration :
                    <br>
                    <?php 
listerPlanCadre(getPlanCadreElaboration(), 'liste_plan_cadre_elaboration');
?>
예제 #2
0
파일: cron.php 프로젝트: jomsocial/JSVoice
/**
 * Enter description here...
 * default :run weekly
 * @param unknown_type $nextrun: time next run
 * @param unknown_type $id : tempdata
 * @param unknown_type $name: tempdata
 * @param unknown_type $timerun:time run
 * @return unknown
 */
function writeFileCirculatory($nextrun = 604800, $id = 2, $name = 'weekly', $timerun = 0)
{
    global $javconfig;
    $url = JURI::root();
    $temp = getTempData(" AND name='{$name}' ");
    if ($temp) {
        $time = time();
        if ($time > intval($temp->value) + intval($nextrun)) {
            //write file to send mail weekly
            $path = JPATH_COMPONENT_SITE . DS . "asset" . DS . "emails" . DS . "change";
            $filename = $path . DS . "emails_{$name}" . "_" . time() . '.ini';
            //$model_items = & JModel::getInstance ( 'items', 'javoiceModel' );
            $where = " AND i.create_date BETWEEN {$temp->value} AND {$timerun} AND  i.published=1";
            $items = getItems($where, ' i.create_date DESC ');
            $model_voice_types =& JModel::getInstance('voicetypes', 'javoiceModel');
            $where = " AND t.published = 1 ";
            $voice_types = $model_voice_types->getItems($where, " t.title ", 0, 1000);
            $users = getListUser("%{$name}=1%");
            if (!$voice_types || !$items || !$users) {
                updateNextRun($id, $name, $timerun, $temp);
                return FALSE;
            }
            $items = parseVoiceTypes($voice_types, $items);
            $helper = new JAVoiceHelpers();
            $header = $helper->getEmailTemplate("mailheader");
            $footer = $helper->getEmailTemplate("mailfooter");
            $email = "Javnotify_to_user_new_voice_{$name}";
            $mail = $helper->getEmailTemplate($email);
            $mailcontent = $header->content . "\n" . $mail->content . "\n\n" . $footer->content;
            $filters = $helper->getFilterConfig();
            $details = "";
            $details .= '<UL>';
            foreach ($voice_types as $voice_type) {
                if ($items[$voice_type->id]->list) {
                    $details .= "<LI>";
                    $details .= "<STRONG>" . $voice_type->title . "</STRONG>";
                    $details .= "<OL>";
                    foreach ($items[$voice_type->id]->list as $item) {
                        $details .= "<LI>";
                        $link = $url;
                        $link .= "index.php?option=com_javoice&view=items&layout=item&cid={$item->id}&type={$item->voice_types_id}&forums={$item->forums_id}";
                        $details .= "<a href=\"{$link}\">" . $item->title . "</a>";
                        $integrate = $javconfig['integrate'] ? $javconfig['integrate']->get('run_system', '') : '';
                        $details .= "<span style='color:#7F7F7F'>(";
                        $details .= JText::_("CREATE_DATE") . ": " . date('d/M/Y', $item->create_date);
                        $params = class_exists('JRegistry') ? new JRegistry($item->data) : new JParameter($item->data);
                        $system_total = $integrate . "_total";
                        if ($params->get($system_total)) {
                            $details .= ", " . JText::_("TOTAL_COMMENTS") . ": ";
                            $details .= $params->get($system_total);
                        }
                        $details .= ")</span>";
                    }
                    $details .= "</OL>";
                }
            }
            $details .= "</UL>";
            $filters['{ITEM_DETAILS}'] = $details;
            if (is_array($filters)) {
                foreach ($filters as $key => $value) {
                    $subject = str_replace($key, $value, $mail->subject);
                    $mailcontent = str_replace($key, $value, $mailcontent);
                }
            }
            $mailcontent = str_replace("\n", "###", $mailcontent);
            $content[] = "mailcontent=" . $mailcontent;
            $content[] = "subject=" . $subject;
            $user = implode(",", $users);
            $content[] = "user_id={$user}";
            $contents = implode("\n", $content);
            $model_sendmail = JModel::getInstance('sendmail', 'javoiceModel');
            $model_sendmail->writeLogFileChange($contents, $filename);
            updateNextRun($id, $name, $timerun, $temp);
        }
    }
    return TRUE;
}