Ejemplo n.º 1
0
##  This program is distributed in the hope that it will be useful,          ##
##  but WITHOUT ANY WARRANTY; without even the implied warranty of           ##
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            ##
##  GNU General Public License for more details.                             ##
##                                                                           ##
##  You should have received a copy of the GNU General Public License        ##
##  along with this program; if not, write to the Free Software              ##
##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA ##
###############################################################################
##  URL: http://www.frxoops.org/                                             ##
##  Project: Formulaire                                                      ##
###############################################################################
include_once "admin_header.php";
include_once "../include/functions.php";
xoops_cp_header();
form_adminMenu(0, _AM_INDEX);
if (file_exists("../language/" . $xoopsConfig['language'] . "/modinfo.php")) {
    include "../language/" . $xoopsConfig['language'] . "/modinfo.php";
} else {
    include "../language/english/modinfo.php";
}
if (file_exists("../language/" . $xoopsConfig['language'] . "/helpdoc.php")) {
    include "../language/" . $xoopsConfig['language'] . "/helpdoc.php";
} else {
    include "../language/english/helpdoc.php";
}
if (file_exists("../language/" . $xoopsConfig['language'] . "/main.php")) {
    include "../language/" . $xoopsConfig['language'] . "/main.php";
} else {
    include "../language/english/main.php";
}
Ejemplo n.º 2
0
 if ($id != '') {
     form_adminMenu(2, _AM_FORMS);
     $title_form = new XoopsFormElementTray(_FORM_TITLE, '');
     $title_form->addElement(new XoopsFormText('', 'newtitle2', 30, 255, $title));
     if ($afftit == '1') {
         $titaff = new XoopsFormCheckBox("      " . _FORM_DISPLAY, 'afftit', 1);
         $titaff->addOption(1, ' ');
     } else {
         $titaff = new XoopsFormCheckBox("      " . _FORM_DISPLAY, 'afftit');
         $titaff->addOption(1, ' ');
     }
     $title_form->addElement($titaff);
     $form = new XoopsThemeForm(_FORM_MOD . ' ' . $title, 'update', 'mailindex.php?op=upform&id=' . $id, 'post');
     $form->addElement($title_form);
 } else {
     form_adminMenu(1, _AM_CREATE);
     $title_form = new XoopsFormElementTray(_FORM_TITLE, '');
     $title_form->addElement(new XoopsFormText('', 'newtitle', 30, 255, ""));
     $titaff = new XoopsFormCheckBox("      " . _FORM_DISPLAY, 'afftit');
     $titaff->addOption(1, ' ');
     $title_form->addElement($titaff);
     $form = new XoopsThemeForm(_FORM_CREAT, 'create', 'mailindex.php?op=addform', 'post');
     $form->addElement($title_form);
 }
 $image = new XoopsFormElementTray(_FORM_IMAGE, '');
 $images_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/uploads/formulaire/imgform");
 if ($id != '') {
     $imgsel = new XoopsFormSelect('', "image", $image);
 } else {
     $imgsel = new XoopsFormSelect('', "image");
 }
Ejemplo n.º 3
0
function MyMenuEdit($menuid)
{
    global $xoopsDB, $xoopsConfig, $xoopsModule;
    xoops_cp_header();
    form_adminMenu(6, _AM_INDEX);
    function modify()
    {
        global $xoopsDB, $xoopsConfig, $xoopsModule;
        form_collapsableBar('toptable', 'toptableicon');
        echo '<DIV id="help" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV>';
        echo "<script src='../main15.js' type='text/javascript'></script>";
        echo '<SCRIPT language="JavaScript1.2"  type="text/javascript">
Text[10]=["' . _AM_CHANGE_STATUS . '","' . _AM_CHANGE_STATUS_TEXT . '"]
Text[11]=["' . _AM_EDIT_MENU . '","' . _AM_EDIT_MENU_TEXT . '"]

Style[1]=["white","#F6B542","","","",,"black","#FFFFFF","","","",,,,2,"#F6C063",2,,,,,"",1,,,]

var TipId="help"
var FiltersEnabled = 0 // [for IE5.5+] if your not going to use transitions or filters in any of the tips set this to zero.
mig_clay()

</SCRIPT>';
        echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/close12.gif alt='' /></a>&nbsp;" . _AM_MENUMODIFY . "</h3>";
        echo "<div id='toptable'>";
        //    echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_BLOCKSTXT . "</span>";
        echo "\t<table class='outer' cellspacing='1' width='100%'>\r\n\t\t<th colspan='4'>" . _AM_CHANGEMENUITEM . "</th>\r\n\r\n        <form action='menu_index.php' method='post'>\r\n        <table border='0' cellpadding='0' cellspacing='0' valign='top' width='100%'>\r\n        <tr>\r\n        <td>\r\n                <table width='100%' border='0' cellpadding='4' cellspacing='1'>\r\n                <tr class='head'>\r\n                <td width='30'><b>" . _AM_POS_SHORT . "</b></td>\r\n                <td><b>" . _AM_ITEMNAME . "</b></td>\r\n                <td><b>" . _AM_INDENT_SHORT . "</b></td>\r\n                <td><b>" . _AM_MARGIN_TOPSHORT . "</b></td>\r\n                <td><b>" . _AM_MARGIN_BOTTOMSHORT . "</b></td>\r\n                <td><b>" . _AM_ITEMURL . "</b></td>";
        echo "\r\n                <td><b>" . _AM_STATUS . "</b></td>\r\n                <td><b>" . _AM_ACTION . "</b></td>";
        $result = $xoopsDB->query("SELECT menuid, position, itemname, indent, margintop, marginbottom, itemurl, bold, status FROM " . $xoopsDB->prefix("form_menu") . " ORDER BY position");
        $myts =& MyTextSanitizer::getInstance();
        while (list($menuid, $position, $itemname, $indent, $margintop, $marginbottom, $itemurl, $bold, $status) = $xoopsDB->fetchRow($result)) {
            $itemname = $myts->makeTboxData4Show($itemname);
            $itemurl = $myts->makeTboxData4Show($itemurl);
            if ($position != 0) {
                echo "<tr class='odd'><td align='center'><a href=menu_index.php?id=" . $menuid . "&pos=" . $position . "&op=ele_up><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/up.gif /></a>&nbsp;";
            } else {
                echo "<tr class='odd'><td align='center'>";
            }
            echo "<a href=menu_index.php?id=" . $menuid . "&pos=" . $position . "&op=ele_down><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/down.gif /></a></td>";
            if ($bold == 1) {
                echo "<td><b>{$itemname}</b></td>";
            } else {
                echo "<td>{$itemname}</td>";
            }
            echo "<td>{$indent} px</td>";
            echo "<td>{$margintop} px</td>";
            echo "<td>{$marginbottom} px</td>";
            echo "<td><a href=" . $itemurl . ">{$itemurl}</a></td>";
            if ($status == 1) {
                echo '<td class="odd" width="5%"><center><a href="active.php?id=' . $menuid . '&status=' . $status . '&url=menu_index.php"><img src="../images/on.gif" alt="" onMouseOver="stm(Text[10],Style[1])" onMouseOut="htm()"></a></td>';
            } else {
                echo '<td class="odd" width="5%"><center><a href="active.php?id=' . $menuid . '&status=' . $status . '&url=menu_index.php"><img src="../images/off.gif" alt="" onMouseOver="stm(Text[10],Style[1])" onMouseOut="htm()"></a></td>';
            }
            echo "<td align='center'><a href='menu_index.php?op=MyMenuEdit&amp;menuid={$menuid}'><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/edit.gif  alt='' onMouseOver='stm(Text[11],Style[1])' onMouseOut='htm()'/></a></td>\r\n                </tr>";
        }
        echo "</table>\r\n        </td>\r\n        </tr>\r\n        </table>\r\n        </form><br /><br />";
        echo "</div>";
    }
    function edit($menuid)
    {
        global $xoopsDB, $xoopsConfig, $xoopsModule;
        form_collapsableBar('bottomtable', 'bottomtableicon');
        echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/close12.gif alt='' /></a>&nbsp;" . _AM_MENUEDIT . "</h3>";
        echo "<div id='bottomtable'>";
        $result = $xoopsDB->query("SELECT position, itemname, indent, margintop, marginbottom, itemurl, bold, status FROM " . $xoopsDB->prefix("form_menu") . " WHERE menuid={$menuid}");
        list($xposition, $itemname, $indent, $margintop, $marginbottom, $itemurl, $bold, $status) = $xoopsDB->fetchRow($result);
        $myts =& MyTextSanitizer::getInstance();
        $itemname = $myts->makeTboxData4Edit($itemname);
        $itemurl = $myts->makeTboxData4Edit($itemurl);
        echo "\t<table class='outer' cellspacing='1' width='100%'>\r\n\t\t<th colspan='4'>" . _AM_EDITMENUITEM . "</th>\r\n\r\n        <form action='menu_index.php' method='post'>\r\n        <input type='hidden' name='menuid' value='{$menuid}' />\r\n        <table border='0' cellpadding='0' cellspacing='0' valign='top' width='100%'>\r\n        <tr>\r\n        <td>\r\n                <table width='100%' border='0' cellpadding='4' cellspacing='1'>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_POS . "</b></td>\r\n                <td class='odd'><input type='text' name='xposition' size='4' maxlength='4' value='{$xposition}' />&nbsp&nbsp&nbsp(0000-9999)</td>\r\n                </tr>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_ITEMNAME . "</b></td>\r\n                <td class='odd'><input type='text' name='itemname' size='50' maxlength='60' value='{$itemname}' /></td>\r\n                </tr>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_INDENT . "</b></td>\r\n                <td class='odd'><input type='text' name='indent' size='12' maxlength='12' value='{$indent}' /> px</td>\r\n                </tr>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_FONT . "</b></td>\r\n                <td class='odd'>";
        if ($bold == 1) {
            $checked_bold = "checked";
            $checked_normal = "";
        } else {
            $checked_normal = "checked";
            $checked_bold = "";
        }
        echo "\r\n                <input type='radio' {$checked_normal} name='bold' value='0'>" . _AM_NORMAL . "\r\n                <input type='radio' {$checked_bold}   name='bold' value='1'>" . _AM_BOLD . "\r\n                </td>\r\n                </tr>\r\n\t\t<tr>\r\n                <td class='head'><b>" . _AM_ITEMURL . "</b></td>\r\n                <td class='odd'><input type='text' name='itemurl' size='65' maxlength='255' value='{$itemurl}' /></td>\r\n                </tr>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_MARGINTOP . "</b></td>\r\n                <td class='odd'><input type='text' name='margintop' size='12' maxlength='12' value='{$margintop}' /> px</td>\r\n                </tr>\r\n                <tr>\r\n                <td class='head'><b>" . _AM_MARGINBOTTOM . "</b></td>\r\n                <td class='odd'><input type='text' name='marginbottom' size='12' maxlength='12' value='{$marginbottom}' /> px</td>\r\n                </tr>";
        echo "\r\n                <tr>\r\n                <td class='head'><b>" . _AM_STATUS . "</b></td>\r\n                <td class='odd'>";
        if ($status == 1) {
            $checked_active = "checked";
            $checked_inactive = "";
        } else {
            $checked_inactive = "checked";
            $checked_active = "";
        }
        echo "\r\n                <input type='radio' {$checked_active}   name='status' value='1'>" . _AM_ACTIVE . "\r\n                <input type='radio' {$checked_inactive} name='status' value='0'>" . _AM_INACTIVE . "\r\n                </td>\r\n                </tr>\r\n\r\n                <tr>\r\n                <td class='head'>&nbsp;</td>\r\n                <td class='odd'><input type='hidden' name='fct' value='mymenu' /><input type='hidden' name='op' value='MyMenuSave' /><input type='submit' value='" . _AM_SAVECHANG . "' /></td>\r\n                </tr>\r\n                </table>\r\n        </td>\r\n        </tr>\r\n        </table>\r\n\r\n        </form>";
    }
    modify();
    edit($menuid);
}
Ejemplo n.º 4
0
} else {
    include "../language/english/modinfo.php";
}
if (is_dir(FORMULAIRE_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template")) {
    $template_dir = FORMULAIRE_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template";
} else {
    $template_dir = FORMULAIRE_ROOT_PATH . "/language/english/mail_template";
}
if (file_exists("../language/" . $xoopsConfig['language'] . "/main.php")) {
    include "../language/" . $xoopsConfig['language'] . "/main.php";
} else {
    include "../language/english/main.php";
}
include "../include/functions.php";
xoops_cp_header();
form_adminMenu(7, _AM_CSV);
if (!isset($_POST['form'])) {
    $form = isset($_GET['form']) ? $_GET['form'] : '1';
} else {
    $form = $_POST['form'];
}
if (!isset($_POST['req'])) {
    $req = isset($_GET['req']) ? $_GET['req'] : '';
} else {
    $req = $_POST['req'];
}
if (!isset($_POST['id'])) {
    $id = isset($_GET['id']) ? $_GET['id'] : '';
} else {
    $id = $_POST['id'];
}
Ejemplo n.º 5
0
} else {
    include "../language/english/main.php";
}
if (file_exists("../language/" . $xoopsConfig['language'] . "/modinfo.php")) {
    include "../language/" . $xoopsConfig['language'] . "/modinfo.php";
} else {
    include "../language/english/modinfo.php";
}
global $xoopsDB, $xoopsConfig;
if (is_dir(FORMULAIRE_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template")) {
    $template_dir = FORMULAIRE_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template";
} else {
    $template_dir = FORMULAIRE_ROOT_PATH . "/language/english/mail_template";
}
xoops_cp_header();
form_adminMenu(3, _AM_FORMS);
if (!isset($_POST['form'])) {
    $id = isset($_GET['id']) ? $_GET['id'] : '0';
} else {
    $id = $_POST['id'];
}
if (!isset($_POST['req'])) {
    $req = isset($_GET['req']) ? $_GET['req'] : '';
} else {
    $req = $_POST['req'];
}
if (!isset($_POST['op'])) {
    $op = isset($_GET['op']) ? $_GET['op'] : '';
} else {
    $op = $_POST['op'];
}
Ejemplo n.º 6
0
function permform()
{
    global $xoopsDB, $xoopsModule;
    $module_id = $xoopsModule->getVar('mid');
    $myts =& MyTextSanitizer::getInstance();
    form_adminMenu(4, _AM_MODPERM);
    $sql = "SELECT id_form,desc_form FROM " . $xoopsDB->prefix("form_id");
    $res = $xoopsDB->query($sql);
    if ($res) {
        $tab = array();
        while ($row = $xoopsDB->fetchArray($res)) {
            $row['desc_form'] = $myts->displayTarea($row['desc_form']);
            $tab[$row['id_form']] = $row['desc_form'] . " (" . $row['id_form'] . ")";
        }
    }
    // !! ne pas tenter de coder en html les traductions de ces deux 'define' -> les permissions ne sont plus réaffichées.
    $title_of_form = _AM_TITPERM;
    $perm_name = _AM_CATPERM;
    $perm_desc = '';
    $form = new XoopsGroupPermForm('<table class="outer" cellspacing="1" width="100%"><th><font size="2">' . $title_of_form . '</font></th></table>', $module_id, $perm_name, $perm_desc);
    foreach ($tab as $item_id => $item_name) {
        if ($item_name != "") {
            $form->addItem($item_id, $item_name);
        }
    }
    echo $form->render();
}
Ejemplo n.º 7
0
    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(_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();
}
if (!empty($_POST['submit'])) {
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
    }
    include "mygroupperm.php";
    redirect_header(XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/admin/myblocksadmin.php{$query4redirect}", 1, _MD_AM_DBUPDATED);
}
xoops_cp_header();
if (file_exists('./mymenu.php')) {
    include './mymenu.php';
}
form_adminMenu(5, _AM_BLOCKSANDGROUPS);
list_blocks();
list_groups();
include 'footer.php';
xoops_cp_footer();
Ejemplo n.º 8
0
                $value[2] = $ele_value[$ide];
                break;
            case 'upload':
                $value[0] = $ele_value[$ide];
                $value[1] = $ele_value[$ide + 1];
                $value[2] = $ele_value[$ide + 2];
                break;
            default:
                break;
        }
        $element->setVar('ele_value', $value);
        $element->setVar('id_form', $id);
        if (!$formulaire_mgr->insert($element)) {
            $error .= $element->getHtmlErrors();
        }
    }
    if (empty($error)) {
        $url = "index.php?id={$id}";
        Header("Location: {$url}");
    } else {
        xoops_cp_header();
        form_adminMenu(2, _AM_FORMS);
        echo $error;
    }
}
echo '	<table class="outer" width="100%"><tr>
			<th><center>' . _AM_SEE_FORM . '</center></th>
		</tr>
		<tr><td class="even"><center><a href="../formulaire.php?id=' . $id . '" target="_blank"><img src="../images/formulaire.gif" alt="" onMouseOver="stm(Text[4],Style[1])" onMouseOut="htm()"></a></center></td></tr></table>';
include 'footer.php';
xoops_cp_footer();