Beispiel #1
0
function html_editor($textareaname)
{
    if (preg_match("/(MSIE)/i", $_SERVER['HTTP_USER_AGENT'])) {
        init_editor($textareaname);
    } else {
        xoopsCodeTarea($textareaname);
        xoopsSmilies($textareaname);
    }
}
Beispiel #2
0
function ModForm()
{
    global $xoopsDB;
    $idt = $_POST['idt'];
    if ($idt <= 0) {
        header('location: terminos.php');
        die;
    }
    xoops_cp_header();
    include_once 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    ShowNav();
    $result = $xoopsDB->query("SELECT * FROM {$tterms} WHERE id_term='{$idt}'");
    $row = $xoopsDB->fetchArray($result);
    echo "<table width='100%' class='outer' cellspacing='1'>\n\n\t\t\t<tr><th colspan='2'>" . _AM_TERMS_MOD . "</th></tr>\n\t\t\t<form name='frmNew' method='post' action='terminos.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_TERM_TITLE . "</td>\n\n\t\t\t<td class='odd' align='left'><input value='{$row['titulo']}' type='text' name='titulo' size='30'></td></tr>\n\t\t\t<tr><td class='even' align='left'>" . _AM_TERMS_TEXT . "</td>\n\n\t\t\t<td class='odd' align='left'>";
    $GLOBALS['texto'] = $row['texto'];
    xoopsCodeTarea("texto", 20, 15);
    xoopsSmilies("texto");
    echo "\t</td></tr>\n\n\t\t\t<tr><td class='even'>&nbsp;</td>\n\n\t\t\t<td class='odd' align='left'><input type='submit' name='sbt' value='" . _AM_SEND . "'></td></tr>\n\n\t\t\t<input type='hidden' name='op' value='savemod'>\n\t\t\t<input type='hidden' name='idt' value='{$idt}'>\n\t\t\t</form></table>";
    xoops_cp_footer();
}
Beispiel #3
0
    } else {
        $tags['WAITINGLINKS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=listNewLinks';
        $notification_handler->triggerEvent('global', 0, 'link_submit', $tags);
        $notification_handler->triggerEvent('category', $cid, 'link_submit', $tags);
        if ($notify) {
            include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
            $notification_handler->subscribe('link', $newid, 'approve', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
        }
        redirect_header("index.php", 2, _MD_RECEIVED);
    }
    exit;
} else {
    $xoopsOption['template_main'] = 'mylinks_submit.html';
    include XOOPS_ROOT_PATH . "/header.php";
    ob_start();
    xoopsCodeTarea("message", 37, 8);
    $xoopsTpl->assign('xoops_codes', ob_get_contents());
    ob_end_clean();
    ob_start();
    xoopsSmilies("message");
    $xoopsTpl->assign('xoops_smilies', ob_get_contents());
    ob_end_clean();
    $xoopsTpl->assign('notify_show', !empty($xoopsUser) && !$xoopsModuleConfig['autoapprove'] ? 1 : 0);
    $xoopsTpl->assign('lang_submitonce', _MD_SUBMITONCE);
    $xoopsTpl->assign('lang_submitlinkh', _MD_SUBMITLINKHEAD);
    $xoopsTpl->assign('lang_allpending', _MD_ALLPENDING);
    $xoopsTpl->assign('lang_dontabuse', _MD_DONTABUSE);
    $xoopsTpl->assign('lang_wetakeshot', _MD_TAKESHOT);
    $xoopsTpl->assign('lang_sitetitle', _MD_SITETITLE);
    $xoopsTpl->assign('lang_siteurl', _MD_SITEURL);
    $xoopsTpl->assign('lang_category', _MD_CATEGORYC);
Beispiel #4
0
function ModForm()
{
    global $xoopsDB;
    $idb = $_GET['idb'];
    if ($idb <= 0) {
        ShowBanns();
        die;
    }
    include 'functions.php';
    $result = $xoopsDB->query("SELECT * FROM {$tbann} WHERE id_ban='{$idb}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('banners.php', 1, _AM_NOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    xoops_cp_header();
    ShowNav();
    echo "<table width='100%' class='outer' cellspacing='1'>\n\n\t\t\t<tr><th colspan='2'>" . _AM_MODBANN . "</th></tr>\n\t\t\t<form name='frmNew' method='post' action='banners.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_FORMSERV . "</td>\n\n\t\t\t<td class='odd' align='left'><select name='ids'>\n\n\t\t\t<option value='0'>" . _AM_SELECTSRV . "</option>";
    $result = $xoopsDB->query("SELECT nombre, id_srv, id_cat FROM " . $xoopsDB->prefix("rmsrv_servicios") . " ORDER BY nombre");
    while ($rw = $xoopsDB->fetchArray($result)) {
        if ($row['id_srv'] == $rw['id_srv']) {
            echo "<option value='{$rw['id_srv']}' selected>{$rw['nombre']} (" . CategoName($rw['id_cat']) . ")</option>";
        } else {
            echo "<option value='{$rw['id_srv']}'>{$rw['nombre']} (" . CategoName($rw['id_cat']) . ")</option>";
        }
    }
    echo "</select></td></tr>\n\t\t  <tr><td class='even' align='left'>" . _AM_FORMIMG . "</td>\n\t\t  <td class='odd' align='left'><textarea cols='30' rows='3' name='img'>{$row['img']}</textarea></td></tr>\n\t\t  <tr><td align='left' class='even'>" . _AM_DESC . "</td>\n\t\t  <td class='odd' align='left'>";
    $GLOBALS['desc'] = $row['desc'];
    xoopsCodeTarea("desc", 20, 15);
    xoopsSmilies("desc");
    echo "</td></tr>\n\n\t\t  <tr><td class='even' align='left'>" . _AM_SHOWBUY . "</td>\n\t\t  <td class='odd' align='left'>";
    if ($row['buy']) {
        echo "<input type='radio' name='buy' value='1' checked='checked' /> " . _AM_YES . "&nbsp;\n\t\t  \t\t  <input type='radio' name='buy' value='0' /> " . _AM_NO . "</td></tr>";
    } else {
        echo "<input type='radio' name='buy' value='1' /> " . _AM_YES . "&nbsp;\n\t\t  \t\t  <input type='radio' name='buy' value='0' checked='checked' /> " . _AM_NO . "</td></tr>";
    }
    echo "<tr><td class='even' align='left'>" . _AM_SHOWBORDER . "</td>\n\t\t  <td class='odd' align='left'>";
    if ($row['showborder']) {
        echo "<input type='radio' name='borde' value='1' checked='checked' /> " . _AM_YES . "&nbsp;\n\t\t  \t\t  <input type='radio' name='borde' value='0' /> " . _AM_NO . "</td></tr>";
    } else {
        echo "<input type='radio' name='borde' value='1' /> " . _AM_YES . "&nbsp;\n\t\t  \t\t  <input type='radio' name='borde' value='0' checked='checked' /> " . _AM_NO . "</td></tr>";
    }
    echo "<tr><td class='even'>&nbsp;</td>\n\t\t  <td class='odd' align='left'><input type='submit' name='sbt' value='" . _AM_SEND . "'></td></tr>\n\t\t  <input type='hidden' name='op' value='savemod'>\n\t\t  <input type='hidden' name='idb' value='{$idb}'></form></table>";
    xoops_cp_footer();
}
Beispiel #5
0
function NewCatego_Form($action = 0)
{
    global $xoopsDB;
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    if ($action) {
        $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("rmlib_categos") . " WHERE cid='{$_GET['cid']}'");
        list($tid, $titulo, $desc, $fecha) = $xoopsDB->fetchRow($result);
    }
    $GLOBALS['desc'] = $desc;
    $cid = $_GET['cid'];
    xoops_cp_header();
    echo "<table align='center' class='outer' cellspacing='1' cellpadding='0' width='80%'>\n\n\t\t\t<tr><th align='left' colspan='2'>" . _RH_CATEGOS_NEWCATEGO . "</th><tr>\n\n\t\t\t<form name='frmNew' method='post' action='index.php'>\n\t\t\t<tr><td class='even' align='left'>" . _RH_CATEGOS_TITLEC . "</td>\n\n\t\t\t<td class='odd' align='left'><input type='text' name='title' size='30' maxlength='100' value='{$titulo}'></td></tr>\n\n\t\t\t<tr><td class='even' align='left'>" . _RH_CATEGOS_DESC . "</td>\n\n\t\t\t<td class='odd' align='left'>";
    xoopsCodeTarea("desc", 20, 15);
    xoopsSmilies("desc");
    echo "  </td></tr>\n\n\t\t\t<tr><td class='even'>&nbsp;</td>\n\n\t\t\t<td class='odd' align='left'><input type='submit' name='sbt' value='" . _RH_GENERAL_SEND . "'>\n\n\t\t\t<input type='button' name='cancel' value='" . _RH_GENERAL_CANCEL . "' onClick='javascript: history.go(-1)'></td></tr>\n\n\t\t\t<input type='hidden' name='op' value='savecatego'>\n\n\t\t\t<input type='hidden' name='tid' value='{$tid}'>\n\n\t\t\t<input type='hidden' name='cid' value='{$cid}'>\n</form></table>";
    xoops_cp_footer();
}
Beispiel #6
0
$count = 1;
while (list($key, $file) = each($filelist)) {
    $checked = "";
    if (isset($icon) && $file == $icon) {
        $checked = " checked='checked'";
    }
    echo "<input type='radio' value='{$file}' name='icon'{$checked} />&nbsp;";
    echo "<img src='" . XOOPS_URL . "/images/subject/{$file}' alt='' />&nbsp;";
    if ($count == 8) {
        echo "<br />";
        $count = 0;
    }
    $count++;
}
echo "</td></tr>\r\n<tr align='left'>\r\n<td class='head' valign='top' nowrap='nowrap'>" . _MD_MESSAGEC . "\r\n</td>\r\n<td class='odd'>";
xoopsCodeTarea("message");
if (!empty($isreply) && isset($hidden) && $hidden != "") {
    echo "<input type='hidden' name='isreply' value='1' />";
    echo "<input type='hidden' name='hidden' id='hidden' value='{$hidden}' />\r\n\t<input type='button' name='quote' class='formButton' value='" . _MD_QUOTE . "' onclick='xoopsGetElementById(\"message\").value=xoopsGetElementById(\"message\").value + xoopsGetElementById(\"hidden\").value; xoopsGetElementById(\"hidden\").value=\"\";' /><br />";
}
xoopsSmilies("message");
echo "</td></tr>\r\n<tr>";
echo "<td class='head' valign='top' nowrap='nowrap'>" . _MD_OPTIONS . "</td>\n";
echo "<td class='even'>";
if ($xoopsUser && $forumdata['forum_access'] == 2 && !empty($post_id)) {
    echo "<input type='checkbox' name='noname' value='1'";
    if (isset($noname) && $noname) {
        echo " checked='checked'";
    }
    echo " />&nbsp;" . _MD_POSTANONLY . "<br />\n";
}
Beispiel #7
0
function Aceptar()
{
    global $xoopsDB;
    $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    if ($ids <= 0) {
        header('location: downs.php?op=new');
        die;
    }
    $tbl = $xoopsDB->prefix("rmdp_sended");
    $result = $xoopsDB->query("SELECT * FROM {$tbl} WHERE id_send='{$ids}'");
    $num = $xoopsDB->getRowsNum($result);
    /**
     * Si no encontramos la descarga redirigimos a otro lugar
     */
    if ($num <= 0) {
        redirect_header('sended.php', 2, _AM_RMDP_ERRNOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    xoops_cp_header();
    include 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    DP_ShowNav();
    echo "<table width='100%'  border='0' cellpadding='0' cellspacing='1' class='outer'>\n  \t\t\t<tr align='left'>\n    \t\t<th colspan='2'>" . _AM_RMDP_ACEPT . "</th>\n  \t\t\t</tr>\n  \t\t\t<form name='frmNew' method='post' action='modified.php?op=save'>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FNAME . "</td>\n    \t\t<td class='odd'><input value='{$row['nombre']}' name='nombre' type='text' id='nombre' size='30' maxlength='200'></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FVERSION . "</td>\n    \t\t<td class='odd'><input value='{$row['version']}' name='version' type='text' id='version' size='30' maxlength='10'></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FLICENSE . "</td>\n    \t\t<td class='odd'><select name='licencia' id='licencia'>\n\t\t\t<option value='0'>Nenhuma</option>";
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_licences') . " ORDER BY nombre");
    while ($rw = $xoopsDB->fetchArray($result)) {
        echo "<option value='{$rw['id_lic']}'";
        if ($rw['id_lic'] == $row['licencia']) {
            echo "selected";
        }
        echo ">{$rw['nombre']}</option>";
    }
    echo "  </select></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FFILE . "</td>\n    \t\t<td class='odd'><input value='{$row['archivo']}' name='archivo' type='text' id='archivo' size='30' maxlength='255'></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FIMG . "</td>\n    \t\t<td class='odd'><input value='{$row['img']}' name='img' type='text' id='img' size='30' maxlength='255'></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FCATEGO . "</td>\n    \t\t<td class='odd'><select name='idc' id='idc'>\n      \t\t<option value='0' selected>" . _AM_RMDP_SELECT . "</option>";
    DP_ChildCategoOption(0, 0, $row['id_cat']);
    echo "\t</select></td>\n  \t\t\t</tr><tr><td class='even'>" . _AM_RMDP_FLONG . "</td>\n    \t\t<td class='odd'>";
    $GLOBALS['longdesc'] = $row['longdesc'];
    xoopsCodeTarea("longdesc", 20, 15);
    xoopsSmilies("longdesc");
    echo "  </td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FSIZE . "</td>\n    \t\t<td class='odd'><input value='{$row['size']}' name='size' type='text' id='size' size='30' maxlength='20'></td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FFAVS . "</td>\n    \t\t<td class='odd'><input name='favorito' type='radio' value='1' ";
    if ($row['favorito']) {
        echo "checked";
    }
    echo "> \n      \t\t" . _AM_RMDP_YES . "\n        \t<input name='favorito' type='radio' value='0' ";
    if ($row['favorito'] == 0) {
        echo "checked";
    }
    echo "> \n      \t\t" . _AM_RMDP_NO . "</td>\n  \t\t\t</tr>\n  \t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_FALLOWANONIM . "</td>\n    \t\t<td class='odd'><input name='anonimo' type='radio' value='1' ";
    if ($row['anonimo']) {
        echo "checked";
    }
    echo ">\n  \t\t\t" . _AM_RMDP_YES . "\n  \t\t\t<input name='anonimo' type='radio' value='0' ";
    if ($row['anonimo'] == 0) {
        echo "checked";
    }
    echo ">\n  \t\t\t" . _AM_RMDP_NO . "</td>\n  \t\t\t</tr>\n\t\t\t<tr>\n    \t\t<td class='even'>" . _AM_RMDP_RATING . "</td>\n    \t\t<td class='odd'>\n\t\t\t<select name='rating'>";
    for ($i = 0; $i <= 5; $i++) {
        if ($i == $row['calificacion']) {
            echo "<option value='{$i}' selected>{$i}</option>";
        } else {
            echo "<option value='{$i}'>{$i}</option>";
        }
    }
    echo "  </select></td></tr>\n  \t\t\t<tr><td class='even'>" . _AM_RMDP_FRESALTE . "</td>\n    \t\t<td class='odd'><input name='resaltar' type='radio' value='1' ";
    if ($row['resaltar']) {
        echo "checked";
    }
    echo "> " . _AM_RMDP_YES . "\n\t\t\t<input name='resaltar' type='radio' value='0' ";
    if ($row['resaltar'] == 0) {
        echo "checked";
    }
    echo "> " . _AM_RMDP_NO . "</td></tr>\n\t\t\t<tr><td class='even'>" . _AM_RMDP_FURLTITLE . "</td>\n    \t\t<td class='odd'><input value='{$row['urltitle']}' name='urltitle' type='text' id='url' size='30' maxlength='255'></td>\n  \t\t\t<tr><td class='even'>" . _AM_RMDP_FURL . "</td>\n    \t\t<td class='odd'><input value='{$row['url']}' name='url' type='text' id='url' size='30' maxlength='255'></td>\n \t\t\t</tr><tr><td class='even'>" . _AM_RMDP_SENDBY . "</td>\n    \t\t<td class='odd'><select name='idu'>";
    $result = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix('users') . " ORDER BY uname");
    while ($rw = $xoopsDB->fetchArray($result)) {
        echo "<option value='{$rw['uid']}' ";
        if ($rw['uid'] == $row['submitter']) {
            echo "selected";
        }
        echo ">{$rw['uname']}</option>";
    }
    echo "  </select></td>\n \t\t\t</tr>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_OSS . "</td>\n\t\t\t<td class='odd' align='left'>";
    $plats = explode("|", $row['plataformas']);
    foreach ($plats as $value) {
        echo "<input type='hidden' name='os[]' value='{$value}'>";
        echo DP_OsName($value) . "&nbsp;&nbsp;|&nbsp;&nbsp;";
    }
    echo "  </td></tr>\n\t\t\t<tr><td class='even'>&nbsp;<input type='hidden' name='id_soft' value='{$row['ids']}'></td>\n    \t\t<td class='odd'><input type='submit' name='Submit' value='" . _AM_RMDP_SAVE . "'></td>\n  \t\t\t</tr><input type='hidden' name='ids' value='{$ids}'></form></table>";
    xoops_cp_footer();
}
Beispiel #8
0
function reviews()
{
    global $xoopsDB;
    $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    if ($ids <= 0) {
        header('location: downs.php');
        die;
    }
    include 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    xoops_cp_header();
    DP_ShowNav();
    echo "<table width='100%' cellspacing='1' class='outer'>\n\t\t\t<tr><th colspan='2'>" . _AM_RMDP_REVIEWTITLE . "</th></tr>\n\t\t\t<form name='frmRev' method='post' action='downs.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_SHOTDOWN . "</td>\n\t\t\t<td class='odd' align='left'><strong>" . DP_DownloadName($ids) . "</strong></td>\n\t\t\t</tr><tr align='left'><td class='even'>" . _AM_RMDP_REVIEW . "</td>\n\t\t\t<td class='odd'>\n\t\t\t";
    list($text) = $xoopsDB->fetchRow($xoopsDB->query("SELECT text FROM " . $xoopsDB->prefix('rmdp_editorcom') . " WHERE id_soft='{$ids}'"));
    $GLOBALS['text'] = $text;
    xoopsCodeTarea("text", 20, 15);
    xoopsSmilies("text");
    echo "</td></tr>\n\t\t  <tr align='left'><td class='even'>" . _AM_RMDP_RATING . "</td>\n\t\t  <td class='odd'><select name='rate'>";
    list($rate) = $xoopsDB->fetchRow($xoopsDB->query("SELECT calificacion FROM " . $xoopsDB->prefix('rmdp_software') . " WHERE id_soft='{$ids}'"));
    for ($i = 1; $i <= 5; $i++) {
        if ($i == $rate) {
            echo "<option value='{$i}' selected>{$i}</option>";
        } else {
            echo "<option value='{$i}'>{$i}</option>";
        }
    }
    echo "</td></tr>\n\t\t  <tr align='left'><td class='even'>&nbsp;</td>\n\t\t  <td class='odd'><input type='submit' name='sbt' value='" . _AM_RMDP_MODIFY . "'>\n\t\t  <input type='hidden' name='op' value='savereview'>\n\t\t  <input type='hidden' name='ids' value='{$ids}'></td></tr></form></table>";
    xoops_cp_footer();
}
Beispiel #9
0
function modLink()
{
    global $xoopsDB, $myts, $eh, $mytree, $xoopsConfig;
    $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/mylinks/images/shots/");
    $lid = $_GET['lid'];
    xoops_cp_header();
    echo "<h4>" . _MD_WEBLINKSCONF . "</h4>";
    echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr class=\"odd\"><td>";
    $result = $xoopsDB->query("select cid, title, url, logourl from " . $xoopsDB->prefix("mylinks_links") . " where lid={$lid}") or $eh->show("0013");
    echo "<h4>" . _MD_MODLINK . "</h4><br />";
    list($cid, $title, $url, $logourl) = $xoopsDB->fetchRow($result);
    $title = $myts->makeTboxData4Edit($title);
    $url = $myts->makeTboxData4Edit($url);
    //      $url = urldecode($url);
    $logourl = $myts->makeTboxData4Edit($logourl);
    //      $logourl = urldecode($logourl);
    $result2 = $xoopsDB->query("select description from " . $xoopsDB->prefix("mylinks_text") . " where lid={$lid}");
    list($description) = $xoopsDB->fetchRow($result2);
    $GLOBALS['description'] = $myts->makeTareaData4Edit($description);
    echo "<table>";
    echo "<form method='post' action='index.php'>";
    echo "<tr><td>" . _MD_LINKID . "</td><td><b>{$lid}</b></td></tr>";
    echo "<tr><td>" . _MD_SITETITLE . "</td><td><input type='text' name='title' value=\"{$title}\" size='50' maxlength='100' /></td></tr>\n";
    echo "<tr><td>" . _MD_SITEURL . "</td><td><input type='text' name='url' value=\"{$url}\" size='50' maxlength='250' /></td></tr>\n";
    echo "<tr><td valign=\"top\">" . _MD_DESCRIPTIONC . "</td><td>";
    xoopsCodeTarea("description", 60, 8);
    xoopsSmilies("description");
    //echo "<textarea name=description cols=60 rows=5>$description</textarea>";
    echo "</td></tr>";
    echo "<tr><td>" . _MD_CATEGORYC . "</td><td>";
    $mytree->makeMySelBox("title", "title", $cid);
    echo "</td></tr>\n";
    echo "<tr><td>" . _MD_SHOTIMAGE . "</td><td>";
    //echo "<input type=text name=logourl value=\"$logourl\" size=\"50\" maxlength=\"60\"></input>
    echo "<select size='1' name='logourl'>";
    echo "<option value=' '>------</option>";
    foreach ($linkimg_array as $image) {
        if ($image == $logourl) {
            $opt_selected = "selected='selected'";
        } else {
            $opt_selected = "";
        }
        echo "<option value='" . $image . "' {$opt_selected}>" . $image . "</option>";
    }
    echo "</select>";
    echo "</td></tr>\n";
    $shotdir = "<b>" . XOOPS_URL . "/modules/mylinks/images/shots/</b>";
    echo "<tr><td></td><td>";
    printf(_MD_SHOTMUST, $shotdir);
    echo "</td></tr>\n";
    echo "</table>";
    echo "<br /><br /><input type='hidden' name='lid' value='{$lid}' />\n";
    echo "<input type='hidden' name='op' value='modLinkS' /><input type='submit' value='" . _MD_MODIFY . "' />";
    echo "</form>\n";
    echo "<table><tr><td>\n";
    echo myTextForm("index.php?op=delLink&amp;lid=" . $lid, _MD_DELETE);
    echo "</td><td>\n";
    echo myTextForm("index.php?op=linksConfigMenu", _MD_CANCEL);
    echo "</td></tr></table>\n";
    echo "<hr />";
    $result5 = $xoopsDB->query("SELECT count(*) FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid = {$lid}");
    list($totalvotes) = $xoopsDB->fetchRow($result5);
    echo "<table width='100%'>\n";
    echo "<tr><td colspan='7'><b>";
    printf(_MD_TOTALVOTES, $totalvotes);
    echo "</b><br /><br /></td></tr>\n";
    // Show Registered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, ratinguser, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid = {$lid} AND ratinguser >0 ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "<tr><td colspan='7'><br /><br /><b>";
    printf(_MD_USERTOTALVOTES, $votes);
    echo "</b><br /><br /></td></tr>\n";
    echo "<tr><td><b>" . _MD_USER . "  </b></td><td><b>" . _MD_IP . "  </b></td><td><b>" . _MD_RATING . "  </b></td><td><b>" . _MD_USERAVG . "  </b></td><td><b>" . _MD_TOTALRATE . "  </b></td><td><b>" . _MD_DATE . "  </b></td><td align=\"center\"><b>" . _MD_DELETE . "</b></td></tr>\n";
    if ($votes == 0) {
        echo "<tr><td align=\"center\" colspan=\"7\">" . _MD_NOREGVOTES . "<br /></td></tr>\n";
    }
    $x = 0;
    $colorswitch = "dddddd";
    while (list($ratingid, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        //  $ratingtimestamp = formatTimestamp($ratingtimestamp);
        //Individual user information
        $result2 = $xoopsDB->query("SELECT rating FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE ratinguser = '******'");
        $uservotes = $xoopsDB->getRowsNum($result2);
        $useravgrating = 0;
        while (list($rating2) = $xoopsDB->fetchRow($result2)) {
            $useravgrating = $useravgrating + $rating2;
        }
        $useravgrating = $useravgrating / $uservotes;
        $useravgrating = number_format($useravgrating, 1);
        $ratingusername = XoopsUser::getUnameFromId($ratinguser);
        echo "<tr><td bgcolor=\"" . $colorswitch . "\">" . $ratingusername . "</td><td bgcolor=\"{$colorswitch}\">" . $ratinghostname . "</td><td bgcolor=\"{$colorswitch}\">{$rating}</td><td bgcolor=\"{$colorswitch}\">" . $useravgrating . "</td><td bgcolor=\"{$colorswitch}\">" . $uservotes . "</td><td bgcolor=\"{$colorswitch}\">" . $ratingtimestamp . "</td><td bgcolor=\"{$colorswitch}\" align=\"center\"><b>" . myTextForm("index.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}", "X") . "</b></td></tr>\n";
        $x++;
        if ($colorswitch == "dddddd") {
            $colorswitch = "ffffff";
        } else {
            $colorswitch = "dddddd";
        }
    }
    // Show Unregistered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid = {$lid} AND ratinguser = 0 ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "<tr><td colspan='7'><b><br /><br />";
    printf(_MD_ANONTOTALVOTES, $votes);
    echo "</b><br /><br /></td></tr>\n";
    echo "<tr><td colspan='2'><b>" . _MD_IP . "  </b></td><td colspan='3'><b>" . _MD_RATING . "  </b></td><td><b>" . _MD_DATE . "  </b></b></td><td align=\"center\"><b>" . _MD_DELETE . "</b></td><br /></tr>";
    if ($votes == 0) {
        echo "<tr><td colspan=\"7\" align=\"center\">" . _MD_NOUNREGVOTES . "<br /></td></tr>";
    }
    $x = 0;
    $colorswitch = "dddddd";
    while (list($ratingid, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        $formatted_date = formatTimestamp($ratingtimestamp);
        echo "<td colspan=\"2\" bgcolor=\"{$colorswitch}\">{$ratinghostname}</td><td colspan=\"3\" bgcolor=\"{$colorswitch}\">{$rating}</td><td bgcolor=\"{$colorswitch}\">{$formatted_date}</td><td bgcolor=\"{$colorswitch}\" aling=\"center\"><b>" . myTextForm("index.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}", "X") . "</b></td></tr>";
        $x++;
        if ($colorswitch == "dddddd") {
            $colorswitch = "ffffff";
        } else {
            $colorswitch = "dddddd";
        }
    }
    echo "<tr><td colspan=\"6\">&nbsp;<br /></td></tr>\n";
    echo "</table>\n";
    echo "</td></tr></table>";
    xoops_cp_footer();
}
Beispiel #10
0
            $subject = $pm->getVar('subject', 'E');
            //TODO Fix harcoded string
            if (!preg_match('/^' . _RE . '/i', $subject)) {
                $subject = _RE . ' ' . $subject;
            }
            echo "<td class='even'><input type='text' name='subject' value='" . $subject . "' size='30' maxlength='100' /></td>";
        } else {
            echo "<td class='even'><input type='text' name='subject' size='30' maxlength='100' /></td>";
        }
        echo '</tr>';
        echo '<tr>';
        echo "<td class='head txtright' style='width:25%;'>" . _MESSAGEICON . '</td>';
        foreach ($subject_icons as $iconfile) {
            $icons_radio->addOption($iconfile, '<img src="' . XOOPS_URL . '/images/subject/' . $iconfile . '" alt="" />');
        }
        echo "<td class='even'>" . $icons_radio->render();
        echo '</td>';
        echo '</tr>';
        echo "<tr style='vertical-align:top;'><td style='width:25%;' class='head txtright'>" . _PM_MESSAGEC . '</td>';
        echo "<td class='even'>";
        xoopsCodeTarea('message', 37, 8);
        xoopsSmilies('message');
        echo '</td>';
        echo '</tr>';
        echo "<tr><td class='head'>&nbsp;</td><td class='even'>\n        <input type='hidden' name='op' value='submit' />" . $GLOBALS['xoopsSecurity']->getTokenHTML() . "\n        <input type='submit' class='formButton' name='submit' value='" . _PM_SUBMIT . "' />&nbsp;\n        <input type='reset' class='formButton' value='" . _PM_CLEAR . "' />\n        &nbsp;<input type='button' class='formButton' name='cancel' value='" . _PM_CANCELSEND . "' onclick='window.close();' />\n        </td></tr></table>\n";
        echo "</form>\n";
    }
} else {
    echo _PM_SORRY . "<br><br><a href='" . XOOPS_URL . "/register.php' title=''>" . _PM_REGISTERNOW . '</a>.';
}
xoops_footer();
Beispiel #11
0
function modDownload()
{
    global $xoopsDB, $myts, $eh, $mytree;
    $downimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/mydownloads/images/shots/");
    $lid = $_GET['lid'];
    xoops_cp_header();
    echo "<h4>" . _MD_DLCONF . "</h4>";
    echo "<table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr class=\"odd\"><td>";
    $result = $xoopsDB->query("SELECT cid, title, url, homepage, version, size, platform, logourl FROM " . $xoopsDB->prefix("mydownloads_downloads") . " WHERE lid={$lid}") or $eh->show("0013");
    echo "<h4>" . _MD_MODDL . "</h4><br />";
    list($cid, $title, $url, $homepage, $version, $size, $platform, $logourl) = $xoopsDB->fetchRow($result);
    $title = $myts->makeTboxData4Edit($title);
    $url = $myts->makeTboxData4Edit($url);
    $homepage = $myts->makeTboxData4Edit($homepage);
    $version = $myts->makeTboxData4Edit($version);
    $size = $myts->makeTboxData4Edit($size);
    $platform = $myts->makeTboxData4Edit($platform);
    $logourl = $myts->makeTboxData4Edit($logourl);
    $result2 = $xoopsDB->query("SELECT description FROM " . $xoopsDB->prefix("mydownloads_text") . " WHERE lid={$lid}");
    list($description) = $xoopsDB->fetchRow($result2);
    $GLOBALS['description'] = $myts->makeTareaData4Edit($description);
    echo "<table>";
    echo "<form method='post' action='index.php'>";
    echo "<tr><td>" . _MD_FILEID . "</td><td><b>{$lid}</b></td></tr>";
    echo "<tr><td>" . _MD_FILETITLE . "</td><td><input type='text' name='title' value='{$title}' size='50' maxlength='100' /></input></td></tr>\n";
    echo "<tr><td>" . _MD_DLURL . "</td><td><input type='text' name='url' value='{$url}' size='50' maxlength='250' /></td></tr>\n";
    echo "<tr><td>" . _MD_HOMEPAGEC . "</td><td><input type='text' name='homepage' value='{$homepage}' size='50' maxlength='100' /></td></tr>\n";
    echo "<tr><td>" . _MD_VERSIONC . "</td><td><input type='text' name='version' value='{$version}' size='10' maxlength='10' /></td></tr>\n";
    echo "<tr><td>" . _MD_FILESIZEC . "</td><td><input type='text' name='size' value='{$size}' size='10' maxlength='100' />" . _MD_BYTES . "</td></tr>\n";
    echo "<tr><td>" . _MD_PLATFORMC . "</td><td><input type='text' name='platform' value='{$platform}' size='45' maxlength='60' /></td></tr>\n";
    echo "<tr><td valign=\"top\">" . _MD_DESCRIPTIONC . "</td><td>";
    xoopsCodeTarea("description", 60, 8);
    xoopsSmilies("description");
    echo "</td></tr>";
    echo "<tr><td>" . _MD_CATEGORYC . "</td><td>";
    $mytree->makeMySelBox("title", "title", $cid);
    echo "</td></tr>\n";
    echo "<tr><td>" . _MD_SHOTIMAGE . "</td><td>";
    //echo "<input type=text name=logourl value=\"$logourl\" size=\"50\" maxlength=\"60\"></input>";
    echo "<select size='1' name='logourl'>";
    echo "<option value=' '>------</option>";
    foreach ($downimg_array as $image) {
        if ($image == $logourl) {
            $opt_selected = "selected='selected'";
        } else {
            $opt_selected = "";
        }
        echo "<option value='" . $image . "' {$opt_selected}>" . $image . "</option>";
    }
    echo "</select>";
    echo "</td></tr>\n";
    echo "<tr><td></td><td>";
    $directory = XOOPS_URL . "/modules/mydownloads/images/shots/";
    printf(_MD_MUSTBEVALID, $directory);
    echo "</td></tr>\n";
    echo "</table>";
    echo "<br /><br /><input type='hidden' name='lid' value='{$lid}' />\n";
    echo "<input type='hidden' name='op' value='modDownloadS' /><input type='submit' value='" . _MD_SUBMIT . "' />";
    echo "</form>\n";
    echo "<table><tr><td>\n";
    echo myTextForm("index.php?op=delDownload&amp;lid=" . $lid, _MD_DELETE);
    echo "</td><td>\n";
    echo myTextForm("index.php?op=downloadsConfigMenu", _MD_CANCEL);
    echo "</td></tr></table>\n";
    echo "<hr />";
    $result5 = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mydownloads_votedata") . "");
    list($totalvotes) = $xoopsDB->getRowsNum($result5);
    echo "<table width='100%'>\n";
    echo "<tr><td colspan='7'><b>";
    printf(_MD_DLRATINGS, $totalvotes);
    echo "</b><br /><br /></td></tr>\n";
    // Show Registered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, ratinguser, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mydownloads_votedata") . " WHERE lid = {$lid} AND ratinguser != 0 ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "<tr><td colspan='7'><br /><br /><b>";
    printf(_MD_REGUSERVOTES, $votes);
    echo "</b><br /><br /></td></tr>\n";
    echo "<tr><td><b>" . _MD_USER . "  </b></td><td><b>" . _MD_IP . "  </b></td><td><b>" . _MD_RATING . "  </b></td><td><b>" . _MD_USERAVG . "  </b></td><td><b>" . _MD_TOTALRATE . "  </b></td><td><b>" . _MD_DATE . "  </b></td><td align=\"center\"><b>" . _MD_DELETE . "</b></td></tr>\n";
    if ($votes == 0) {
        echo "<tr><td align=\"center\" colspan=\"7\">" . _MD_NOREGVOTES . "<br /></td></tr>\n";
    }
    $x = 0;
    $colorswitch = "dddddd";
    while (list($ratingid, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        $formatted_date = formatTimestamp($ratingtimestamp);
        //Individual user information
        $result2 = $xoopsDB->query("SELECT rating FROM " . $xoopsDB->prefix("mydownloads_votedata") . " WHERE ratinguser = {$ratinguser}");
        $uservotes = $xoopsDB->getRowsNum($result2);
        $useravgrating = 0;
        while (list($rating2) = $xoopsDB->fetchRow($result2)) {
            $useravgrating = $useravgrating + $rating2;
        }
        $useravgrating = $useravgrating / $uservotes;
        $useravgrating = number_format($useravgrating, 1);
        $ratinguname = XoopsUser::getUnameFromId($ratinguser);
        // echo "<tr><td bgcolor=\"$colorswitch\">$ratinguname</td><td bgcolor=\"$colorswitch\">$ratinghostname</td><td bgcolor=\"$colorswitch\">$rating</td><td bgcolor=\"$colorswitch\">$useravgrating</td><td bgcolor=\"$colorswitch\">$uservotes</td><td bgcolor=\"$colorswitch\">$formatted_date</td><td bgcolor=\"$colorswitch\" align=\"center\"><b><a href=index.php?op=delVote&amp;lid=$lid&amp;rid=$ratingid>X</a></b></td></tr>\n";
        // echo "<tr><td bgcolor=\"$colorswitch\">$ratinguname</td><td bgcolor=\"$colorswitch\">$ratinghostname</td><td bgcolor=\"$colorswitch\">$rating</td><td bgcolor=\"$colorswitch\">$useravgrating</td><td bgcolor=\"$colorswitch\">$uservotes</td><td bgcolor=\"$colorswitch\">$formatted_date</td><td bgcolor=\"$colorswitch\" align=\"center\">";
        echo "<tr><td bgcolor=\"{$colorswitch}\">{$ratinguname}</td><td bgcolor=\"{$colorswitch}\">{$ratinghostname}</td><td bgcolor=\"{$colorswitch}\">{$rating}</td><td bgcolor=\"{$colorswitch}\">{$useravgrating}</td><td bgcolor=\"{$colorswitch}\">{$uservotes}</td><td bgcolor=\"{$colorswitch}\">{$formatted_date}</td><td bgcolor=\"{$colorswitch}\" align=\"center\">";
        //echo "<table><tr><td>\n";
        echo myTextForm("index.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}", "X");
        // echo "</td></tr></table>\n";
        echo "</td></tr>\n";
        $x++;
        if ($colorswitch == "dddddd") {
            $colorswitch = "ffffff";
        } else {
            $colorswitch = "dddddd";
        }
    }
    // Show Unregistered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mydownloads_votedata") . " WHERE lid = {$lid} AND ratinguser = 0 ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "<tr><td colspan='7'><b><br /><br />";
    printf(_MD_ANONUSERVOTES, $votes);
    echo "</b><br /><br /></td></tr>\n";
    echo "<tr><td colspan='2'><b>" . _MD_IP . "  </b></td><td colspan='3'><b>" . _MD_RATING . "  </b></td><td><b>" . _MD_DATE . "  </b></b></td><td align=\"center\"><b>" . _MD_DELETE . "</b></td><br /></tr>";
    if ($votes == 0) {
        echo "<tr><td colspan=\"7\" align=\"center\">" . _MD_NOUNREGVOTES . "<br /></td></tr>";
    }
    $x = 0;
    $colorswitch = "dddddd";
    while (list($ratingid, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        $formatted_date = formatTimestamp($ratingtimestamp);
        // echo "<td colspan=\"2\" bgcolor=\"$colorswitch\">$ratinghostname</td><td colspan=\"3\" bgcolor=\"$colorswitch\">$rating</td><td bgcolor=\"$colorswitch\">$formatted_date</td><td bgcolor=\"$colorswitch\" aling=\"center\"><b><a href=index.php?op=delVote&amp;lid=$lid&amp;rid=$ratingid>X</a></b></td></tr>";
        echo "<td colspan=\"2\" bgcolor=\"{$colorswitch}\">{$ratinghostname}</td><td colspan=\"3\" bgcolor=\"{$colorswitch}\">{$rating}</td><td bgcolor=\"{$colorswitch}\">{$formatted_date}</td><td bgcolor=\"{$colorswitch}\" align=\"center\">";
        //echo "<table><tr><td>\n";
        //align=\"center\"
        echo myTextForm("index.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}", "X");
        //echo "</td></tr></table>\n";
        echo "</td></tr>";
        $x++;
        if ($colorswitch == "dddddd") {
            $colorswitch = "ffffff";
        } else {
            $colorswitch = "dddddd";
        }
    }
    echo "<tr><td colspan=\"6\">&nbsp;<br /></td></tr>\n";
    echo "</table>\n";
    echo "</td></tr></table>";
    xoops_cp_footer();
}
Beispiel #12
0
$xoopsTpl->assign('user1', $xoopsModuleConfig['user_field1_name']);
$xoopsTpl->assign('user2', $xoopsModuleConfig['user_field2_name']);
$xoopsTpl->assign('user3', $xoopsModuleConfig['user_field3_name']);
$xoopsTpl->assign('user4', $xoopsModuleConfig['user_field4_name']);
while ($CURRENT_PIC = $xoopsDB->fetchArray($result)) {
    if (USER_IS_ADMIN) {
        get_user_albums($CURRENT_PIC['owner_id']);
        //   $admin_mode=1;
    }
    //else $admin_mode=0;
    //$form.=create_form($data);
    form_alb_list_box();
    form_pic_info();
    ob_start();
    $GLOBALS["caption{$CURRENT_PIC['pid']}"] = $myts->makeTareaData4Edit($CURRENT_PIC['caption']);
    xoopsCodeTarea("caption{$CURRENT_PIC['pid']}", 37, 8);
    $xoops_codes = ob_get_contents();
    ob_end_clean();
    ob_start();
    xoopsSmilies("caption" . $CURRENT_PIC['pid']);
    $smilies = ob_get_contents();
    ob_end_clean();
    $value_field1 = $myts->makeTboxData4Edit($CURRENT_PIC['user1']);
    $name_field1 = 'user1' . $CURRENT_PIC['pid'];
    $value_field2 = $myts->makeTboxData4Edit($CURRENT_PIC['user2']);
    $name_field2 = 'user2' . $CURRENT_PIC['pid'];
    $value_field3 = $myts->makeTboxData4Edit($CURRENT_PIC['user3']);
    $name_field3 = 'user3' . $CURRENT_PIC['pid'];
    $value_field4 = $myts->makeTboxData4Edit($CURRENT_PIC['user4']);
    $name_field4 = 'user4' . $CURRENT_PIC['pid'];
    form_options();
Beispiel #13
0
function Modify()
{
    global $xoopsDB;
    $idc = $_GET['idc'];
    if ($idc <= 0) {
        header('location: categos.php');
        die;
    }
    xoops_cp_header();
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    include_once XOOPS_ROOT_PATH . "/class/xoopslists.php";
    include_once 'functions.php';
    ShowNav();
    $result = $xoopsDB->query("SELECT * FROM {$tcategos} WHERE id_cat='{$idc}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('categos.php', 1, _AM_NOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    echo "<table width='100%' class='outer' cellspacing='1'>\n\n\t\t\t<tr><th colspan='2'>" . _AM_MODIFYFORM . "</th></tr>\n\n\t\t\t<form name='frm' method='post' action='categos.php'>\n\n\t\t\t<tr><td class='even' align='left'>" . _AM_FORMNAME . "</td>\n\n\t\t\t<td align='left' class='odd'><input value='{$row['nombre']}' type='text' name='nombre' size='30'></td></tr>\n\n\t\t\t<tr><td class='even' align='left'>" . _AM_FORMIMG . "</td>\n\n\t\t\t<td align='left' class='odd'>\n\n\t\t\t<select name='img'><option value=''>--</option>\n";
    $imgArray = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/rmservices/images/categos/");
    foreach ($imgArray as $image) {
        if ($row['img'] == $image) {
            echo "<option value='" . $image . "' selected>" . $image . "</option>";
        } else {
            echo "<option value='" . $image . "'>" . $image . "</option>";
        }
    }
    echo "  </select><br>\n\t\t\t<span style='font-size: 9px;'>" . _AM_INFOIMG . "</span></td></tr>\n\n\t\t\t<tr><td class='even' align='left'>" . _AM_DESC . "</td>\n\n\t\t\t<td align='left' class='odd'>";
    $GLOBALS['desc'] = $row['desc'];
    xoopsCodeTarea("desc", 20, 15);
    xoopsSmilies("desc");
    echo "  </td></tr>\n\n\t        <tr><td align='left' class='even'>&nbsp;</td>\n\n\t\t\t<td class='odd' align='left'><input type='submit' name='sbt' value='" . _AM_SEND . "'></td>\n\t\t\t<input type='hidden' name='op' value='savemod'>\n\n\t\t\t<input type='hidden' name='idc' value='{$idc}'>\n\n\t\t\t</tr></form></table>";
    xoops_cp_footer();
}
Beispiel #14
0
$xoopsTpl->assign('sender_name', $sender_name);
$xoopsTpl->assign('lang_your_email', _MD_CARD_YOUR_EMAIL);
$xoopsTpl->assign('sender_email', $sender_email);
$xoopsTpl->assign('sender_email_warning', $sender_email_warning);
$xoopsTpl->assign('lang_ecard_to', _MD_CARD_TO);
$xoopsTpl->assign('lang_rcpt_name', _MD_CARD_RCPT_NAME);
$xoopsTpl->assign('recipient_name', $recipient_name);
$xoopsTpl->assign('lang_rcpt_email', _MD_CARD_RCPT_EMAIL);
$xoopsTpl->assign('recipient_email', $recipient_email);
$xoopsTpl->assign('recipient_email_warning', $recipient_email_warning);
$xoopsTpl->assign('lang_ecard_greetings', _MD_CARD_GREETINGS);
$xoopsTpl->assign('greetings', $greetings);
$xoopsTpl->assign('lang_ecard_message', _MD_CARD_MESSAGE);
include_once XOOPS_ROOT_PATH . "/include/xoopscodes.php";
$myts =& MyTextSanitizer::getInstance();
// MyTextSanitizer object
ob_start();
$GLOBALS["message"] = $myts->makeTareaData4Edit($message);
xoopsCodeTarea("message", 60, 8);
$xoopsTpl->assign('xoops_codes', ob_get_contents());
ob_end_clean();
ob_start();
xoopsSmilies("message");
$xoopsTpl->assign('xoops_smilies', ob_get_contents());
ob_end_clean();
user_save_profile();
$xoopsTpl->assign('gallery', $xoopsModule->getVar('name'));
include_once "include/theme_func.php";
main_menu();
do_footer();
include_once "../../footer.php";
Beispiel #15
0
    $other_user_albums_list = array();
}
if (!count($public_albums_list) && !count($user_albums_list) && !USER_CAN_CREATE_ALBUMS) {
    redirect_header('index.php', 2, _MD_UPL_ERR_NO_ALB_UPLOAD);
} elseif (!count($public_albums_list) && !count($user_albums_list) && USER_CAN_CREATE_ALBUMS) {
    $USER['am'] = 1;
    $redirect = "albmgr.php";
    redirect_header($redirect, 2, _MD_UPL_ERR_NO_ALB_UPLOAD);
    exit;
}
$xoopsOption['template_main'] = 'xcgal_uploadmore.html';
include XOOPS_ROOT_PATH . "/header.php";
$xoopsTpl->assign('xoops_module_header', $xcgal_module_header);
ob_start();
$GLOBALS["caption"] = $myts->makeTareaData4Edit("");
xoopsCodeTarea("caption", 37, 8);
$xoopsTpl->assign('xoops_codes', ob_get_contents());
ob_end_clean();
ob_start();
xoopsSmilies("caption");
$xoopsTpl->assign('xoops_smilies', ob_get_contents());
ob_end_clean();
$xoopsTpl->assign('max_upl', sprintf(_MD_UPL_MAX_FSIZE, $xoopsModuleConfig['max_upl_size']));
$xoopsTpl->assign('lang_upload', _MD_UPL_TITLE);
$xoopsTpl->assign('lang_album', _MD_ALBUM);
$xoopsTpl->assign('lang_picture', _MD_UPL_PICTURE);
$xoopsTpl->assign('lang_picture_title', _MD_UPL_PIC_TITLE);
$xoopsTpl->assign('lang_keywords', _MD_UPL_KEYWORDS);
$xoopsTpl->assign('max_file_size', $xoopsModuleConfig['max_upl_size'] << 10);
$xoopsTpl->assign('lang_options', "_MD_OPTIONS");
$xoopsTpl->assign('lang_notify', "_MD_NOTIFYAPPROVE");
Beispiel #16
0
function ModForm()
{
    global $xoopsDB;
    $idp = $_GET['idp'];
    if ($idp <= 0) {
        header("location: promos.php");
        die;
    }
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmsrv_promos') . " WHERE id_promo='{$idp}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('promos.php', 1, _AM_NOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    include_once 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    xoops_cp_header();
    ShowNav();
    echo "<table width='100%'  border='0' cellpadding='0' cellspacing='1' class='outer'>\n  \t<tr align='left'>\n  \t<th colspan='2'>" . _AM_NEWPROMO . "</th>\n  \t</tr>\n  \t<form name='frmNew' method='post' action='promos.php'>\n  \t<tr>\n    <td class='even'>" . _AM_FORMNAME . "</td>\n    <td class='odd'><input value='{$row['nombre']}' name='nombre' type='text' id='nombre' size='30' maxlength='200'></td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_FORMCODE . "</td>\n    <td class='odd'><input value='{$row['codigo']}' name='codigo' type='text' id='codigo' size='30' maxlength='20'></td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_FORMPRICE . "</td>\n    <td class='odd'><input value='{$row['precio']}' name='precio' type='text' id='precio' size='30'></td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_FORMIMG . "</td>\n    <td class='odd'><input value='{$row['img']}' name='img' type='text' id='img' size='30' maxlength='255'></td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_SHORTDESC . "</td>\n    <td class='odd'><input value='{$row['shortdesc']}' name='shortdesc' type='text' id='shortdesc' size='30' maxlength='255'></td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_LONGDESC . "</td>\n    <td class='odd'>";
    $GLOBALS['longdesc'] = $row['longdesc'];
    xoopsCodeTarea("longdesc", 20, 15);
    xoopsSmilies("longdesc");
    echo "</td>\n  \t</tr>\n  \t<tr>\n    <td class='even'>" . _AM_SHOWINBLOCK . "</td>\n    <td class='odd'>";
    if ($row['inblock']) {
        echo "<input name='inblock' type='radio' value='1' checked> " . _AM_YES . "&nbsp;\n\t\t\t  <input name='inblock' type='radio' value='0'> " . _AM_NO . "</td>";
    } else {
        echo "<input name='inblock' type='radio' value='1'> " . _AM_YES . "&nbsp;\n\t\t\t  <input name='inblock' type='radio' value='0' checked> " . _AM_NO . "</td>";
    }
    echo "</tr><tr><td class='even'>" . _AM_FORMACTIVE . "</td>\n    <td class='odd'>";
    if ($row['activa']) {
        echo "<input name='activa' type='radio' value='1' checked> " . _AM_YES . "&nbsp;\n\t\t\t  <input name='activa' type='radio' value='0'> " . _AM_NO . "</td>";
    } else {
        echo "<input name='activa' type='radio' value='1'> " . _AM_YES . "&nbsp;\n\t\t\t  <input name='activa' type='radio' value='0' checked> " . _AM_NO . "</td>";
    }
    echo "</tr><tr><td class='even'>&nbsp;</td>\n    <td class='odd'><input name='sbt' type='submit' id='sbt' value='   " . _AM_SEND . "   '></td>\n  \t</tr>\n\t<input type='hidden' name='op' value='savemod'>\n\t<input type='hidden' name='idp' value='{$idp}'>\n\n\t</form></table>";
    xoops_cp_footer();
}
Beispiel #17
0
 function get_schedule_edit_html()
 {
     // $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
     $editable = $this->editable;
     $deletable = $this->deletable;
     $smode = empty($_GET['smode']) ? 'Monthly' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['smode']);
     // 変更の場合、登録済スケジュール情報取得
     if (!empty($_GET['event_id'])) {
         if (!$this->editable) {
             die("Not allowed");
         }
         $event_id = intval($_GET['event_id']);
         $yrs = mysql_query("SELECT * FROM {$this->table} WHERE id='{$event_id}'", $this->conn);
         if (mysql_num_rows($yrs) < 1) {
             die(_PICAL_ERR_INVALID_EVENT_ID);
         }
         $event = mysql_fetch_object($yrs);
         // もともと編集・削除可能の設定でも、閲覧中のuidとレコードのuidが
         // 一致せず、かつ、Adminモードでない時は、編集・削除不可とする
         if ($event->uid != $this->user_id && !$this->isadmin) {
             $editable = false;
             $deletable = false;
         }
         $description = $this->textarea_sanitizer_for_edit($event->description);
         $summary = $this->text_sanitizer_for_edit($event->summary);
         $location = $this->text_sanitizer_for_edit($event->location);
         $contact = $this->text_sanitizer_for_edit($event->contact);
         $categories = $event->categories;
         if ($event->class == 'PRIVATE') {
             $class_private = "checked='checked'";
             $class_public = '';
             $select_private_disabled = '';
         } else {
             $class_private = '';
             $class_public = "checked='checked'";
             $select_private_disabled = "disabled='disabled'";
         }
         $groupid = $event->groupid;
         $rrule = $event->rrule;
         $admission_status = $event->admission ? _PICAL_MB_EVENT_ADMITTED : _PICAL_MB_EVENT_NEEDADMIT;
         $update_button = $editable ? "<input name='update' type='submit' value='" . _PICAL_BTN_SUBMITCHANGES . "' />" : "";
         $insert_button = "<input name='saveas' type='submit' value='" . _PICAL_BTN_SAVEAS . "' onclick='return confirm(\"" . _PICAL_CNFM_SAVEAS_YN . "\")' />";
         $delete_button = $deletable ? "<input name='delete' type='submit' value='" . _PICAL_BTN_DELETE . "' onclick='return confirm(\"" . _PICAL_CNFM_DELETE_YN . "\")' />" : "";
         $tz_options = $this->get_tz_options($event->event_tz);
         $poster_tz = $event->poster_tz;
         // 日付・時間表示の処理
         if ($event->allday) {
             // 全日イベント(時差計算なし)
             $select_timezone_disabled = "disabled='disabled'";
             $allday_checkbox = "checked='checked'";
             $allday_select = "disabled='disabled'";
             $allday_bit1 = $event->allday & 2 ? "checked='checked'" : "";
             $allday_bit2 = $event->allday & 4 ? "checked='checked'" : "";
             $allday_bit3 = $event->allday & 8 ? "checked='checked'" : "";
             $allday_bit4 = $event->allday & 16 ? "checked='checked'" : "";
             if (isset($event->start_date)) {
                 $start_ymd = $start_long_ymdn = $event->start_date;
             } else {
                 $start_ymd = date("Y-m-d", $event->start);
                 $start_long_ymdn = $this->get_long_ymdn($event->start);
             }
             $start_hour = 0;
             $start_min = 0;
             if (isset($event->end_date)) {
                 $end_ymd = $end_long_ymdn = $event->end_date;
             } else {
                 $end_ymd = date("Y-m-d", $event->end - 300);
                 $end_long_ymdn = $this->get_long_ymdn($event->end - 300);
             }
             $end_hour = 23;
             $end_min = 55;
         } else {
             // �ʏ�C�x���g�ievent_tz �ł̎��ԕ\���j
             $select_timezone_disabled = "";
             $tzoffset_s2e = intval(($event->event_tz - $this->server_TZ) * 3600);
             $event->start += $tzoffset_s2e;
             $event->end += $tzoffset_s2e;
             $allday_checkbox = "";
             $allday_select = "";
             $allday_bit1 = $allday_bit2 = $allday_bit3 = $allday_bit4 = "";
             $start_ymd = date("Y-m-d", $event->start);
             $start_long_ymdn = $this->get_long_ymdn($event->start);
             $start_hour = date("H", $event->start);
             $start_min = date("i", $event->start);
             $end_ymd = date("Y-m-d", $event->end);
             $end_long_ymdn = $this->get_long_ymdn($event->end);
             $end_hour = date("H", $event->end);
             $end_min = date("i", $event->end);
         }
         // 新規登録の場合
     } else {
         if (!$this->insertable) {
             die("Not allowed");
         }
         $event_id = 0;
         $editable = true;
         $summary = '';
         $select_timezone_disabled = "";
         $location = '';
         $contact = '';
         $class_private = '';
         $class_public = "checked='checked'";
         $select_private_disabled = "disabled='disabled'";
         $groupid = 0;
         $rrule = '';
         $description = '';
         $categories = $this->now_cid > 0 ? sprintf("%05d,", $this->now_cid) : '';
         $start_ymd = $end_ymd = $this->caldate;
         $start_long_ymdn = $end_long_ymdn = $this->get_long_ymdn($this->unixtime);
         $start_hour = 9;
         $start_min = 0;
         $end_hour = 17;
         $end_min = 0;
         $admission_status = _PICAL_MB_EVENT_NOTREGISTER;
         $update_button = '';
         $insert_button = "<input name='insert' type='submit' value='" . _PICAL_BTN_NEWINSERTED . "' />";
         $delete_button = '';
         $allday_checkbox = $allday_select = "";
         $allday_bit1 = $allday_bit2 = $allday_bit3 = $allday_bit4 = "";
         $tz_options = $this->get_tz_options($this->user_TZ);
         $poster_tz = $this->user_TZ;
     }
     // Start Date
     $textbox_start_date = $this->get_formtextdateselect('StartDate', $start_ymd, $start_long_ymdn);
     // Start Hour
     $select_start_hour = "<select name='StartHour' {$allday_select}>\n";
     $select_start_hour .= $this->get_options_for_hour($start_hour);
     $select_start_hour .= "</select>";
     // Start Minutes
     $select_start_min = "<select name='StartMin' {$allday_select}>\n";
     for ($m = 0; $m < 60; $m += 5) {
         if ($m == $start_min) {
             $select_start_min .= "<option value='{$m}' selected='selected'>" . sprintf("%02d", $m) . "</option>\n";
         } else {
             $select_start_min .= "<option value='{$m}'>" . sprintf("%02d", $m) . "</option>\n";
         }
     }
     $select_start_min .= "</select>";
     // End Date
     $textbox_end_date = $this->get_formtextdateselect('EndDate', $end_ymd, $end_long_ymdn);
     // End Hour
     $select_end_hour = "<select name='EndHour' {$allday_select}>\n";
     $select_end_hour .= $this->get_options_for_hour($end_hour);
     $select_end_hour .= "</select>";
     // End Minutes
     $select_end_min = "<select name='EndMin' {$allday_select}>\n";
     for ($m = 0; $m < 60; $m += 5) {
         if ($m == $end_min) {
             $select_end_min .= "<option value='{$m}' selected='selected'>" . sprintf("%02d", $m) . "</option>\n";
         } else {
             $select_end_min .= "<option value='{$m}'>" . sprintf("%02d", $m) . "</option>\n";
         }
     }
     $select_end_min .= "</select>";
     // Checkbox for selecting Categories
     $category_checkboxes = '';
     foreach ($this->categories as $cid => $cat) {
         $cid4sql = sprintf("%05d,", $cid);
         $cat_title4show = $this->text_sanitizer_for_show($cat->cat_title);
         if ($cat->cat_depth < 2) {
             $category_checkboxes .= "<div style='float:left; margin:2px;'>\n";
         }
         $category_checkboxes .= str_repeat('-', $cat->cat_depth - 1) . "<input type='checkbox' name='cids[]' value='{$cid}' " . (strstr($categories, $cid4sql) ? "checked='checked'" : "") . " />{$cat_title4show}<br />\n";
     }
     $category_checkboxes = substr(str_replace('<div', '</div><div', $category_checkboxes), 6) . "</div>\n";
     // target for "class = PRIVATE"
     $select_private = "<select name='groupid' {$select_private_disabled}>\n<option value='0'>" . _PICAL_OPT_PRIVATEMYSELF . "</option>\n";
     foreach ($this->groups as $sys_gid => $gname) {
         $option_desc = sprintf(_PICAL_OPT_PRIVATEGROUP, $gname);
         if ($sys_gid == $groupid) {
             $select_private .= "<option value='{$sys_gid}' selected='selected'>{$option_desc}</option>\n";
         } else {
             $select_private .= "<option value='{$sys_gid}'>{$option_desc}</option>\n";
         }
     }
     $select_private .= "</select>";
     // XOOPS用かどうかでの処理分け
     if (defined('XOOPS_ROOT_PATH')) {
         // DHTMLテキストエリアの処理
         include_once XOOPS_ROOT_PATH . "/include/xoopscodes.php";
         ob_start();
         $GLOBALS["description_text"] = $description;
         xoopsCodeTarea("description_text", 50, 6);
         $description_textarea = ob_get_contents();
         ob_end_clean();
     } else {
         // XOOPS以外では、単なるプレーンtextare
         $description_textarea = "<textarea name='description' cols='50' rows='6' wrap='soft'>{$description}</textarea>";
     }
     // FORM DISPLAY
     $ret = "\n<h2>" . _PICAL_MB_TITLE_EVENTINFO . " <small>-" . _PICAL_MB_SUBTITLE_EVENTEDIT . "-</small></h2>\n<form action='index.php' method='post' name='MainForm'>\n\t" . $GLOBALS['xoopsGTicket']->getTicketHtml(__LINE__) . "\n\t<input type='hidden' name='caldate' value='{$this->caldate}' />\n\t<input type='hidden' name='event_id' value='{$event_id}' />\n\t<input type='hidden' name='last_smode' value='{$smode}' />\n\t<input type='hidden' name='last_caldate' value='{$this->caldate}' />\n\t<input type='hidden' name='poster_tz' value='{$poster_tz}' />\n\t<table border='0' cellpadding='0' cellspacing='2'>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_SUMMARY . "</td>\n\t\t<td class='even'><input type='text' name='summary' size='60' maxlength='250' value='{$summary}' /></td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_TIMEZONE . "</td>\n\t\t<td class='even'><select name='event_tz' {$select_timezone_disabled}>{$tz_options}</select></td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_STARTDATETIME . "</td>\n\t\t<td class='even'>\n\t\t\t{$textbox_start_date} &nbsp;\n\t\t\t{$select_start_hour} {$select_start_min}" . _PICAL_MB_MINUTE_SUF . "\n</select>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_ENDDATETIME . "</td>\n\t\t<td class='even'>\n\t\t\t{$textbox_end_date} &nbsp;\n\t\t\t{$select_end_hour} {$select_end_min}" . _PICAL_MB_MINUTE_SUF . "\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_ALLDAYOPTIONS . "</td>\n\t\t<td class='even'>\n\t\t\t<fieldset>\n\t\t\t\t<legend class='blockTitle'><input type='checkbox' name='allday' value='1' {$allday_checkbox} onClick='document.MainForm.event_tz.disabled=document.MainForm.StartHour.disabled=document.MainForm.StartMin.disabled=document.MainForm.EndHour.disabled=document.MainForm.EndMin.disabled=this.checked' />" . _PICAL_MB_ALLDAY_EVENT . "</legend>\n\t\t\t\t<input type='checkbox' name='allday_bits[]' value='1' {$allday_bit1} />" . _PICAL_MB_LONG_EVENT . " &nbsp;  <input type='checkbox' name='allday_bits[]' value='2' {$allday_bit2} />" . _PICAL_MB_LONG_SPECIALDAY . " &nbsp;  <!-- <input type='checkbox' name='allday_bits[]' value='3' {$allday_bit3} />rsv3 &nbsp;  <input type='checkbox' name='allday_bits[]' value='4' {$allday_bit4} />rsv4 -->\n\t\t\t</fieldset>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_LOCATION . "</td>\n\t\t<td class='even'><input type='text' name='location' size='40' maxlength='250' value='{$location}' /></td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_CONTACT . "</td>\n\t\t<td class='even'><input type='text' name='contact' size='50' maxlength='250' value='{$contact}' /></td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_DESCRIPTION . "</td>\n\t\t<td class='even'>{$description_textarea}</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_CATEGORIES . "</td>\n\t\t<td class='even'>{$category_checkboxes}</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_CLASS . "</td>\n\t\t<td class='even'><input type='radio' name='class' value='PUBLIC' {$class_public} onClick='document.MainForm.groupid.disabled=true' />" . _PICAL_MB_PUBLIC . " &nbsp;  &nbsp; <input type='radio' name='class' value='PRIVATE' {$class_private} onClick='document.MainForm.groupid.disabled=false' />" . _PICAL_MB_PRIVATE . sprintf(_PICAL_MB_PRIVATETARGET, $select_private) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_RRULE . "</td>\n\t\t<td class='even'>" . $this->rrule_to_form($rrule, $end_ymd) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class='head'>" . _PICAL_TH_ADMISSIONSTATUS . "</td>\n\t\t<td class='even'>{$admission_status}</td>\n\t</tr>\n";
     if ($editable) {
         $ret .= "\n\t<tr>\n\t\t<td style='text-align:center' colspan='2'>\n\t\t\t<input name='reset' type='reset' value='" . _PICAL_BTN_RESET . "' />\n\t\t\t{$update_button}\n\t\t\t{$insert_button}\n\t\t\t{$delete_button}\n\t\t</td>\n\t</tr>\n";
     }
     $ret .= "\n\t<tr>\n\t\t<td><img src='{$this->images_url}/spacer.gif' alt='' width='150' height='4' /></td>\t\t<td width='100%'></td>\n\t</tr>\n\t<tr>\n\t\t<td width='100%' align='right' colspan='2'>" . PICAL_COPYRIGHT . "</td>\n\t</tr>\n\t</table>\n</form>\n\n";
     return $ret;
 }
Beispiel #18
0
function ModifyCar()
{
    global $xoopsDB;
    $idc = $_POST['idc'];
    $ids = $_POST['ids'];
    if ($idc <= 0) {
        header('location: services.php');
        die;
    }
    include 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    include_once XOOPS_ROOT_PATH . "/class/xoopslists.php";
    $result = $xoopsDB->query("SELECT * FROM {$tcar} WHERE id_car='{$idc}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('services.php', 1, _AM_CARNOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    xoops_cp_header();
    ShowNav();
    echo "<table width='80%' align='center' class='outer' cellspacing='1'>\n\n\t\t  <tr><th align='left' colspan='2'>" . _AM_MODCAR . "</th></tr>\n\n\t\t  <form name='frmNew' action='services.php' method='post'>\n\n\t\t  <tr><td align='left' class='even'>" . _AM_FORMNAME . "</td>\n\n\t\t  <td class='odd' align='left'><input value='{$row['nombre']}' type='text' size='30' name='nombre'>\n</td></tr>\n\t\t  <tr><td align='left' class='even'>" . _AM_SHORTDESC . "</td>\n\n\t\t  <td class='odd' align='left'><input value='{$row['shortdesc']}' type='text' size='50' name='shortdesc' maxlenght='255'>\n</td></tr>\n\t\t  <tr><td class='even' align='left'>" . _AM_LONGDESC . "</td>\n\n\t\t  <td class='odd' align='left'>";
    $GLOBALS['longdesc'] = $row['longdesc'];
    xoopsCodeTarea("longdesc", 20, 15);
    xoopsSmilies("longdesc");
    echo "</td></tr>\n\n\t\t  <tr><td class='even' align='left'>" . _AM_FORMIMG . "</td>\n\n\t\t  <td class='odd' align='left'><select name='img'><option value=''>--</option>\n";
    $imgArray = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/rmservices/images/caracts/");
    foreach ($imgArray as $image) {
        if ($row['img'] == $image) {
            echo "<option value='" . $image . "' selected>" . $image . "</option>";
        } else {
            echo "<option value='" . $image . "'>" . $image . "</option>";
        }
    }
    echo "  </select></td></tr>\n\n\t\t  <tr><td class='even'>&nbsp;</td>\n\n\t\t  <td class='odd' align='left'><input type='submit' name='sbt' value='" . _AM_SEND . "'></td></tr>\n\n\t\t  <input type='hidden' name='op' value='savemodcar'>\n\n\t\t  <input type='hidden' name='ids' value='{$ids}'>\n\n\t\t  <input type='hidden' name='idc' value='{$idc}'>\n\n\t\t  </form></table>";
    xoops_cp_footer();
}
Beispiel #19
0
    $sel = "";
}
echo "<option value='R'>" . _AM_RIGHT . "</option>\n";
echo "<option value='L'" . $sel . ">" . _AM_LEFT . "</option>\n";
echo "</select>\n";
echo "<br />";
if (isset($ihome)) {
    puthome($ihome);
} else {
    puthome();
}
echo "</p><p><b>" . _AM_INTROTEXT . "</b><br /><br />\n";
xoopsCodeTarea("hometext", 60, 15);
xoopsSmilies("hometext");
echo "<br /></p><p><b>" . _AM_EXTEXT . "</b><br /><br />\n";
xoopsCodeTarea("bodytext", 60, 15, 2);
xoopsSmilies("bodytext");
echo "</p>" . _MULTIPAGE;
if (!empty($xoopsConfig['allow_html'])) {
    echo "<p>" . _AM_ALLOWEDHTML . "<br />";
    //echo get_allowed_html();
    echo "</p>";
}
echo "<p><input type='checkbox' name='nosmiley' value='1'";
if (isset($nosmiley) && $nosmiley == 1) {
    echo " checked='checked'";
}
echo " /> " . _AM_DISAMILEY . "<br />";
echo "<input type='checkbox' name='nohtml' value='1'";
if (isset($nohtml) && $nohtml == 1) {
    echo " checked='checked'";
Beispiel #20
0
} else {
    $xoopsOption['template_main'] = 'rmlib_editcontent.html';
    //Plantilla para esta página
    include XOOPS_ROOT_PATH . "/header.php";
    include_once XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    $myts =& MyTextSanitizer::getInstance();
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("rmlib_contenido") . " WHERE `index`='{$index}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num > 0) {
        list($coid, $index, $texto, $fecha, $com, $author) = $xoopsDB->fetchRow($result);
    }
    list($nindice, $tid, $lecturas) = $xoopsDB->fetchRow($xoopsDB->query("SELECT titulo, tema, lecturas FROM " . $xoopsDB->prefix("rmlib_indice") . " WHERE iid = '{$index}'"));
    list($ntema, $cid) = $xoopsDB->fetchRow($xoopsDB->query("SELECT titulo, catego FROM " . $xoopsDB->prefix("rmlib_temas") . " WHERE tid = '{$tid}'"));
    $GLOBALS['contenido'] = $texto;
    ob_start();
    xoopsCodeTarea("contenido", 37, 8);
    $xoopsTpl->assign('xoops_codes', ob_get_contents());
    ob_end_clean();
    ob_start();
    xoopsSmilies("contenido");
    $xoopsTpl->assign('xoops_smilies', ob_get_contents());
    ob_end_clean();
    // Comprobamos si el usuario es un autor de este libro
    $num = $xoopsDB->getRowsNum($xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("rmlib_users") . " WHERE iduser='******'uid') . "' AND idbook='{$tid}'"));
    if ($num <= 0 && !$xoopsUser->isAdmin()) {
        header("location: content.php?index={$index}");
        die;
    }
    $xoopsTpl->assign('lang_edit', _RH_RMLIB_EDITCONTENT);
    $xoopsTpl->assign('lang_book', _RH_BOOKS_BOOK);
    $xoopsTpl->assign('lang_title', _RH_RMLIB_INDEXTITLE);
Beispiel #21
0
function modLink()
{
    global $xoopsDB, $myts, $eh, $myCatTree, $xoopsModule;
    $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/images/shots/");
    $lid = mylinksUtility::mylinks_cleanVars($_GET, 'lid', 0, 'int', array('min' => 0));
    //xoops_cp_header();
    $result = $xoopsDB->query("SELECT cid, title, url, logourl FROM " . $xoopsDB->prefix("mylinks_links") . " WHERE lid={$lid}") or $eh->show('0013');
    list($cid, $title, $url, $logourl) = $xoopsDB->fetchRow($result);
    if (!$title) {
        // all links have title so if there's no title this wasn't a vaild $lid
        redirect_header('index.php', 3, _MD_MYLINKS_NORECORDFOUND);
        exit;
    }
    $title = $myts->htmlSpecialChars($title);
    $url = $myts->htmlSpecialChars($url);
    //$url                    = urldecode($url);
    $logourl = $myts->htmlSpecialChars($logourl);
    //$logourl                = urldecode($logourl);
    $result2 = $xoopsDB->query("SELECT description FROM " . $xoopsDB->prefix("mylinks_text") . " WHERE lid={$lid}");
    list($description) = $xoopsDB->fetchRow($result2);
    $GLOBALS['description'] = $myts->htmlSpecialChars($description);
    echo "<h4>" . _MD_MYLINKS_WEBLINKSCONF . "</h4>" . "<table class='outer' style='width: 100%; border-width: 0px; margin: 1px;'>" . "  <tr><th colspan='2'>" . _MD_MYLINKS_MODLINK . "</th></tr>\n" . "  <tr class='odd'>\n" . "    <td>\n" . "      <form method='post' action='main.php' style='display: inline;'>\n" . "        <table>\n" . "          <tr><td>" . _MD_MYLINKS_LINKID . "</td><td style='font-weight: bold;'>{$lid}</td></tr>\n" . "          <tr><td>" . _MD_MYLINKS_SITETITLE . "</td><td><input type='text' name='title' value='{$title}' size='50' maxlength='100' /></td></tr>\n" . "\t\t\t<tr><td>" . _MD_MYLINKS_SITEURL . "</td><td><input type='text' name='url' value='{$url}' size='50' maxlength='250' /></td></tr>\n" . "          <tr><td style='vertical-align: top;'>" . _MD_MYLINKS_DESCRIPTIONC . "</td><td>";
    xoopsCodeTarea("description", 60, 8);
    xoopsSmilies("description");
    echo "</td></tr>\n" . "\t\t\t<tr><td>" . _MD_MYLINKS_CATEGORYC . "</td><td>" . "" . $myCatTree->makeSelBox("cid", "title", '- ', $cid) . "" . "          </td></tr>\n" . "\t\t\t<tr><td>" . _MD_MYLINKS_SHOTIMAGE . "</td><td>" . "<select size='1' name='logourl'>" . "<option value=' '>------</option>";
    foreach ($linkimg_array as $image) {
        $opt_selected = $image == $logourl ? " selected='selected'" : '';
        echo "<option value='{$image}'{$opt_selected}>{$image}</option>";
    }
    echo "</select>" . "</td></tr>\n";
    $shotdir = "<strong>" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/images/shots/</strong>";
    echo "          <tr><td>&nbsp;</td><td>" . sprintf(_MD_MYLINKS_SHOTMUST, $shotdir) . "</td></tr>\n" . "        </table>" . "        <br /><br /><input type='hidden' name='lid' value='{$lid}' />\n" . "        <input type='hidden' name='op' value='modLinkS' />\n" . "        <input type='submit' value='" . _MD_MYLINKS_MODIFY . "' />" . "      </form>\n" . "\t\t<form action='main.php?op=delLink&amp;lid={$lid}' method='post' style='margin-left: 1em; display: inline;'><input type='submit' value='" . _DELETE . "' /></form>\n" . "\t\t<form action='main.php?op=linksConfigMenu' method='post' style='margin-left: 1em; display: inline;'><input type='submit' value='" . _CANCEL . "' /></form>\n" . "      <hr />";
    $result5 = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid='{$lid}'");
    list($totalvotes) = $xoopsDB->fetchRow($result5);
    echo "      <table style='width: 100%;'>\n" . "        <tr><td colspan='7' style='font-weight: bold;'>" . sprintf(_MD_MYLINKS_TOTALVOTES, $totalvotes) . "<br /><br /></td></tr>\n";
    // Show Registered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, ratinguser, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid='{$lid}' AND ratinguser >0 ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "        <tr><td colspan='7' style='font-weight: bold;'><br /><br />" . sprintf(_MD_MYLINKS_USERTOTALVOTES, $votes) . "<br /><br /></td></tr>\n";
    echo "        <tr>\n" . "          <th>" . _MD_MYLINKS_USER . "  </th>\n" . "          <th>" . _MD_MYLINKS_IP . "  </th>\n" . "          <th>" . _MD_MYLINKS_RATING . "  </th>\n" . "\t\t\t<th>" . _MD_MYLINKS_USERAVG . "  </th>\n" . "          <th>" . _MD_MYLINKS_TOTALRATE . "  </th>\n" . "          <th>" . _MD_MYLINKS_DATE . "  </th>\n" . "          <th>" . _DELETE . "</td>\n" . "        </tr>\n";
    if (0 == $votes) {
        echo "        <tr><td style='text-align: center;' colspan='7'>" . _MD_MYLINKS_NOREGVOTES . "<br /></td></tr>\n";
    }
    $x = 0;
    $colorswitch = "#DDDDDD";
    while (list($ratingid, $ratinguser, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        //  $ratingtimestamp = formatTimestamp($ratingtimestamp);
        //Individual user information
        //v3.11 changed to let SQL do calculations instead of PHP
        $result2 = $xoopsDB->query("SELECT COUNT(), FORMAT(AVG(rating),2) FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE ratinguser = '******'");
        list($uservotes, $useravgrating) = $xoopsDB->fetchRow($result2);
        //        $useravgrating = ($rating2) ? sprintf("%01.2f", ($useravgrating / $uservotes)) : 0;
        /*
                $result2=$xoopsDB->query("SELECT rating FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE ratinguser = '******'");
                $uservotes = $xoopsDB->getRowsNum($result2);
                $useravgrating = 0;
                while ( list($rating2) = $xoopsDB->fetchRow($result2) ) {
                    $useravgrating = $useravgrating + $rating2;
                }
                $useravgrating = sprintf("%01.2f", ($useravgrating / $uservotes));
        */
        $ratingusername = XoopsUser::getUnameFromId($ratinguser);
        echo "        <tr>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$ratingusername}</td>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$ratinghostname}</td>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$rating}</td>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$useravgrating}</td>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$uservotes}</td>\n" . "    \t\t<td style='background-color: {$colorswitch};'>{$ratingtimestamp}</td>\n" . "    \t\t<td style='background-color: {$colorswitch}; text-align: center; font-weight: bold;'>\n" . "      \t  <form action='main.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}' method='post'><input type='submit' value='X' /></form>\n" . "    \t\t</td>\n" . "  \t  </tr>\n";
        $x++;
        $colorswitch = $colorswitch == "#DDDDDD" ? "#FFFFFF" : "#DDDDDD";
    }
    // Show Unregistered Users Votes
    $result5 = $xoopsDB->query("SELECT ratingid, rating, ratinghostname, ratingtimestamp FROM " . $xoopsDB->prefix("mylinks_votedata") . " WHERE lid ='{$lid}' AND ratinguser='******' ORDER BY ratingtimestamp DESC");
    $votes = $xoopsDB->getRowsNum($result5);
    echo "        <tr><td colspan='7' style='font-weight: bold;'><br /><br />" . sprintf(_MD_MYLINKS_ANONTOTALVOTES, $votes) . "<br /><br /></td></tr>\n" . "        <tr>\n" . "          <th colspan='2'>" . _MD_MYLINKS_IP . "  </th>\n" . "\t\t    <th colspan='3' style='font-weight: bold;'>" . _MD_MYLINKS_RATING . "  </th>\n" . "\t\t\t<th style='font-weight: bold;'>" . _MD_MYLINKS_DATE . "  </th>\n" . "          <th style='text-align: center; font-weight: bold;'>" . _DELETE . "<br /></th>\n" . "        </tr>\n";
    if (0 == $votes) {
        echo "        <tr><td colspan='7' style='text-align: center;'>" . _MD_MYLINKS_NOUNREGVOTES . "<br /></td></tr>\n";
    }
    $x = 0;
    $colorswitch = "#DDDDDD";
    while (list($ratingid, $rating, $ratinghostname, $ratingtimestamp) = $xoopsDB->fetchRow($result5)) {
        $formatted_date = formatTimestamp($ratingtimestamp);
        echo "        <tr>\n" . "          <td colspan='2' style='background-color: {$colorswitch}'>{$ratinghostname}</td>\n" . "          <td colspan='3' style='background-color: {$colorswitch}'>{$rating}</td>\n" . "          <td style='background-color: {$colorswitch}'>{$formatted_date}</td>\n" . "          <td style='background-color: {$colorswitch} text-align: center; font-weight: bold;'>\n" . "            <form action='main.php?op=delVote&amp;lid={$lid}&amp;rid={$ratingid}' method='post'><input type='submit' value='X' /></form>\n" . "          </td>" . "        </tr>";
        $x++;
        $colorswitch = $colorswitch == "#DDDDDD" ? "#FFFFFF" : "#DDDDDD";
    }
    echo "        <tr><td colspan='7'>&nbsp;<br /></td></tr>\n" . "      </table>\n" . "    </td>\n" . "  </tr>\n" . "</table>\n";
    include 'footer.php';
}
Beispiel #22
0
function ModForm()
{
    global $xoopsDB;
    $idp = $_GET['idp'];
    if ($idp <= 0) {
        header('location: sponsor.php');
        die;
    }
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_partners') . " WHERE id_par='{$idp}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('sponsor.php', 1, _AM_RMDPO_SPONNOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    include 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    xoops_cp_header();
    DP_ShowNav();
    echo "<table width='100%' class='outer' cellspacing='1'>\n\t\t\t<tr><th colspan='2'>" . _AM_RMDP_NEWSPONSOR . "</th></tr>\n\t\t\t<form name='frmNew' method='post' action='sponsor.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_FDOWN . "</td>\n\t\t\t<td align='left' class='odd'><select name='ids'>";
    $result = $xoopsDB->query("SELECT id_soft, nombre FROM " . $xoopsDB->prefix('rmdp_software') . " ORDER BY nombre");
    while ($rw = $xoopsDB->fetchArray($result)) {
        echo "<option value='{$rw['id_soft']}' ";
        if ($rw['id_soft'] == $row['id_soft']) {
            echo "selected";
        }
        echo ">{$rw['nombre']}</option>";
    }
    echo "</select></td></tr>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_FTEXT . "</td>\n\t\t\t<td class='odd' align='left'>";
    $GLOBALS['text'] = $row['text'];
    xoopsCodeTarea("text", 20, 6);
    xoopsSmilies("text");
    echo "</td></tr>\n\t\t  <tr><td class='even'>&nbsp;</td>\n\t\t  <td class='odd'><input type='submit' name='sbt' value='" . _AM_RMDP_SEND . "'>\n\t\t  <input type='button' name='cancel' value='" . _AM_RMDP_CANCEL . "' onClick='history.go(-1);'></td></tr>\n\t\t  <input type='hidden' name='op' value='savemod'>\n\t\t  <input type='hidden' name='idp' value='{$idp}'>\n\t\t  </form></table>";
    xoops_cp_footer();
}
Beispiel #23
0
 function editform()
 {
     global $xoopsModule, $HTTP_SERVER_VARS, $HTTP_POST_VARS, $groupid, $myts, $xoopsConfig, $xoopsUser, $xoopsDB, $textareaname, $wfsConfig;
     include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
     $textareaname = '';
     //$maintext = '';
     echo "<table width='100%' border='0' cellspacing='0' cellpadding='1'>";
     echo "<table><tr><td><form action='index.php' method='post' name='coolsus'>";
     echo "<div><b>" . _AM_GROUPPROMPT . "</b><br />";
     if (isset($this->groupid)) {
         listGroups($this->groupid);
     } else {
         listGroups();
     }
     echo "<br />";
     echo "</div><br />";
     echo "<div><b>" . _WFS_CATEGORY . "</b><br>";
     $xt = new WfsCategory();
     if (isset($this->categoryid)) {
         $xt->makeSelBox(0, $this->categoryid, "categoryid");
     } else {
         $xt->makeSelBox(0, 0, "categoryid");
     }
     echo "</div><br />";
     echo "<div><b>" . _AM_ARTICLEWEIGHT . "</b><br />";
     echo "<input type='text' name='weight' id='weight' value='";
     if (isset($this->weight)) {
         echo $this->weight("F");
     } else {
         $this->weight = 0;
         echo $this->weight("F");
     }
     echo "' size='5' /></div><br>";
     echo "<div>" . _WFS_CAUTH . "<br></div>";
     echo "<div><select name='changeuser'>";
     echo "<option value='-1'>------</option>";
     $result = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " ORDER BY uname");
     while (list($uid, $uname) = $xoopsDB->fetchRow($result)) {
         if ($uid == $this->uid) {
             $opt_selected = "selected='selected'";
         } else {
             $opt_selected = "";
         }
         echo "<option value='" . $uid . "' {$opt_selected}>" . $uname . "</option>";
     }
     echo "</select></div><br />";
     echo "<div><b>" . _WFS_TITLE . "</b><br />";
     echo "<input type='text' name='title' id='title' value='";
     if (isset($this->title)) {
         if ($this->titleFlag) {
             echo $this->title("F");
         } else {
             echo $this->title("E");
         }
     }
     echo "' size='50' /></div><br />";
     //HTML Page Seclection//
     echo "<div><b>" . _WFS_HTMLPAGE . "</b></div>";
     //echo " <b>HTML Path: </b>".$htmlpath."<br /><br /></div>";
     $html_array = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . '/' . $wfsConfig['htmlpath']);
     echo "<div><select size='1' name='htmlpage'>";
     echo "<option value=' '>------</option>";
     foreach ($html_array as $htmlpage) {
         if ($htmlpage == $this->htmlpage()) {
             $opt_selected = "selected='selected'";
         } else {
             $opt_selected = "";
         }
         echo "<option value='" . $htmlpage . "' {$opt_selected}>" . $htmlpage . "</option>";
     }
     echo "</select>";
     $htmlpath = XOOPS_ROOT_PATH . '/' . $wfsConfig['htmlpath'];
     echo " <b>HTML Path: </b>" . $htmlpath . "<br /><br /></div>";
     //echo "</div><br />";
     echo "<div><b>" . _WFS_MAINTEXT . "</b></div>";
     if (isset($this->maintext)) {
         if ($this->maintextFlag) {
             $GLOBALS['maintext'] = $this->maintext("F");
         } else {
             $GLOBALS['maintext'] = $this->maintext("E");
         }
     }
     if (!strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "MSIE")) {
         $wfsConfig['wysiwygeditor'] = '0';
     }
     if ($wfsConfig['wysiwygeditor'] == '1') {
         html_editor('maintext');
         $smiliepath = $wfsConfig['smiliepath'];
         $smilie_array = XoopsLists::getimgListAsArray(XOOPS_ROOT_PATH . "/" . $smiliepath);
         echo "<br /><div style='text-align: left;'><b>" . _AM_SMILIE . "</b><br />";
         echo "<table><tr><td align='top' valign='left'>";
         echo "<div><script type='text/javascript'>\n\t\t<!--\n\t\t\tfunction showbutton() {\n\t\t\t   \tdocument.all." . $textareaname . "_mysmile.src = '" . $xoopsConfig['xoops_url'] . "/{$smiliepath}/' + document.all." . $textareaname . "_smiley.value;\n\t\t\t}\n\t\t// -->\n\t\t</script>";
         echo "<select name='" . $textareaname . "_smiley' onchange='showbutton();'>";
         foreach ($smilie_array as $file) {
             echo "<option value='" . $file . "' {$opt_selected}>" . $file . "</option>";
         }
         echo "</select></td><td align='top' valign='left'>";
         echo "<img name='" . $textareaname . "_mysmile' src='" . $xoopsConfig['xoops_url'] . "/{$smiliepath}/{$file}' style='cursor:hand;' border='0' onclick=\"doFormat('InsertImage', document.all." . $textareaname . "_mysmile.src);\" />";
         echo "</td></tr></table>\n\t\t<script type='text/javascript'>\n\t\t\tshowbutton();\n\t\t</script>";
         //Start of article images
         $graphpath = $wfsConfig['graphicspath'];
         $graph_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/" . $graphpath);
         echo "<br><div style='text-align: left;'><b>" . _AM_GRAPHIC . "</b><br />";
         echo "<table><tr><td align='top' valign='left'>";
         echo "<script type='text/javascript'>\n\t\t<!--\n\t\t\tfunction showbutton2() {\n\t\t\t\tdocument.all." . $textareaname . "_mygraph.src = '" . $xoopsConfig['xoops_url'] . "/{$graphpath}/' + document.all." . $textareaname . "_graph.value;\n\t\t\t}\n\t\t// -->\n\t\t</script>";
         echo "<select name='" . $textareaname . "_graph' onchange='showbutton2();'>";
         foreach ($graph_array as $file2) {
             echo "<option value='" . $file2 . "' {$opt_selected}>" . $file2 . "</option>";
         }
         echo "</select></td><td align='top' valign='left'>";
         echo "<img name='" . $textareaname . "_mygraph' src='" . $xoopsConfig['xoops_url'] . "/{$graphpath}/{$file2}' style='cursor:hand;' border='0' onclick=\"doFormat('InsertImage', document.all." . $textareaname . "_mygraph.src);\" />";
         echo "</td></tr></table>\n\t\t<script type='text/javascript'>\n\t\t\tshowbutton2();\n\t\t</script>";
     } else {
         xoopsCodeTarea("maintext", 60, 15);
         xoopsSmilies("maintext");
     }
     echo "<div><b>" . _WFS_SUMMARY . "</b></div>";
     echo "<div><textarea id='summary' name='summary' wrap='virtual' cols='60' rows='5'>";
     if (isset($this->summary)) {
         if ($this->summaryFlag) {
             echo $this->summary("F");
         } else {
             echo $this->summary("E");
         }
     }
     echo "</textarea></div>";
     echo "<div class = 'bg3'><h4>" . _WFS_ARTICLELINK . "</h4></div>";
     echo "<div><b>" . _WFS_LINKURL . "</b><br />";
     echo "<input type='text' name='url' id='url' value='";
     if (isset($this->url)) {
         echo $this->url("F");
     }
     echo "' size='70' /></div><br />";
     echo "<div><b>" . _WFS_LINKURLNAME . "</b><br />";
     echo "<input type='text' name='urlname' id='urlname' value='";
     if (isset($this->urlname)) {
         echo $this->urlname("F");
     }
     echo "' size='50' /></div><br>";
     echo "<div class = 'bg3'><h4>" . _WFS_ATTACHEDFILES . "</h4></div>";
     echo "<div>" . _WFS_ATTACHEDFILESTXT . "</div><br />";
     if (empty($this->articleid)) {
         echo _WFS_AFTERREGED . "<br />";
     } elseif ($num = $this->getFilesCount()) {
         echo "<table border='1' style='border-collapse: collapse' bordercolor='#ffffff' width='100%' >";
         echo "<tr class='bg3'><td align='center'>" . _AM_FILEID . "</td><td align='center'>" . _AM_FILEICON . "</td><td align='center'>" . _AM_FILESTORE . "</td><td align='center'>" . _AM_REALFILENAME . "</td><td align='center'>" . _AM_USERFILENAME . "</td><td align='center' class='nw'>" . _AM_FILEMIMETYPE . "</td><td align='center' class='nw'>" . _AM_FILESIZE . "</td><td align='center'>" . _AM_ACTION . "</td></tr>";
         foreach ($this->files as $attached) {
             if (is_file(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $attached->getFileRealName())) {
                 $filename = $attached->getFileRealName();
             } else {
                 $filename = "File Error!";
             }
             $fileid = $attached->getFileid();
             $mimetype = new mimetype();
             $icon = get_icon(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename);
             $iconshow = "<img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/" . $icon . " align='middle'>";
             if (is_file(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename)) {
                 $size = Prettysize(filesize(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename));
             } else {
                 $size = '0';
             }
             $filerealname = $attached->downloadname;
             $mimeshow = $mimetype->getType(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename);
             $counter = $attached->getCounter();
             $linkedname = $attached->getFileShowName();
             //$linkedname = $attached->getLinkedName(XOOPS_URL."/modules/".$xoopsModule->dirname()."/download.php?fileid=");
             $editlink = "<a href='index.php?op=fileedit&amp;fileid=" . $fileid . "'>" . _AM_EDIT . "</a>";
             $dellink = "<a href='index.php?op=delfile&amp;fileid=" . $fileid . "'>" . _AM_DELETE . "</a>";
             echo "<tr><td align='center'><b>" . $fileid . "</b>";
             echo "</td><td align='center'>" . $iconshow . "";
             echo "</td><td align='center'>" . $filename . "";
             echo "</td><td align='center'>" . $filerealname . "";
             echo "</td><td align='center'>" . $linkedname . "";
             echo "</td><td align='center'>" . $mimeshow . "";
             echo "</td><td align='center'>" . $size . "";
             //echo "</td><td align='center' class='nw'>".$counter."";
             echo "</td><td align='center'>" . $editlink . " " . $dellink . "";
             echo "</td></tr>";
         }
         echo "</table>";
     } else {
         echo "<div align='left'>" . _WFS_NOFILE . "</div>";
     }
     echo "</div><br />";
     echo "<div class = 'bg3'><h4>" . _WFS_MISCSETTINGS . "</h4></div>";
     echo "<input type='checkbox' name='autodate' value='1'";
     if (isset($autodate) && $autodate == 1) {
         echo " checked='checked'";
     }
     echo "> ";
     $time = time();
     if (!empty($this->articleid)) {
         $isedit = 1;
     }
     if (isset($isedit) && $isedit == 1 && $this->published > $time) {
         echo "<b>" . _AM_CHANGEDATETIME . "</b><br /><br />";
         printf(_AM_NOWSETTIME, formatTimestamp($this->published));
         $published = xoops_getUserTimestamp($this->published);
         echo "<br /><br />";
         printf(_AM_CURRENTTIME, formatTimestamp($time));
         echo "<br />";
         echo "<input type='hidden' name='isedit' value='1' />";
     } else {
         echo "<b>" . _AM_SETDATETIME . "</b><br /><br />";
         printf(_AM_CURRENTTIME, formatTimestamp($time));
         echo "<br />";
     }
     echo "<br /> &nbsp; " . _AM_MONTHC . " <select name='automonth'>";
     if (isset($automonth)) {
         $automonth = intval($automonth);
     } elseif (isset($this->published)) {
         $automonth = date('m', $this->published);
     } else {
         $automonth = date('m');
     }
     for ($xmonth = 1; $xmonth < 13; $xmonth++) {
         if ($xmonth == $automonth) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xmonth}' {$sel}>{$xmonth}</option>";
     }
     echo "</select>&nbsp;";
     echo _AM_DAYC . " <select name='autoday'>";
     if (isset($autoday)) {
         $autoday = intval($autoday);
     } elseif (isset($published)) {
         $autoday = date('d', $this->published);
     } else {
         $autoday = date('d');
     }
     for ($xday = 1; $xday < 32; $xday++) {
         if ($xday == $autoday) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xday}' {$sel}>{$xday}</option>";
     }
     echo "</select>&nbsp;";
     echo _AM_YEARC . " <select name='autoyear'>";
     if (isset($autoyear)) {
         $autoyear = intval($autoyear);
     } elseif (isset($this->published)) {
         $autoyear = date('Y', $this->published);
     } else {
         $autoyear = date('Y');
     }
     $cyear = date('Y');
     for ($xyear = $autoyear - 8; $xyear < $cyear + 2; $xyear++) {
         if ($xyear == $autoyear) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xyear}' {$sel}>{$xyear}</option>";
     }
     echo "</select>";
     echo "&nbsp;" . _AM_TIMEC . " <select name='autohour'>";
     if (isset($autohour)) {
         $autohour = intval($autohour);
     } elseif (isset($this->publishedshed)) {
         $autohour = date('H', $this->published);
     } else {
         $autohour = date('H');
     }
     for ($xhour = 0; $xhour < 24; $xhour++) {
         if ($xhour == $autohour) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xhour}' {$sel}>{$xhour}</option>";
     }
     echo "</select>";
     echo " : <select name='automin'>";
     if (isset($automin)) {
         $automin = intval($automin);
     } elseif (isset($published)) {
         $automin = date('i', $published);
     } else {
         $automin = date('i');
     }
     for ($xmin = 0; $xmin < 61; $xmin++) {
         if ($xmin == $automin) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         $xxmin = $xmin;
         if ($xxmin < 10) {
             $xxmin = "{$xmin}";
         }
         echo "<option value='{$xmin}' {$sel}>{$xxmin}</option>";
     }
     echo "</select></br />";
     echo "<br /><input type='checkbox' name='autoexpdate' value='1'";
     if (isset($autoexpdate) && $autoexpdate == 1) {
         echo " checked='checked'";
     }
     echo "> ";
     $time = time();
     if (isset($isedit) && $isedit == 1 && $this->expired > 0) {
         echo "<b>" . _AM_CHANGEEXPDATETIME . "</b><br /><br />";
         printf(_AM_NOWSETEXPTIME, formatTimestamp($this->expired));
         echo "<br /><br />";
         $expired = xoops_getUserTimestamp($this->expired);
         printf(_AM_CURRENTTIME, formatTimestamp($time));
         echo "<br />";
         echo "<input type='hidden' name='isedit' value='1' />";
     } else {
         echo "<b>" . _AM_SETEXPDATETIME . "</b><br /><br />";
         printf(_AM_CURRENTTIME, formatTimestamp($time));
         echo "<br />";
     }
     echo "<br /> &nbsp; " . _AM_MONTHC . " <select name='autoexpmonth'>";
     if (isset($autoexpmonth)) {
         $autoexpmonth = intval($autoexpmonth);
     } elseif (isset($expired)) {
         $autoexpmonth = date('m', $expired);
     } else {
         $autoexpmonth = date('m');
         $autoexpmonth = $autoexpmonth + 1;
     }
     for ($xmonth = 1; $xmonth < 13; $xmonth++) {
         if ($xmonth == $autoexpmonth) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xmonth}' {$sel}>{$xmonth}</option>";
     }
     echo "</select>&nbsp;";
     echo _AM_DAYC . " <select name='autoexpday'>";
     if (isset($autoexpday)) {
         $autoexpday = intval($autoexpday);
     } elseif (isset($expired)) {
         $autoexpday = date('d', $expired);
     } else {
         $autoexpday = date('d');
     }
     for ($xday = 1; $xday < 32; $xday++) {
         if ($xday == $autoexpday) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xday}' {$sel}>{$xday}</option>";
     }
     echo "</select>&nbsp;";
     echo _AM_YEARC . " <select name='autoexpyear'>";
     if (isset($autoexpyear)) {
         $autoyear = intval($autoexpyear);
     } elseif (isset($expired)) {
         $autoexpyear = date('Y', $expired);
     } else {
         $autoexpyear = date('Y');
     }
     $cyear = date('Y');
     for ($xyear = $autoexpyear - 8; $xyear < $cyear + 2; $xyear++) {
         if ($xyear == $autoexpyear) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xyear}' {$sel}>{$xyear}</option>";
     }
     echo "</select>";
     echo "&nbsp;" . _AM_TIMEC . " <select name='autoexphour'>";
     if (isset($autoexphour)) {
         $autoexphour = intval($autoexphour);
     } elseif (isset($expired)) {
         $autoexphour = date('H', $expired);
     } else {
         $autoexphour = date('H');
     }
     for ($xhour = 0; $xhour < 24; $xhour++) {
         if ($xhour == $autoexphour) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         echo "<option value='{$xhour}' {$sel}>{$xhour}</option>";
     }
     echo "</select>";
     echo " : <select name='autoexpmin'>";
     if (isset($autoexpmin)) {
         $autoexpmin = intval($autoexpmin);
     } elseif (isset($expired)) {
         $autoexpmin = date('i', $expired);
     } else {
         $autoexpmin = date('i');
     }
     for ($xmin = 0; $xmin < 61; $xmin++) {
         if ($xmin == $autoexpmin) {
             $sel = 'selected="selected"';
         } else {
             $sel = '';
         }
         $xxmin = $xmin;
         if ($xxmin < 10) {
             $xxmin = "0{$xmin}";
         }
         echo "<option value='{$xmin}' {$sel}>{$xxmin}</option>";
     }
     echo "</select><br /><br />";
     if (isset($this->published) && $this->published == 0 && isset($this->type) && $this->type == "user") {
         echo "<div><input type='checkbox' name='approved' value='1' checked='checked'>&nbsp;<b>" . _AM_APPROVE . "</b></div><br />";
     }
     echo "<br /><div><input type='checkbox' name='nosmiley' value='1'";
     if (isset($this->nosmiley) && $this->nosmiley == 1) {
         echo " checked='checked'";
     }
     echo " /> <b>" . _WFS_DISAMILEY . "</b></div>";
     echo "<div><input type='checkbox' name='nohtml' value='1'";
     if (isset($this->nohtml) && $this->nohtml == 1) {
         echo " checked='checked'";
     }
     echo " /> <b>" . _WFS_DISHTML . "</b><br />";
     echo "</div><br />";
     if (isset($isedit) && $isedit == 1) {
         echo "<input type='checkbox' name='movetotop' value='1'";
         if (isset($movetotop) && $movetotop == 1) {
             echo " checked='checked'";
         }
         echo " />&nbsp;<b>" . _AM_MOVETOTOP . "</b><br />";
     }
     echo "<br /><div><input type='checkbox' name='justhtml' value='2'";
     if (isset($this->htmlpage) && $this->ishtml == '2') {
         echo " checked='checked'";
     }
     echo " />" . _AM_JUSTHTML . "<br /></div>";
     echo "<div><input type='checkbox' name='noshowart' value='1'";
     if (isset($this->noshowart) && $this->noshowart == 1) {
         echo " checked='checked'";
     }
     echo " /> " . _AM_NOSHOART . "<br />";
     echo "</div><br />";
     echo "<input type='checkbox' name='offline' value='1'";
     if (isset($this->offline) && $this->offline == 1) {
         echo " checked='checked'";
     }
     echo " />&nbsp;" . _AM_OFFLINE . "<br />";
     echo "<br />";
     if (!empty($this->articleid)) {
         echo "<input type='hidden' name='articleid' value='" . $this->articleid . "' />\n";
     }
     if (!empty($HTTP_POST_VARS['referer'])) {
         echo "<input type='hidden' name='referer' value='" . $HTTP_POST_VARS['referer'] . "' />\n";
     } elseif (!empty($HTTP_SERVER_VARS['HTTP_REFERER'])) {
         echo "<input type='hidden' name='referer' value='" . $HTTP_SERVER_VARS['HTTP_REFERER'] . "' />\n";
     }
     echo "<input type='submit' name='op' class='formButton' value='Preview' />&nbsp;<input type='submit' name='op' class='formButton' value='Save' />&nbsp;<input type='submit' name='op' class='formButton' value='Clean' />";
     echo "</form>";
     echo "</td></tr></table>";
     if (!empty($this->articleid)) {
         echo "<hr />";
         $upload = new UploadFile();
         echo $upload->formStart("index.php?op=fileup");
         echo "<h4>" . _WFS_FILEUPLOAD . "</h4>\n";
         echo "" . _WFS_ATTACHFILEACCESS . "<br />";
         echo "<br /><b>" . _WFS_ATTACHFILE . "</b><br />";
         echo $upload->formMax();
         echo $upload->formField();
         echo "<br /><br /><b>" . _WFS_FILESHOWNAME . "</b><br />";
         echo "<input type='text' name='fileshowname' id='fileshowname' value='";
         if (isset($this->fileshowname)) {
             echo $this->fileshowname;
         }
         echo "' size='70' maxlength='80' /><br />";
         echo "<br /><b>" . _WFS_FILEDESCRIPT . "</b><br />";
         echo "<textarea name='textfiledescript' cols='50' rows='5'></textarea><br />";
         echo "<br /><b>" . _WFS_FILETEXT . "</b><br />";
         echo "<textarea name='textfilesearch' cols='50' rows='3'></textarea><br />";
         echo "<input type='hidden' name='groupid' value='" . $this->groupip . "' />";
         echo "<input type='hidden' name='articleid' value='" . $this->articleid . "' />";
         echo "<input type='hidden' name='groupid' value= '" . $this->groupid . "' />";
         echo $upload->formSubmit(_WFS_UPLOAD);
         echo $upload->formEnd();
     }
 }
Beispiel #24
0
    $xoopsTpl->assign('lang_size', _RMDP_FSIZE);
    $xoopsTpl->assign('lang_anonimo', _RMDP_FANONIM);
    $xoopsTpl->assign('lang_web', _RMDP_FWEB);
    $xoopsTpl->assign('lang_url', _RMDP_FURL);
    $xoopsTpl->assign('lang_send', _RMDP_SEND);
    $xoopsTpl->assign('lang_yes', _RMDP_YES);
    $xoopsTpl->assign('lang_no', _RMDP_NO);
    $xoopsTpl->assign('lang_info', sprintf(_RMDP_SUBMIT_INFO, $xoopsConfig['sitename']));
    $xoopsTpl->assign('lang_info2', _RMDP_SUBMIT_INFO2);
    $xoopsTpl->assign('lang_os', _RMDP_OSS);
    // Cadenas de errores
    $xoopsTpl->assign('lang_errores_happen', _RMDP_ERRORS_HAPPEND);
    $xoopsTpl->assign('lang_mustbe_num', _RMDP_MUSTBE_NUM);
    $xoopsTpl->assign('lang_is_empty', _RMDP_IS_EMPTY);
    // Cargamos los valores de url si estamos regresando por un error
    foreach ($_GET as $key => $value) {
        $xoopsTpl->assign('param_' . $key, $value);
    }
    // Creamos el editor para la descripción
    include_once XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    ob_start();
    $GLOBALS['desc'] = isset($_GET['desc']) ? $_GET['desc'] : '';
    xoopsCodeTarea("desc", 37, 8);
    $xoopsTpl->assign('xoops_codes', ob_get_contents());
    ob_end_clean();
    ob_start();
    xoopsSmilies("desc");
    $xoopsTpl->assign('xoops_smilies', ob_get_contents());
    ob_end_clean();
}
include 'footer.php';
Beispiel #25
0
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  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 //
//  ------------------------------------------------------------------------ //
echo "<form action='index.php' method='post'>\n<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td class='bg2'>\n<table width='100%' border='0' cellpadding='4' cellspacing='1'>\n<tr><td nowrap='nowrap' class='bg3'>" . _XD_QUESTION . " </td><td class='bg1'><input type='text' name='contents_title' value='{$contents_title}' size='31' maxlength='255' /></td></tr>\n<tr><td nowrap='nowrap' class='bg3'>" . _XD_ORDER . " </td><td class='bg1'><input type='text' name='contents_order' value='" . $contents_order . "' size='4' maxlength='3' /></td></tr>";
$checked = $contents_visible == 1 ? " checked='checked'" : "";
echo "<tr><td nowrap='nowrap' class='bg3'>" . _XD_DISPLAY . " </td><td class='bg1'><input type='checkbox' name='contents_visible' value='1'{$checked} /></td></tr>\n<tr><td nowrap='nowrap' class='bg3'>" . _XD_ANSWER . " </td><td class='bg1'>";
include_once XOOPS_ROOT_PATH . "/include/xoopscodes.php";
xoopsCodeTarea("contents_contents", 60, 20);
xoopsSmilies("contents_contents");
$checked = $contents_nohtml == 1 ? " checked='checked'" : "";
echo "<br /><input type='checkbox' name='contents_nohtml' value='1'{$checked} />" . _XD_NOHTML . "<br />";
$checked = $contents_nosmiley == 1 ? " checked='checked'" : "";
echo "<input type='checkbox' name='contents_nosmiley' value='1'{$checked} />" . _XD_NOSMILEY . "<br />";
$checked = $contents_noxcode == 1 ? " checked='checked'" : "";
echo "<input type='checkbox' name='contents_noxcode' value='1'{$checked} />" . _XD_NOXCODE . "</td></tr>\n<tr><td nowrap='nowrap' class='bg3'>&nbsp;</td><td class='bg1'><input type='hidden' name='category_id' value='" . $category_id . "' /><input type='hidden' name='contents_id' value='" . $contents_id . "' /><input type='hidden' name='op' value='{$op}' /><input type='submit' name='contents_preview' value='" . _PREVIEW . "' />&nbsp;<input type='submit' name='contents_submit' value='" . _SUBMIT . "' /></td></tr>\n</table></td></tr></table>\n</form>";
Beispiel #26
0
function Content($iid)
{
    global $xoopsDB;
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    $cs = $_POST[catego];
    $ct = $_POST[temas];
    /**
     * Buscamos si existe contenido para este indice
     **/
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("rmlib_contenido") . " WHERE `index` = '{$iid}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num > 0) {
        list($coid, $index, $texto, $fecha) = $xoopsDB->fetchRow($result);
        $GLOBALS['texto'] = $texto;
    }
    list($tid, $ititle) = $xoopsDB->fetchRow($xoopsDB->query("SELECT tema, titulo FROM " . $xoopsDB->prefix("rmlib_indice") . " WHERE iid = '{$iid}'"));
    list($cid, $ntema) = $xoopsDB->fetchRow($xoopsDB->query("SELECT catego, titulo FROM " . $xoopsDB->prefix("rmlib_temas") . " WHERE tid = '{$tid}'"));
    if ($cs <= 0) {
        $cs = $cid;
    }
    if ($ct <= 0) {
        $ct = $tid;
    }
    /**
     * Dibujamos la tabla d eedición
     **/
    xoops_cp_header();
    echo "<script type='text/javascript'>\n<!--\n\t\t\tfunction wcatego(){\n\t\t\t\tdocument.frmContent.texto.value = document.frmContent.texto.value + '[catego:' + document.frmContent.catego.value + ']' + document.frmContent.txtC.value + '[/catego]';\t\t\t\t\n\t\t\t}\n\t\t\tfunction wtheme(){\n\t\t\t\tdocument.frmContent.texto.value = document.frmContent.texto.value + '[theme:' + document.frmContent.temas.value + ']' + document.frmContent.txtT.value + '[/theme]';\t\t\t\t\n\t\t\t}\n\t\t\tfunction windex(){\n\t\t\t\tdocument.frmContent.texto.value = document.frmContent.texto.value + '[index:' + document.frmContent.indices.value + ']' + document.frmContent.txtI.value + '[/index]';\t\t\t\t\n\t\t\t}\n\t\t  -->\n</script>\n";
    echo "<table width='100%' cellpadding='0' cellspacing='1' class='outer'>\n\n\t\t\t<tr><th colspan='3'>" . sprintf(_RH_CONTENT_TITLE, $ititle) . "</th></tr>\n\n\t\t\t<form name='frmContent' action='books.php' method='post'>\n\n\t\t    <tr><td class='even' align='left'>" . _RH_CONTENT_TEXT . "<br />\n\t\t\t<span style:'font-size: 8px;'>" . _RH_CONTENT_INST . "</span></td>\n\n\t\t\t<td class='odd' align='left'>";
    xoopsCodeTarea("texto", 20, 15);
    xoopsSmilies("texto");
    echo "  </td>\n\n\t\t\t<td class='even' align='left' valign='top'><strong>" . _RH_CONTENT_LINKS . "</strong><br /><br />" . _RH_CONTENT_CATEGO . "<br />\n\t\t\t<select name='catego' onChange=\"document.frmContent.op.value='content'; document.frmContent.submit();\">";
    $result = $xoopsDB->query("SELECT cid, titulo FROM " . $xoopsDB->prefix("rmlib_categos") . " ORDER BY titulo");
    while (list($catego, $ncatego) = $xoopsDB->fetchRow($result)) {
        if ($cs == $catego) {
            echo "<option value='{$catego}' selected>{$ncatego}</option>\n";
        } else {
            echo "<option value='{$catego}'>{$ncatego}</option>\n";
        }
    }
    echo "</select><br /><input type='text' size='20' name='txtC'><input type='button' name='btnC' value='" . _RH_CONTENT_ADD . "' onclick=\"wcatego();\"><br /><br />\n\n\t\t  " . _RH_CONTENT_THEME . "<br /><select name='temas' onChange=\"document.frmContent.op.value='content'; document.frmContent.submit();\">\n";
    $result = $xoopsDB->query("SELECT tid, titulo FROM " . $xoopsDB->prefix("rmlib_temas") . " WHERE catego = '{$cs}' ORDER BY titulo");
    while (list($temas, $ntemas) = $xoopsDB->fetchRow($result)) {
        if ($ct == $temas) {
            echo "<option value='{$temas}' selected>{$ntemas}</option>\n";
        } else {
            echo "<option value='{$temas}'>{$ntemas}</option>\n";
        }
    }
    echo "\t</select><br /><input type='text' size='20' name='txtT'><input type='button' name='btnT' value='" . _RH_CONTENT_ADD . "' onclick=\"wtheme();\"><br /><br />\n\n\t\t\t<select name='indices'>\n";
    $result = $xoopsDB->query("SELECT iid, titulo FROM " . $xoopsDB->prefix("rmlib_indice") . " WHERE tema = '{$ct}' ORDER BY titulo");
    while (list($indice, $nindice) = $xoopsDB->fetchRow($result)) {
        echo "<option value='{$indice}'>{$nindice}</option>\n";
    }
    echo "  </select><br /><input type='text' size='20' name='txtI'><input type='button' name='btnI' value='" . _RH_CONTENT_ADD . "' onclick=\"windex();\">\n\t\t\t<input type='hidden' name='op' value='savecontent'>\n\n\t        <input type='hidden' name='iid' value='{$iid}'>\n\n\t\t\t<input type='hidden' name='cid' value='{$cid}'>\n";
    if ($coid > 0) {
        echo "<input type='hidden' name='save' value='0'>\n";
        echo "<input type='hidden' name='coid' value='{$coid}'>\n";
    } else {
        echo "<input type='hidden' name='save' value='1'>\n";
    }
    echo "\t<input type='hidden' name='tid' value='{$tid}'>\n</td></tr>\n\t\t\t<tr><td class='even'>&nbsp;</td>\n\n\t\t\t<td class='odd' align='left'><input type='submit' name='sbt' value='" . _RH_GENERAL_SEND . "'>\n\n\t\t\t<input type='button' value='" . _RH_GENERAL_CANCEL . "' name='cancel' onclick=\"javascript: window.location = 'index.php?op=showindex&tid={$tid}';\">\n</td>\n\n\t\t\t<td class='even'></td></form>\n\n\t\t  </table>";
    xoops_cp_footer();
}