function miserend_addmise($tid)
{
    global $m_id;
    global $script;
    //$script .= "<script type='text/javascript' src='js/miserend_addmise.js'></script>\n";
    //Ezt csak a development szerveren kéne
    miserend_update_addmisejs();
    $vars['church'] = $church = getChurch($tid);
    $masses = getMasses($tid);
    $vars['m_id'] = $m_id;
    $vars['tid'] = $tid;
    //Észrevétel
    $jelzes = getRemarkMark($tid);
    $vars['jelzes'] = $jelzes;
    //miseaktív
    if ($church['miseaktiv'] == 1) {
        $vars['active']['yes'] = ' checked ';
    } else {
        $vars['active']['no'] = ' checked ';
    }
    $vars['lastperiod'] = 0;
    if (isset($masses['periods'])) {
        foreach ($masses['periods'] as $pkey => $period) {
            $vars['periods'][] = formPeriod($pkey, $period, 'period');
        }
    }
    $vars['lastperiod'] = $pkey;
    $vars['lastparticular'] = 0;
    if (isset($masses['particulars'])) {
        foreach ($masses['particulars'] as $pkey => $particular) {
            $vars['particulars'][] = formPeriod($pkey, $particular, 'particular');
        }
    }
    $vars['lastparticular'] = $pkey;
    $vars['misemegj'] = array('type' => 'textbox', 'name' => "misemegj", 'value' => $church['misemegj'], 'label' => 'Rendszeres rózsafűzér, szentségimádás, hittan, stb.<br/>');
    $vars['adminmegj'] = array('type' => 'textbox', 'name' => "adminmegj", 'value' => $church['adminmegj'], 'labelback' => ' A templom szerkesztésével kacsolatosan.');
    $vars['update'] = array('type' => 'checkbox', 'name' => "update", 'value' => 'i', 'checked' => true, 'labelback' => 'Utoljára frissítve: ' . date('Y.m.d.', strtotime($church['frissites'])));
    $vars['helptext'] = '<span class="alap">Figyelem! Ha átfedés van két periódus/időszak vagy különleges miserend között, akkor a listában lejjebb lévő vagyis „nehezebb” periódus vagy különleges miserend jelenik meg a keresőben!</span>';
    $vars['template'] = "admin_editschedule";
    return $vars;
}
示例#2
0
include 'load.php';
switch ($_REQUEST['q']) {
    case 'FormMassEmpty':
        $form = formMass($_POST['period'], $_POST['count'], false, 'period');
        echo $twig->render('admin_form_mass.twig', $form);
        break;
    case 'FormMassParticularEmpty':
        $form = formMass($_POST['particular'], $_POST['count'], false, 'particular');
        echo $twig->render('admin_form_mass_particular.html', $form);
        break;
    case 'FormPeriodEmpty':
        $form = formPeriod($_POST['period'], false, 'period');
        echo $twig->render('admin_form_period.html', $form);
        break;
    case 'FormParticularEmpty':
        $form = formPeriod($_POST['particular'], false, 'particular');
        echo $twig->render('admin_form_particular.html', $form);
        break;
    case 'ChatSave':
        if (!$user->checkRole("'any'")) {
            echo json_encode(array('result' => 'error', 'text' => 'Hiányzó jogosultság'));
            break;
        }
        $text = sanitize($_REQUEST['text']);
        if (preg_match('/^\\$(\\w+)/si', $text, $match)) {
            $kinek = $match[1];
            $text = preg_replace('/^(\\$\\w+(:*))/si', "", $text);
        } else {
            $kinek = "";
        }
        if (trim(preg_replace('/^((\\$|@)\\w+(:*))/si', "", $text)) == '') {