コード例 #1
0
ファイル: admin_config.php プロジェクト: notzen/e107
        if ($val == 'sun') {
            $val = 0;
        } elseif ($val == 'mon') {
            $val = 1;
        }
        // Legacy values
        $ret = "<select name='eventpost_weekstart' class='tbox'>\n";
        foreach (array(EC_LAN_18, EC_LAN_12, EC_LAN_13, EC_LAN_14, EC_LAN_15, EC_LAN_16, EC_LAN_17) as $k => $v) {
            $sel = $val == $k ? " selected='selected'" : '';
            $ret .= "<option value='{$k}'{$sel}>{$v}</option>\n";
        }
        $ret .= "</select>\n";
        return $ret;
    }
    $text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "'>\n\t<fieldset id='plugin-ecal-prefs'>\n\t<table cellpadding='0' cellspacing='0' class='adminform'>\n\t<colgroup>\n\t\t<col style='width:40%;vertical-align:top;' />\n\t\t<col style='width:60%;vertical-align:top;' />\n\t</colgroup>\n\t<thead>\n\t<tr><th style='vertical-align:top;' colspan='2'>" . EC_ADLAN_A207 . " </th></tr></thead>\n\t<tbody>\n\t<tr>\n\t\t<td>" . EC_ADLAN_A208 . " </td>\n\t\t<td>" . $uc->uc_dropdown('eventpost_admin', $pref['eventpost_admin'], 'public, nobody, member, admin, classes') . "\n\t\t</td>\n\t</tr>\n\t";
    $text .= "\n\t<tr>\n\t\t<td>" . EC_ADLAN_A211 . " </td>\n\t\t<td>" . $uc->uc_dropdown('eventpost_super', $pref['eventpost_super'], 'public, nobody, member, admin, classes') . "\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A134 . "</td>\n\t\t<td>\n\t\t\t<select name='eventpost_adminlog' class='tbox'>\n\t\t\t<option value='0' " . ($pref['eventpost_adminlog'] == '0' ? " selected='selected' " : "") . " >" . EC_ADLAN_A87 . " </option>\n\t\t\t<option value='1' " . ($pref['eventpost_adminlog'] == '1' ? " selected='selected' " : "") . " >" . EC_ADLAN_A135 . " </option>\n\t\t\t<option value='2' " . ($pref['eventpost_adminlog'] == '2' ? " selected='selected' " : "") . " >" . EC_ADLAN_A136 . " </option>\n\t\t\t</select>\n\t\t\t<span class='field-help'>" . EC_ADLAN_A137 . "</span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A165 . "</td>\n\t\t<td>\n\t\t\t<select name='eventpost_menulink' class='tbox'>\n\t\t\t<option value='0' " . ($pref['eventpost_menulink'] == '0' ? " selected='selected' " : "") . " >" . EC_ADLAN_A209 . " </option>\n\t\t\t<option value='1' " . ($pref['eventpost_menulink'] == '1' ? " selected='selected' " : "") . " >" . EC_ADLAN_A210 . " </option>\n\t\t\t<option value='2' " . ($pref['eventpost_menulink'] == '2' ? " selected='selected' " : "") . " >" . EC_ADLAN_A185 . " </option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A183 . "</td>\n\t\t<td><input class='tbox' type='checkbox' name='eventpost_showmouseover' value='1' " . ($pref['eventpost_showmouseover'] == 1 ? " checked='checked' " : "") . " />\n\t\t<span class='field-help'>" . EC_ADLAN_A184 . "</span></td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A140 . "</td>\n\t\t<td><input class='tbox' type='checkbox' name='eventpost_showeventcount' value='1' " . ($pref['eventpost_showeventcount'] == 1 ? " checked='checked' " : "") . " /></td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A213 . "</td>\n\t\t<td>\n\t\t  <input class='tbox' type='checkbox' name='eventpost_forum' value='1' " . ($pref['eventpost_forum'] == 1 ? " checked='checked' " : "") . " />\n\t\t  \t\t<span class='field-help'>" . EC_ADLAN_A22 . "</span>\n\t\t  </td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A171 . "</td>\n\t\t<td><input class='tbox' type='text' name='eventpost_recentshow' size='10' value='" . $pref['eventpost_recentshow'] . "' maxlength='5' />\n\t\t<span class='field-help'>" . EC_ADLAN_A172 . "</span>\n\t\t</td>\n\t</tr>  \n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A212 . "</td>\n\t\t<td>" . select_day_start($pref['eventpost_weekstart']) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . EC_ADLAN_A214 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_lenday' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_lenday'] == '1' ? " selected='selected' " : "") . " > 1 </option>\n\t\t\t<option value='2' " . ($pref['eventpost_lenday'] == '2' ? " selected='selected' " : "") . " > 2 </option>\n\t\t\t<option value='3' " . ($pref['eventpost_lenday'] == '3' ? " selected='selected' " : "") . " > 3 </option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A215 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_dateformat' class='tbox'>\n\t\t\t<option value='my' " . ($pref['eventpost_dateformat'] == 'my' ? " selected='selected' " : "") . " >" . EC_ADLAN_A216 . "</option>\n\t\t\t<option value='ym' " . ($pref['eventpost_dateformat'] == 'ym' ? " selected='selected' " : "") . " >" . EC_ADLAN_A217 . "</option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A133 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_datedisplay' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_datedisplay'] == '1' ? " selected='selected' " : "") . " > yyyy-mm-dd</option>\n\t\t\t<option value='2' " . ($pref['eventpost_datedisplay'] == '2' ? " selected='selected' " : "") . " > dd-mm-yyyy</option>\n\t\t\t<option value='3' " . ($pref['eventpost_datedisplay'] == '3' ? " selected='selected' " : "") . " > mm-dd-yyyy</option>\n\t\t\t<option value='4' " . ($pref['eventpost_datedisplay'] == '4' ? " selected='selected' " : "") . " > yyyy.mm.dd</option>\n\t\t\t<option value='5' " . ($pref['eventpost_datedisplay'] == '5' ? " selected='selected' " : "") . " > dd.mm.yyyy</option>\n\t\t\t<option value='6' " . ($pref['eventpost_datedisplay'] == '6' ? " selected='selected' " : "") . " > mm.dd.yyyy</option>\n\t\t\t<option value='7' " . ($pref['eventpost_datedisplay'] == '7' ? " selected='selected' " : "") . " > yyyy/mm/dd</option>\n\t\t\t<option value='8' " . ($pref['eventpost_datedisplay'] == '8' ? " selected='selected' " : "") . " > dd/mm/yyyy</option>\n\t\t\t<option value='9' " . ($pref['eventpost_datedisplay'] == '9' ? " selected='selected' " : "") . " > mm/dd/yyyy</option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A138 . "</td>\n\t\t<td><input class='tbox' type='checkbox' name='eventpost_fivemins' value='1' " . ($pref['eventpost_fivemins'] == 1 ? " checked='checked' " : "") . " />&nbsp;&nbsp;<span class='smalltext'><em>" . EC_ADLAN_A139 . "</em></span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A200 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_editmode' class='tbox'>\n\t\t\t<option value='0' " . ($pref['eventpost_editmode'] == '0' ? " selected='selected' " : "") . " >" . EC_ADLAN_A201 . "</option>\n\t\t\t<option value='1' " . ($pref['eventpost_editmode'] == '1' ? " selected='selected' " : "") . " >" . EC_ADLAN_A202 . "</option>\n\t\t\t<option value='2' " . ($pref['eventpost_editmode'] == '2' ? " selected='selected' " : "") . " >" . EC_ADLAN_A203 . "</option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t\n\t<tr>\n\t\t<td>" . EC_ADLAN_A122 . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A124 . "</span>" . $ecal_class->time_string($ecal_class->time_now) . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A125 . "</span>" . $ecal_class->time_string($ecal_class->site_timedate) . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A126 . "</span>" . $ecal_class->time_string($ecal_class->user_timedate) . "\n\t\t</td>\n\t\t<td>\n\t\t\t<select name='eventpost_caltime' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_caltime'] == '1' ? " selected='selected' " : '') . " > Server </option>\n\t\t\t<option value='2' " . ($pref['eventpost_caltime'] == '2' ? " selected='selected' " : '') . " > Site </option>\n\t\t\t<option value='3' " . ($pref['eventpost_caltime'] == '3' ? " selected='selected' " : '') . " > User </option>\n\t\t\t</select><br /><span class='field-help'>" . EC_ADLAN_A129 . "</span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A123 . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A127 . "</span>\n\t\t</td>\n\t\t<td>\n\t\t\t<select name='eventpost_timedisplay' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_timedisplay'] == '1' ? " selected='selected' " : '') . " > 24-hour hhmm </option>\n\t\t\t<option value='4' " . ($pref['eventpost_timedisplay'] == '4' ? " selected='selected' " : '') . " > 24-hour hh:mm </option>\n\t\t\t<option value='2' " . ($pref['eventpost_timedisplay'] == '2' ? " selected='selected' " : '') . " > 12-hour </option>\n\t\t\t<option value='3' " . ($pref['eventpost_timedisplay'] == '3' ? " selected='selected' " : '') . " > Custom </option>\n\t\t\t</select>\n            <input class='tbox' type='text' name='eventpost_timecustom' size='20' value='" . $pref['eventpost_timecustom'] . "' maxlength='30' />\n\t\t\t<br /><span class='field-help'>" . EC_ADLAN_A128 . "</span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A166 . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A169 . "</span>\n\t\t</td>\n\t\t<td>\n\t\t\t<select name='eventpost_dateevent' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_dateevent'] == '1' ? " selected='selected' " : '') . " > dayofweek day month yyyy </option>\n\t\t\t<option value='2' " . ($pref['eventpost_dateevent'] == '2' ? " selected='selected' " : '') . " > dyofwk day mon yyyy </option>\n\t\t\t<option value='3' " . ($pref['eventpost_dateevent'] == '3' ? " selected='selected' " : '') . " > dyofwk dd-mm-yy </option>\n\t\t\t<option value='0' " . ($pref['eventpost_dateevent'] == '0' ? " selected='selected' " : '') . " > Custom </option>\n\t\t\t</select>\n            <input class='tbox' type='text' name='eventpost_eventdatecustom' size='20' value='" . $pref['eventpost_eventdatecustom'] . "' maxlength='30' />\n\t\t\t<br /><span class='field-help'>" . EC_ADLAN_A168 . "</span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A167 . "<br />\n\t\t<span class='field-help'>" . EC_ADLAN_A170 . "</span>\n\t\t</td>\n\t\t<td>\n\t\t\t<select name='eventpost_datenext' class='tbox'>\n\t\t\t<option value='1' " . ($pref['eventpost_datenext'] == '1' ? " selected='selected' " : '') . " > dd month </option>\n\t\t\t<option value='2' " . ($pref['eventpost_datenext'] == '2' ? " selected='selected' " : '') . " > dd mon </option>\n\t\t\t<option value='3' " . ($pref['eventpost_datenext'] == '3' ? " selected='selected' " : '') . " > month dd </option>\n\t\t\t<option value='4' " . ($pref['eventpost_datenext'] == '4' ? " selected='selected' " : '') . " > mon dd </option>\n\t\t\t<option value='0' " . ($pref['eventpost_datenext'] == '0' ? " selected='selected' " : '') . " > Custom </option>\n\t\t\t</select>\n            <input class='tbox' type='text' name='eventpost_nextdatecustom' size='20' value='" . $pref['eventpost_nextdatecustom'] . "' maxlength='30' />\n\t\t\t<br /><span class='field-help'>" . EC_ADLAN_A168 . "</span>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A193 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_printlists' class='tbox'>";
    $listOpts = array('0' => EC_ADLAN_A194, '1' => EC_ADLAN_A195);
    if (e107::isInstalled('pdf')) {
        $listOpts['2'] = EC_ADLAN_A196;
    }
    foreach ($listOpts as $v => $t) {
        $s = $pref['eventpost_printlists'] == $v ? " selected='selected'" : '';
        $text .= "<option value='{$v}'{$s}>{$t}</option>\n";
    }
    $text .= "\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A95 . "</td>\n\t\t<td><input class='tbox' type='checkbox' name='eventpost_asubs' value='1' " . ($pref['eventpost_asubs'] == 1 ? " checked='checked' " : '') . " />&nbsp;&nbsp;<span class='smalltext'><em>" . EC_ADLAN_A96 . "</em></span>\n\t\t</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td>" . EC_ADLAN_A92 . "</td>\n\t\t<td><input class='tbox' type='text' name='eventpost_mailfrom' size='60' value='" . $pref['eventpost_mailfrom'] . "' maxlength='100' />\n\t\t</td>\n\t</tr>  \n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A91 . "</td>\n\t\t<td><input class='tbox' type='text' name='eventpost_mailsubject' size='60' value='" . $pref['eventpost_mailsubject'] . "' maxlength='100' />\n\t\t</td>\n\t</tr>  \n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A93 . "</td>\n\t\t<td><input class='tbox' type='text' name='eventpost_mailaddress' size='60' value='" . $pref['eventpost_mailaddress'] . "' maxlength='100' />\n\t\t</td>\n\t</tr>  \n\n\t<tr>\n\t\t<td>" . EC_ADLAN_A114 . "<br /></td>\n\t\t<td>\n\t\t\t<select name='eventpost_emaillog' class='tbox'>\n\t\t\t<option value='0' " . ($pref['eventpost_emaillog'] == '0' ? " selected='selected' " : "") . " >" . EC_ADLAN_A87 . " </option>\n\t\t\t<option value='1' " . ($pref['eventpost_emaillog'] == '1' ? " selected='selected' " : "") . " >" . EC_ADLAN_A115 . "  </option>\n\t\t\t<option value='2' " . ($pref['eventpost_emaillog'] == '2' ? " selected='selected' " : "") . " >" . EC_ADLAN_A116 . " </option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\n\t<tr><td colspan='2' style='text-align:center'><input class='button' type='submit' name='updatesettings' value='" . EC_ADLAN_A218 . "' /></td></tr>\n\t</tbody>\n\t</table>\n\t</fieldset>\n\t</form>\n\t</div>";
    $ns->tablerender("<div style='text-align:center'>" . EC_ADLAN_1 . " - " . EC_ADLAN_A207 . "</div>", $text);
}
function admin_config_adminmenu()
{
    if (e_QUERY) {
        $tmp = explode(".", e_QUERY);
コード例 #2
0
ファイル: event.php プロジェクト: notzen/e107
            // Now clear cache  - just do the lot for now - get clever later
            $e107cache->clear('nq_event_cal');
            header('location:event.php?' . $ev_start . '.' . $qs . $report_msg);
        }
    }
}
$action = '';
require_once HEADERF;
if ($mult_count > 1) {
    // Need to handle writing of multiple events - display confirmation form
    $message = str_replace('-NUM-', count($mult_count), EC_LAN_88);
    $text = "\n\t\t<form method='post' action='" . e_SELF . "?mc.{$ev_start}.{$ev_end}' id='mulconf'><table style='width:98%' class='fborder' >\n\t\t<colgroup><col style='width:30%' /><col style='width:70%' /></colgroup>\n\t\t<tr><td class='forumheader3 warning' colspan='2'>" . $message . "<br />" . EC_LAN_89 . "</td></tr>";
    if ($ev_allday) {
        $text .= "\n\t\t<tr><td class='forumheader3' >" . EC_LAN_173 . " </td><td class='forumheader3'> " . $ecal_class->event_date_string($ev_start) . " " . EC_LAN_175 . "</td></tr>\n\t\t<tr><td class='forumheader3' >" . EC_LAN_174 . " </td><td class='forumheader3'> " . $ecal_class->event_date_string($ev_end) . " " . EC_LAN_175 . "</td></tr>";
    } else {
        $text .= "\n\t\t<tr><td class='forumheader3' >" . EC_LAN_173 . " </td><td class='forumheader3'> " . $ecal_class->event_date_string($ev_start) . " " . $ecal_class->time_string($ev_start) . " " . "</td></tr>\n\t\t<tr><td class='forumheader3' >" . EC_LAN_174 . " </td><td class='forumheader3'> " . $ecal_class->event_date_string($ev_end) . " " . $ecal_class->time_string($ev_end) . " " . "</td></tr>";
    }
    $text .= "\n\t\t<tr><td class='forumheader3'>" . EC_LAN_176 . "</td><td class='forumheader3'>" . $ecal_class->get_recur_text($recurring) . "</td></tr>\n\t\t<tr><td class='forumheader3'>" . EC_LAN_70 . "</td><td class='forumheader3'>" . $ev_title . "</td></tr>\n\t\t<tr><td class='forumheader3'>" . EC_LAN_52 . "</td><td class='forumheader3'>" . $ecal_class->get_category_text($ev_category) . "</td></tr>\n\t\t<tr><td class='forumheader3'>" . EC_LAN_32 . "</td><td class='forumheader3'>" . $ev_location . "</td></tr>\n\t\t<tr><td class='forumheader3'>" . EC_LAN_57 . "</td><td class='forumheader3'>" . $ev_event . "</td></tr>";
    // Only display for forum thread/link if required.  No point if not wanted
    if (isset($pref['eventpost_forum']) && $pref['eventpost_forum'] == 1) {
        $text .= "<tr><td class='forumheader3'>" . EC_LAN_58 . " </td><td class='forumheader3'>" . $ev_thread . "</td></tr>";
    }
    $text .= "<tr><td class='forumheader3'>" . EC_LAN_59 . "</td><td class='forumheader3'>" . $ev_email . "</td></tr>\n\t\t<tr><td class='forumheader' colspan='2' style='text-align:center'>\n            <input class='button' type='submit' name='mc_cancel' value='" . EC_LAN_177 . "' />\n            <input class='button' type='submit' name='mc_accept' value='" . EC_LAN_178 . "' />\n\t\t\t<input type='hidden' name='qs' value='" . e_QUERY . "' />";
    foreach ($ev_fields as $k => $v) {
        $text .= "<input type='hidden' name='ev_{$k}' value='" . ${$v} . "' />";
    }
    $text .= "</td></tr></table></form>";
    $ns->tablerender(EC_LAN_179, $text);
    require_once FOOTERF;
    exit;
}