Ejemplo n.º 1
0
function list_groups()
{
    global $xoopsUser, $xoopsConfig, $xoopsDB;
    global $xoopsModule, $block_arr, $xoops_system_url;
    foreach (array_keys($block_arr) as $i) {
        $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
    }
    $form = new MyXoopsGroupPermForm('', 1, 'block_read', _MD_AM_ADGS);
    $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS);
    $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS);
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $item_name);
    }
    echo $form->render();
}
Ejemplo n.º 2
0
function list_groups()
{
    global $target_mid, $target_mname, $block_arr;
    $item_list = array();
    foreach (array_keys($block_arr) as $i) {
        $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
    }
    $form = new MyXoopsGroupPermForm(_AM_MYLINKS_AGDS, 1, 'block_read', '');
    if ($target_mid > 1) {
        $form->addAppendix('module_admin', $target_mid, $target_mname . ' ' . _AM_MYLINKS_ACTIVERIGHTS);
        $form->addAppendix('module_read', $target_mid, $target_mname . ' ' . _AM_MYLINKS_ACCESSRIGHTS);
    }
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $item_name);
    }
    echo $form->render();
}
Ejemplo n.º 3
0
function list_groups()
{
    global $xoopsModule, $block_arr;
    $myts =& MyTextSanitizer::getInstance();
    //smartclient_collapsableBar('bottomtable', 'bottomtableicon');
    foreach (array_keys($block_arr) as $i) {
        $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
    }
    $form = new MyXoopsGroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a>&nbsp;" . _AM_SCLIENT_GROUPS . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SCLIENT_GROUPSINFO . "</span>");
    $form->addAppendix('module_admin', $xoopsModule->mid(), $myts->displayTarea($xoopsModule->name()) . ' ' . _AM_ACTIVERIGHTS);
    $form->addAppendix('module_read', $xoopsModule->mid(), $myts->displayTarea($xoopsModule->name()) . ' ' . _AM_ACCESSRIGHTS);
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $myts->displayTarea($item_name));
    }
    echo $form->render();
    echo "</div>";
}
Ejemplo n.º 4
0
function list_groups()
{
    global $target_mid, $target_mname, $block_arr;
    smartsection_collapsableBar('groupstable', 'groupsicon', _AM_SSECTION_GROUPS, _AM_SSECTION_GROUPSINFO);
    $item_list = array();
    foreach (array_keys($block_arr) as $i) {
        $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
    }
    $form = new MyXoopsGroupPermForm(_MD_AM_ADGS, 1, 'block_read', '');
    if ($target_mid > 1) {
        $form->addAppendix('module_admin', $target_mid, $target_mname . ' ' . _AM_ACTIVERIGHTS);
        $form->addAppendix('module_read', $target_mid, $target_mname . ' ' . _AM_ACCESSRIGHTS);
    }
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $item_name);
    }
    echo $form->render();
    smartsection_close_collapsable('groupstable', 'groupsicon');
}
 function list_groups()
 {
     // query for getting blocks
     $sql = "SELECT * FROM " . $this->db->prefix("newblocks") . " WHERE mid='{$this->target_mid}' ORDER BY visible DESC,side,weight";
     $result = $this->db->query($sql);
     $block_arr = array();
     while ($myrow = $this->db->fetchArray($result)) {
         $block_arr[] = new XoopsBlock($myrow);
     }
     $item_list = array();
     foreach (array_keys($block_arr) as $i) {
         $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
     }
     $form = new MyXoopsGroupPermForm(_MD_A_MYBLOCKSADMIN_PERMFORM, 1, 'block_read', '');
     // skip system (TODO)
     if ($this->target_mid > 1) {
         $form->addAppendix('module_admin', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MADMIN);
         $form->addAppendix('module_read', $this->target_mid, $this->target_mname . ' ' . _MD_A_MYBLOCKSADMIN_PERM_MREAD);
     }
     foreach ($item_list as $item_id => $item_name) {
         $form->addItem($item_id, $item_name);
     }
     echo $form->render();
 }
function list_groups2()
{
    global $target_mid, $target_mname, $xoopsDB;
    $result = $xoopsDB->query("SELECT i.instanceid,i.title FROM " . $xoopsDB->prefix("block_instance") . " i LEFT JOIN " . $xoopsDB->prefix("newblocks") . " b ON i.bid=b.bid WHERE b.mid='{$target_mid}'");
    $item_list = array();
    while (list($iid, $title) = $xoopsDB->fetchRow($result)) {
        $item_list[$iid] = $title;
    }
    $form = new MyXoopsGroupPermForm(_MD_AM_ADGS, 1, 'block_read', '');
    if ($target_mid > 1) {
        $form->addAppendix('module_admin', $target_mid, $target_mname . ' ' . _AM_ACTIVERIGHTS);
        $form->addAppendix('module_read', $target_mid, $target_mname . ' ' . _AM_ACCESSRIGHTS);
    }
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $item_name);
    }
    echo $form->render();
}
Ejemplo n.º 7
0
function list_groups()
{
    global $xoopsModule, $block_arr;
    ss_collapsableBar('groupstable', 'groupsicon', _AM_SS_GROUPS, _AM_SS_GROUPSINFO);
    foreach (array_keys($block_arr) as $i) {
        $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title");
    }
    $form = new MyXoopsGroupPermForm('', 1, 'block_read', "");
    $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS);
    $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS);
    foreach ($item_list as $item_id => $item_name) {
        $form->addItem($item_id, $item_name);
    }
    echo $form->render();
    ss_close_collapsable('groupstable', 'groupsicon');
}