From: <w4...@us...> - 2003-01-06 20:25:39
|
Update of /cvsroot/xoops/xoops2/modules/mylinks/admin In directory sc8-pr-cvs1:/tmp/cvs-serv1251/modules/mylinks/admin Modified Files: index.php Log Message: added the image selector for the download and links aprove and submit (admin) Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/mylinks/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 6 Jan 2003 17:55:17 -0000 1.2 --- index.php 6 Jan 2003 20:25:36 -0000 1.3 *************** *** 26,29 **** --- 26,31 ---- include '../include/functions.php'; include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; + include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; + include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; include_once XOOPS_ROOT_PATH.'/class/module.errorhandler.php'; $myts =& MyTextSanitizer::getInstance(); *************** *** 75,78 **** --- 77,81 ---- global $xoopsDB, $xoopsConfig, $myts, $eh, $mytree; // List links waiting for validation + $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mylinks/images/shots/"); $result = $xoopsDB->query("select lid, cid, title, url, email, logourl, submitter from ".$xoopsDB->prefix("mylinks_links")." where status=0 order by date DESC"); $numrows = $xoopsDB->getRowsNum($result); *************** *** 114,120 **** echo "</td></tr>\n"; echo "<tr><td align=\"right\" nowrap>"._MD_SHOTIMAGE."</td><td>\n"; ! echo "<input type=\"text\" name=\"logourl\" size=\"50\" maxlength=\"60\"></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"; --- 117,129 ---- echo "</td></tr>\n"; echo "<tr><td align=\"right\" nowrap>"._MD_SHOTIMAGE."</td><td>\n"; ! //echo "<input type=\"text\" name=\"logourl\" size=\"50\" maxlength=\"60\">\n"; ! echo "<select size='1' name='logourl'>"; ! echo "<option value=' '>------</option>"; ! foreach($linkimg_array as $image){ ! echo "<option value='".$image."'>".$image."</option>"; ! } ! echo "</select>"; ! echo "</td></tr><tr><td></td><td>"; $shotdir = "<b>".XOOPS_URL."/modules/mylinks/images/shots/</b>"; printf(_MD_SHOTMUST,$shotdir); echo "</td></tr>\n"; *************** *** 138,142 **** // Add a New Main Category xoops_cp_header(); ! include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; echo "<h4>"._MD_WEBLINKSCONF."</h4>"; echo "<table width='100%' border='0' cellspacing='1' class='outer'>" --- 147,151 ---- // Add a New Main Category xoops_cp_header(); ! $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mylinks/images/shots/"); echo "<h4>"._MD_WEBLINKSCONF."</h4>"; echo "<table width='100%' border='0' cellspacing='1' class='outer'>" *************** *** 187,191 **** echo "</td></tr>\n"; echo "<tr><td align=\"right\"nowrap>"._MD_SHOTIMAGE."</td><td>\n"; ! echo "<input type=\"text\" name=\"logourl\" size=\"50\" maxlength=\"60\"></td></tr>\n"; $shotdir = "<b>".XOOPS_URL."/modules/mylinks/images/shots/</b>"; echo "<tr><td></td><td>"; --- 196,207 ---- echo "</td></tr>\n"; echo "<tr><td align=\"right\"nowrap>"._MD_SHOTIMAGE."</td><td>\n"; ! //echo "<input type=\"text\" name=\"logourl\" size=\"50\" maxlength=\"60\">"; ! echo "<select size='1' name='logourl'>"; ! echo "<option value=' '>------</option>"; ! foreach($linkimg_array as $image){ ! echo "<option value='".$image."'>".$image."</option>"; ! } ! echo "</select>"; ! echo "</td></tr>\n"; $shotdir = "<b>".XOOPS_URL."/modules/mylinks/images/shots/</b>"; echo "<tr><td></td><td>"; *************** *** 234,238 **** { global $xoopsDB, $HTTP_GET_VARS, $myts, $eh, $mytree, $xoopsConfig; ! include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; $lid = $HTTP_GET_VARS['lid']; xoops_cp_header(); --- 250,254 ---- { global $xoopsDB, $HTTP_GET_VARS, $myts, $eh, $mytree, $xoopsConfig; ! $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mylinks/images/shots/"); $lid = $HTTP_GET_VARS['lid']; xoops_cp_header(); *************** *** 266,270 **** $mytree->makeMySelBox("title", "title", $cid); echo "</td></tr>\n"; ! echo "<tr><td>"._MD_SHOTIMAGE."</td><td><input type=text name=logourl value=\"$logourl\" size=\"50\" maxlength=\"60\"></input></td></tr>\n"; $shotdir = "<b>".XOOPS_URL."/modules/mylinks/images/shots/</b>"; echo "<tr><td></td><td>"; --- 282,299 ---- $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>"; |