示例#1
0
文件: filter.php 项目: nouphet/rata
 function listAction()
 {
     $auth = empty($_GET['auth']) ? 0 : 1;
     echo '<h3>' . constant('_AD_OPENID_LANG_FILTER_' . $auth) . '</h3>';
     echo '<p>' . constant('_AD_OPENID_LANG_FILTERLEVEL_' . $GLOBALS['xoopsModuleConfig']['filter_level']) . '</p>';
     echo '<p><a href="' . $this->_url . '&op=new">' . _AD_OPENID_LANG_NEW . '</a></p>';
     if ($filters =& $this->_handler->getByAuth($auth)) {
         $member_handler =& xoops_gethandler('member');
         $groups = $member_handler->getGroupList();
         echo '<table border=1>';
         echo '<tr><th>' . _AD_OPENID_LANG_PATTERN . '</th>';
         if ($auth) {
             echo '<th>' . _AD_OPENID_LANG_GROUPS . '</th><th></th>';
         }
         echo '<th></th></tr>';
         foreach ($filters as $f) {
             if ($groupid = $f->get4show('groupid')) {
                 $groupids = explode('|', $groupid);
                 $value = '';
                 foreach ($groupids as $g) {
                     $value .= $groups[$g] . ',';
                 }
             } else {
                 $value = _AD_OPENID_LANG_FILTER_DEFAULT;
             }
             echo '<tr><td>';
             echo $f->get4Show('pattern');
             echo '</td><td>';
             if ($auth) {
                 echo $value;
                 echo '</td><td>';
                 echo '<a href="' . $this->_url . '&op=edit&id=' . $f->get4Show('id') . '">' . _EDIT . '</a>';
                 echo '</td><td>';
             }
             echo '<a href="' . $this->_url . '&op=delete&id=' . $f->get4Show('id') . '">' . _DELETE . '</a>';
             echo '</td></tr>';
         }
         echo '</table>';
     } else {
         echo '<p>' . $this->_handler->getError() . '</p>';
     }
     echo '<br />';
     if ($auth) {
         require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
         $form = new XoopsSimpleForm('', 'openid_generator', $this->_url, 'post', true);
         $form->addElement(new XoopsFormHidden('controller', 'filter'));
         $form->addElement(new XoopsFormHidden('op', 'generate'));
         $form->addElement(new XoopsFormHidden('auth', $auth));
         $element = new XoopsFormSelect(_AD_OPENID_LANG_GENERATOR_KEY, 'type');
         $filterItems =& $this->getFilterItems();
         $options = array();
         foreach ($filterItems as $item) {
             $options[] = $item['description'];
         }
         $element->addOptionArray($options);
         $form->addElement($element);
         $form->addElement(new XoopsFormButton('', 'submit', 'OK', 'submit'));
         echo $form->render();
     }
 }
示例#2
0
文件: buttons.php 项目: nouphet/rata
 function listAction()
 {
     global $xoopsConfig;
     echo '<h3>' . _AD_OPENID_LANG_BUTTONS . '</h3>';
     echo '<p>' . _AD_OPENID_LANG_BUTTONS_DESC . '</p>';
     echo '<p>[<a href="' . $this->_url . '&op=new">' . _AD_OPENID_LANG_NEW . '</a>]</p>';
     if ($records =& $this->_handler->getObjects()) {
         echo '<table border=1><tr>';
         echo '<th></th>';
         echo '<th>Title</th>';
         echo '<th>OpenID Identifier</th>';
         echo '<th>Type</th>';
         echo '<th colspan="2"></th></tr>';
         foreach ($records as $r) {
             $type = $r->get('type');
             $image = $r->get4show('image');
             $description = $r->get4Show('description');
             echo '<tr><td>';
             echo '<img src="';
             echo strpos($image, 'http') !== 0 ? XOOPS_URL . '/modules/openid/images/' : '';
             echo $image . '" alt="' . $description . '">';
             echo '</td><td>';
             echo $description;
             echo '</td><td>';
             echo $r->get4Show('identifier');
             echo '</td><td>';
             echo $type ? 'signon' : 'server';
             echo '</td><td>';
             echo '<a href="' . $this->_url . '&op=edit&id=' . $r->get4Show('id') . '">' . _EDIT . '</a>';
             echo '</td><td>';
             echo '<a href="' . $this->_url . '&op=delete&id=' . $r->get4Show('id') . '">' . _DELETE . '</a>';
             echo '</td></tr>';
         }
         echo '</table>';
     } else {
         echo '<p>' . $this->_handler->getError() . '</p>';
     }
     echo '<br />';
     $filterItems = array();
     @(include XOOPS_ROOT_PATH . '/modules/openid/language/' . $xoopsConfig['language'] . '/filterItems.php');
     $options = array();
     foreach ($filterItems as $item) {
         if (isset($item['op_identifier']) || isset($item['user_identifier'])) {
             $options[] = $item['description'];
         }
     }
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $form = new XoopsSimpleForm('', 'openid_generator', $this->_url, 'post', true);
     $form->addElement(new XoopsFormHidden('controller', $this->_control));
     $form->addElement(new XoopsFormHidden('op', 'generate'));
     $element = new XoopsFormSelect(_ADD, 'offset');
     $element->addOptionArray($options);
     $form->addElement($element);
     $form->addElement(new XoopsFormButton('', 'submit', 'OK', 'submit'));
     echo $form->render();
 }
 function _b_wp_archives_monthly_edit($options)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optFormType = new XoopsFormRadio('Month List Style:', 'options[0]', $options[0]);
     $optFormType->addOption(0, 'Simple List');
     $optFormType->addOption(1, 'Dropdown List');
     $optForm->addElement($optFormType);
     $optForm->addElement(new XoopsFormRadioYN('Listing with count:', 'options[1]', $options[1]));
     $optForm->addElement(new XoopsFormText('Custom Block Template File<br />(Default: wp_archives_monthly.html):', 'options[2]', 25, 50, $options[2]));
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
 function _b_wp_contents_edit($options)
 {
     $categoryHandler =& wp_handler('Category');
     $optFormCatOptions = array("0" => _WP_LIST_CAT_ALL) + $categoryHandler->getParentOptionArray();
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optForm->addElement(new XoopsFormText('Number of posts to show:', 'options[0]', 5, 5, $options[0]));
     $optForm->addElement(new XoopsFormText('Custom Block Template File<br />(Default: wp_contents.html):', 'options[1]', 25, 50, $options[1]));
     $optFormCat = new XoopsFormSelect('Listing only in a following categoty:', 'options[2]', $options[2]);
     $optFormCat->addOptionArray($optFormCatOptions);
     $optForm->addElement($optFormCat);
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
 function _b_wp_authors_edit($options)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optForm->addElement(new XoopsFormRadioYN('Listing with count:', 'options[0]', $options[0]));
     $optFormNameType = new XoopsFormSelect('Name Option:', 'options[1]', $options[1]);
     $optFormNameType->addOption('nickname', 'Nick Name');
     $optFormNameType->addOption('login', 'Login Name');
     $optFormNameType->addOption('firstname', 'First Name');
     $optFormNameType->addOption('lastname', 'Last Name');
     $optFormNameType->addOption('namefl', 'Full Name (First Last)');
     $optFormNameType->addOption('namelf', 'Full Name (Last First)');
     $optForm->addElement($optFormNameType);
     $optForm->addElement(new XoopsFormRadioYN('Show RSS2 feed icon:', 'options[2]', $options[2]));
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
示例#6
0
function display_action_form($action = "")
{
    $action_options = array("no" => _SELECT, "template" => art_constant("AM_PERMISSION_TEMPLATE"), "apply" => art_constant("AM_PERMISSION_TEMPLATE_APPLY"), "default" => art_constant("AM_PERMISSION_SETBYGROUP"));
    $actionform = new XoopsSimpleForm(art_constant("AM_PERMISSION_ACTION"), 'actionform', 'admin.permission.php', "GET");
    $action_select = new XoopsFormSelect("", 'action', $action);
    $action_select->setExtra('onchange="document.forms.actionform.submit()"');
    $action_select->addOptionArray($action_options);
    $actionform->addElement($action_select);
    $actionform->display();
}
 function _b_wp_categories_edit($options)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optFormType = new XoopsFormRadio('Category List Style:', 'options[0]', $options[0]);
     $optFormType->addOption(0, 'Simple List');
     $optFormType->addOption(1, 'Dropdown List');
     $optForm->addElement($optFormType);
     $optForm->addElement(new XoopsFormRadioYN('Listing with count:', 'options[1]', $options[1]));
     $optFormSort = new XoopsFormRadio('Sorting Key:', 'options[2]', $options[2]);
     $optFormSort->addOption('ID', 'ID');
     $optFormSort->addOption('name', 'Name');
     $optFormSort->addOption('description', 'Description');
     $optForm->addElement($optFormSort);
     $optFormOrder = new XoopsFormRadio('Sorting Order:', 'options[3]', $options[3]);
     $optFormOrder->addOption('asc', 'Ascending');
     $optFormOrder->addOption('desc', 'Descending');
     $optForm->addElement($optFormOrder);
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
 function _b_wp_recent_posts_edit($options, $wp_num = "")
 {
     $categoryHandler =& wp_handler('Category');
     $optFormCatOptions = array("0" => _WP_LIST_CAT_ALL) + $categoryHandler->getParentOptionArray();
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optForm->addElement(new XoopsFormText('Number of Posts in this block:', 'options[0]', 5, 5, $options[0]));
     $optForm->addElement(new XoopsFormRadioYN('Display Posted Date:', 'options[1]', $options[1]));
     $optForm->addElement(new XoopsFormRadioYN('Display RSS Icon:', 'options[2]', $options[2]));
     $optForm->addElement(new XoopsFormRadioYN('Display RDF Icon:', 'options[3]', $options[3]));
     $optForm->addElement(new XoopsFormRadioYN('Display RSS2 Icon:', 'options[4]', $options[4]));
     $optForm->addElement(new XoopsFormRadioYN('Display ATOM Icon:', 'options[5]', $options[5]));
     $optForm->addElement(new XoopsFormText('Number of Posts in Meta Feed(RSS,RDF,ATOM):', 'options[6]', 5, 5, $options[6]));
     $optFormCat = new XoopsFormSelect('Listing only in a following categoty:', 'options[7]', $options[7]);
     $optFormCat->addOptionArray($optFormCatOptions);
     $optForm->addElement($optFormCat);
     $optForm->addElement(new XoopsFormRadioYN('Display New Flag:', 'options[8]', $options[8]));
     $optForm->addElement(new XoopsFormText('Custom Block Template File<br />(Default: wp_recent_posts.html):', 'options[9]', 25, 50, $options[9]));
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
 function _b_wp_recent_comments_edit($options)
 {
     require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     $optForm = new XoopsSimpleForm('Block Option Dummy Form', 'optionform', '');
     $optFormType = new XoopsFormRadio('Comment List Style:', 'options[0]', $options[0]);
     $optFormType->addOption(0, 'Standard');
     $optFormType->addOption(1, 'Grouped by Article');
     $optForm->addElement($optFormType);
     $optForm->addElement(new XoopsFormText('Comment List Count:', 'options[1]', 5, 5, $options[1]));
     $optForm->addElement(new XoopsFormRadioYN('Display RSS Icon:', 'options[2]', $options[2]));
     $optForm->addElement(new XoopsFormRadioYN('Display Posted Date:', 'options[3]', $options[3]));
     $optForm->addElement(new XoopsFormRadioYN('Show Comment Type:', 'options[4]', $options[4]));
     $optForm->addElement(new XoopsFormText('Custom Block Template File<br />(Default: wp_recent_comments.html):', 'options[5]', 25, 50, $options[5]));
     $_wpTpl =& new WordPresTpl('theme');
     $optForm->assign($_wpTpl);
     return $_wpTpl->fetch('wp_block_edit.html');
 }
示例#10
0
$xoopsTpl->assign('lang', $lang);
// ### Create the navigation form ###
// Year selectbox
$yearSelect = new XoopsFormSelect('', 'navigSelectBox', $year);
for ($i = 2004; $i < 2015; $i++) {
    $yearSelect->addOption($i);
}
// Category selectbox
$catsList = $catHandler->getAllCat($xoopsUser);
$catSelect = new XoopsFormSelect('', 'cat', $cat);
$catSelect->addOption(0, ' ');
foreach ($catsList as $catList) {
    $catSelect->addOption($catList->getVar('cat_id'), $catList->getVar('cat_name'));
}
$form = new XoopsSimpleForm('', 'navigSelectBox', 'year.php', 'get');
$form->addElement($yearSelect);
$form->addElement($catSelect);
$form->addElement(new XoopsFormButton("", "form_submit", _SEND, "submit"));
// Assigning the form to the template
$form->assign($xoopsTpl);
// Retriving events
$events = $eventHandler->objectToArray($eventHandler->getEventYear($year, $cat), array('cat_id'));
// Treatment for recurring event
$startYear = mktime(0, 0, 0, 1, 1, $year);
$endYear = mktime(23, 59, 59, 12, 31, $year);
$eventsArray = array();
foreach ($events as $event) {
    if (!$event['event_isrecur']) {
        $eventsArray[] = $event;
    } else {
        $recurEvents = $eventHandler->getRecurEventToDisplay($event, $startYear, $endYear);
示例#11
0
        $title_of_form = _PROFILE_AM_PROF_ACCESS;
        $perm_name = 'profile_access';
        $perm_desc = _PROFILE_AM_PROF_ACCESS_DESC;
        $restriction = '';
        $anonymous = true;
        break;
}
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
$opform = new XoopsSimpleForm('', 'opform', 'permissions.php', 'get');
$op_select = new XoopsFormSelect('', 'op', $op);
$op_select->setExtra('onchange="document.forms.opform.submit()"');
$op_select->addOption('visibility', _PROFILE_AM_PROF_VISIBLE);
$op_select->addOption('edit', _PROFILE_AM_PROF_EDITABLE);
$op_select->addOption('search', _PROFILE_AM_PROF_SEARCH);
$op_select->addOption('access', _PROFILE_AM_PROF_ACCESS);
$opform->addElement($op_select);
$opform->display();
$module_id = $GLOBALS['xoopsModule']->getVar('mid');
include_once $GLOBALS['xoops']->path('/class/xoopsform/grouppermform.php');
$form = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, 'admin/permissions.php?op=' . $op, $anonymous);
if ($op === 'access') {
    $member_handler = xoops_getHandler('member');
    $glist = $member_handler->getGroupList();
    foreach (array_keys($glist) as $i) {
        if ($i != XOOPS_GROUP_ANONYMOUS) {
            $form->addItem($i, $glist[$i]);
        }
    }
} else {
    $profile_handler = xoops_getModuleHandler('profile');
    $fields = $profile_handler->loadFields();
示例#12
0
    $criteria->add(new Criteria('profile_group', intval($_REQUEST['pg'])));
    $visibility_handler->deleteAll($criteria, true);
    redirect_header("visibility.php", 2, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_PROF_VISIBLE));
    exit;
}
$criteria = new CriteriaCompo();
$criteria->setGroupby("field_id, user_group, profile_group");
$visibilities = $visibility_handler->getAll($criteria);
$member_handler = xoops_gethandler('member');
$groups = $member_handler->getGroupList();
$groups[0] = _PROFILE_AM_FIELDVISIBLETOALL;
asort($groups);
$GLOBALS['xoopsTpl']->assign('fields', $fields);
$GLOBALS['xoopsTpl']->assign('visibilities', $visibilities);
$GLOBALS['xoopsTpl']->assign('groups', $groups);
$add_form = new XoopsSimpleForm('', 'addform', 'visibility.php');
$sel_field = new XoopsFormSelect(_PROFILE_AM_FIELDVISIBLE, 'field_id');
$sel_field->setExtra("style='width: 200px;'");
$sel_field->addOptionArray($fields);
$add_form->addElement($sel_field);
$sel_ug = new XoopsFormSelect(_PROFILE_AM_FIELDVISIBLEFOR, 'ug');
$sel_ug->addOptionArray($groups);
$add_form->addElement($sel_ug);
unset($groups[XOOPS_GROUP_ANONYMOUS]);
$sel_pg = new XoopsFormSelect(_PROFILE_AM_FIELDVISIBLEON, 'pg');
$sel_pg->addOptionArray($groups);
$add_form->addElement($sel_pg);
$add_form->addElement(new XoopsFormButton('', 'submit', _ADD, 'submit'));
$add_form->assign($GLOBALS['xoopsTpl']);
$GLOBALS['xoopsTpl']->display("db:profile_admin_visibility.html");
xoops_cp_footer();
示例#13
0
$mod_select = new XoopsFormSelect(_SELECT, 'modid', $modid);
$mod_select->addOption(-1, TAG_AM_GLOBAL);
$mod_select->addOption(0, TAG_AM_ALL);
foreach ($module_list as $module => $module_name) {
    $mod_select->addOption($module, $module_name . " (" . $counts_module[$module] . ")");
}
$tray->addElement($mod_select);
$num_select = new XoopsFormSelect(TAG_AM_NUM, 'limit', $limit);
foreach (array(10, 50, 100, 500) as $_num) {
    $num_select->addOption($_num);
}
$num_select->addOption(0, _ALL);
$tray->addElement($num_select);
$tray->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
$tray->addElement(new XoopsFormHidden("start", $start));
$opform->addElement($tray);
$opform->display();
if (isset($_GET['start'])) {
    $tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname"));
    $criteria = new CriteriaCompo();
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    if ($modid > 0) {
        $criteria->add(new Criteria("l.tag_modid", $modid));
    }
    $tags = $tag_handler->getByLimit($criteria, false);
    if (empty($tags)) {
        echo "<h2>" . TAG_AM_FINISHED . "</h2>";
    } else {
        foreach (array_keys($tags) as $tag_id) {
            $tag_handler->update_stats($tag_id, $modid == -1 ? 0 : $tags[$tag_id]["modid"]);
示例#14
0
function mp_selectcont($url, $op, $catbox, $after, $limit_msg, $sortname, $sortorder)
{
    $form = new XoopsSimpleForm("", "tris", "contbox.php");
    //$form->addElement(new XoopsFormTextDateSelect(_PM_AM_PRUNEBEFORE, 'befor', '15', $_REQUEST['before']));
    $promotray = new XoopsFormElementTray('');
    $liste_date = new XoopsFormTextDateSelect(_MP_TRI_TRI, 'after', '15', $after);
    $promotray->addElement($liste_date);
    $limit_select = array('10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);
    $user_select = new XoopsFormSelect('', 'limit_msg', $limit_msg);
    $user_select->addOptionArray($limit_select);
    $promotray->addElement($user_select);
    $order_select = array('ct_uname' => _MP_TRI_PSEUDO, 'ct_name' => _MP_TRI_NAME, 'ct_regdate' => _MP_TRI_DATE);
    $thread_select = new XoopsFormSelect('', 'sortname', $sortname);
    $thread_select->addOptionArray($order_select);
    $promotray->addElement($thread_select);
    $sortorder_select = array('asc' => _MP_TRI_OASC, 'desc' => _MP_TRI_ODESC);
    $sort_select = new XoopsFormSelect('', 'sortorder', $sortorder);
    $sort_select->addOptionArray($sortorder_select);
    $promotray->addElement($sort_select);
    $button_tray = new XoopsFormButton('', 'submit', '<>', 'submit');
    $button_tray->setExtra("onclick='document.prvmsg.action=\"contbox.php\"");
    $promotray->addElement($button_tray);
    $form->addElement($promotray);
    $form->addElement(new XoopsFormHidden('catbox', $catbox));
    return $form->render();
}
示例#15
0
/**
* Get {@link XoopsSimpleForm} for finishing registration
*
* @param object $user {@link XoopsUser} object to finish registering
* @param string $vpass Password verification field
* @param mixed $action URL to submit to or false for $_SERVER['REQUEST_URI']
*
* @return object
*/
function getFinishForm(&$user, $vpass, $action = false)
{
    if ($action === false) {
        $action = $_SERVER['REQUEST_URI'];
    }
    include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
    $form = new XoopsSimpleForm(_PROFILE_MA_USERREG, "userinfo", $action, "post", true);
    $profile = $user->getProfile();
    $array = array_merge(array_keys($user->getVars()), array_keys($profile->getVars()));
    foreach ($array as $field) {
        $value = $user->getVar($field, 'e');
        if (is_array($value)) {
            foreach ($value as $thisvalue) {
                $form->addElement(new XoopsFormHidden($field . "[]", $thisvalue));
            }
        } else {
            $form->addElement(new XoopsFormHidden($field, $value));
        }
    }
    $myts =& MyTextSanitizer::getInstance();
    $form->addElement(new XoopsFormHidden('vpass', $myts->htmlSpecialChars($vpass)));
    $form->addElement(new XoopsFormHidden('op', 'finish'));
    $form->addElement(new XoopsFormButton('', 'submit', _PROFILE_MA_FINISH, 'submit'));
    return $form;
}
示例#16
0
$dispatch = $dispatch_handler->get($_REQUEST['id']);
if (isset($_REQUEST['test'])) {
    $email_arr = explode(',', $_REQUEST['email']);
    $emails = array_map('trim', $email_arr);
    if ($dispatch->send(true, $emails)) {
        $myts = MyTextSanitizer::getInstance();
        echo "Mail sent to " . $myts->addSlashes($_REQUEST['email']);
    }
}
//else {
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsSimpleForm("", 'form', 'newsletterpreview.php', 'get');
$tray = new XoopsFormElementTray('', "&nbsp;", "tray");
$tray->addElement(new XoopsFormText('email', 'email', 35, 255, ''));
$tray->addElement(new XoopsFormButton('', 'submit', 'Send Preview', 'submit'));
$form->addElement($tray);
$form->addElement(new XoopsFormHidden('test', 1));
$form->addElement(new XoopsFormHidden('id', $_REQUEST['id']));
$form->display();
$content = $dispatch->build();
echo $dispatch->getVar('dispatch_subject') . "<br />";
echo str_replace("cid:embedimage", XOOPS_URL . "/fil/", $content['html']);
//echo $xoopsLogger->dumpAll();
//echo "<br />";
//echo $content['text'];
//}
//echo "<hr />";
//$dispatch_time = $dispatch->getNextDispatch();
//echo "<br /> <br />Next dispatch: ".date("d-m-Y H:i", $dispatch_time);
//echo "<hr />";
//xoops_cp_footer();
示例#17
0
            $perm_name = 'alumni_submit';
            $restriction = '';
            $anonymous = false;
            $form = new XoopsGroupPermForm($title_of_form, $moduleId, $perm_name, $perm_desc, 'admin/groupperm.php', $anonymous);
            break;
        case 'alumni_premium':
            $title_of_form = constant($modinfo_lang . '_PREMIUM');
            $perm_name = 'alumni_premium';
            $restriction = '';
            $anonymous = false;
            $form = new XoopsGroupPermForm($title_of_form, $moduleId, $perm_name, $perm_desc, 'admin/groupperm.php', $anonymous);
            break;
    }
    $opform = new XoopsSimpleForm('', 'opform', 'groupperm.php', 'get');
    $opSelect = new XoopsFormSelect('', 'op', $op);
    $opSelect->setExtra('onchange="document.forms.opform.submit()"');
    $opSelect->addOption('alumni_view', constant($modinfo_lang . '_VIEWFORM'));
    $opSelect->addOption('alumni_submit', constant($modinfo_lang . '_SUBMITFORM'));
    $opSelect->addOption('alumni_premium', constant($modinfo_lang . '_PREMIUM'));
    $opform->addElement($opSelect);
    $opform->display();
    foreach (array_keys($cats) as $i) {
        $cid = $cats[$i]->getVar('cid');
        $title = $cats[$i]->getVar('title');
        $pid = $cats[$i]->getVar('pid');
        $allcats = $cattree->alumni_makeArrayTree($cats[$i]->getVar('cid'));
        $form->addItem($cid, $title, $pid);
    }
    $form->display();
}
$xoops->footer();
示例#18
0
 $options = array();
 $promotray = new XoopsFormElementTray('');
 $option_select = new XoopsFormSelect('', 'formtype', $formtype);
 //$option_wins = array( '1' => 'Compact' , '2' => 'DHTML', '3' => 'htmlarea', '4' => 'Koivi',
 // '5' => 'TinyEditor', '6' => 'Inbetween' , '7' => 'spaw', '8' => 'FCK');
 $option_wins = mp_selecteditor();
 foreach ($xoopsModuleConfig['wysiwyg'] as $option) {
     if (!empty($option_wins[$option])) {
         $options[$option] = $option_wins[$option];
     }
 }
 $option_select->addOptionArray($options);
 $promotray->addElement($option_select);
 $button_tray = new XoopsFormButton("", "submit", "<>", "submit");
 $button_tray->setExtra("onclick=\"document.prvmsg.action='msgbox.php?op=sendbox&send=" . $send . "&reply=" . $reply . "'\"");
 $select_form->addElement($promotray);
 $promotray->addElement($button_tray);
 $xoopsTpl->assign('mp_selectview', $select_form->render());
 //
 include 'include/form.inc.php';
 // affiche le message de reponse
 if ($reply == 1) {
     $poster = new XoopsUser($pm2->getVar("from_userid"));
     if (!$poster->isActive()) {
         $poster_name = $xoopsConfig['anonymous'];
     } else {
         $poster_name = $poster->getVar("uname");
         $poster_rank = $poster->rank();
         echo "<br /><span style=\"background-color: #E9E9E9; border:1px solid #C0C0C0;font-size:10px;\">&nbsp;\r\n" . _MP_MMES . "&nbsp;\r\n<a href=\"javascript:;\" onclick=\"showForm('prevu');\">+</a>/\r\n<a href=\"javascript:;\" onclick=\"hideAll('prevu');\">-</a>&nbsp;</span>\r\n<div id='prevu'>\r\n<table border='0' cellspacing='1' cellpadding='4' width='100%' class='outer'>\r\n<tr><td width='20%' class='xo-message-head'><b><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $poster->getVar("uid") . "'>" . $poster_name . "</a></td>\r\n    <td class='xo-message-head'>" . _MP_POSTED . "&nbsp;" . formatTimestamp($pm2->getVar("msg_time")) . "</td>\r\n</tr>\t\r\n<tr><td class='xo-message-even' valign='top' rowspan='2'>\r\n\t\t<div class='comUserRank'><div class='comUserRankText'>" . $poster_rank['title'] . "</div>\r\n\r\n<img class='comUserRankImg' src='" . XOOPS_UPLOAD_URL . "/" . $poster_rank['image'] . "' alt='' />\r\n\r\n</div>\r\n<img class='comUserImg' src='" . XOOPS_UPLOAD_URL . "/" . $poster->getVar("user_avatar") . "' alt=''/>\r\n<div class='comUserStat'><span class='comUserStatCaption'>" . _MP_JOINED . "</span>\r\n" . formatTimestamp($poster->getVar('user_regdate'), 's') . "</div>\r\n<div class='comUserStat'><span class='comUserStatCaption'>" . _MP_FROM2 . "</span>\r\n" . $poster->getVar('user_from') . "</div>\r\n<div class='comUserStat'><span class='comUserStatCaption'>" . _MP_POSTS . "\r\n</span>" . $poster->getVar('posts') . "</div>";
         if ($poster->isOnline()) {
             echo '<div class="comUserStatus"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/online.png" title="' . _MP_ONLINE . '" style="width: 20px; height: 20px;"/></div>';
示例#19
0
    $monthSelect->addOption($i, $extcalTimeHandler->getMonthName($i));
}
// Day selectbox
$daySelect = new XoopsFormSelect('', 'day', $day);
for ($i = 1; $i < 32; $i++) {
    $daySelect->addOption($i);
}
// Category selectbox
$catsList = $catHandler->getAllCat($xoopsUser);
$catSelect = new XoopsFormSelect('', 'cat', $cat);
$catSelect->addOption(0, ' ');
foreach ($catsList as $catList) {
    $catSelect->addOption($catList->getVar('cat_id'), $catList->getVar('cat_name'));
}
$form = new XoopsSimpleForm('', 'navigSelectBox', 'week.php', 'get');
$form->addElement($yearSelect);
$form->addElement($monthSelect);
$form->addElement($daySelect);
$form->addElement($catSelect);
$form->addElement(new XoopsFormButton("", "", _SEND, "submit"));
// Assigning the form to the template
$form->assign($xoopsTpl);
// Retriving events
$events = $eventHandler->objectToArray($eventHandler->getEventWeek($day, $month, $year, $cat), array('cat_id'));
// Treatment for recurring event
$startWeek = mktime(0, 0, 0, $month, $day, $year);
$endWeek = $startWeek + 604800;
$eventsArray = array();
foreach ($events as $event) {
    if (!$event['event_isrecur']) {
        $eventsArray[] = $event;