From: <w4...@us...> - 2003-01-06 20:25:39
|
Update of /cvsroot/xoops/xoops2/modules/mydownloads/admin In directory sc8-pr-cvs1:/tmp/cvs-serv1251/modules/mydownloads/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/mydownloads/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:51:52 -0000 1.2 --- index.php 6 Jan 2003 20:25:36 -0000 1.3 *************** *** 34,37 **** --- 34,39 ---- 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(); *************** *** 83,86 **** --- 85,89 ---- global $xoopsDB, $myts, $eh, $mytree; // List downloads waiting for validation + $downimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mydownloads/images/shots/"); $result = $xoopsDB->query("SELECT lid, cid, title, url, homepage, version, size, platform, logourl, submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." where status=0 ORDER BY date DESC"); $numrows = $xoopsDB->getRowsNum($result); *************** *** 128,133 **** 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"; ! echo "<tr><td></td><td>"; $directory = XOOPS_URL."/modules/mydownloads/images/shots/"; printf(_MD_MUSTBEVALID,$directory); --- 131,142 ---- 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($downimg_array as $image){ ! echo "<option value='".$image."'>".$image."</option>"; ! } ! echo "</select>"; ! echo "</td></tr><tr><td></td><td>"; $directory = XOOPS_URL."/modules/mydownloads/images/shots/"; printf(_MD_MUSTBEVALID,$directory); *************** *** 152,157 **** global $xoopsDB, $myts, $eh, $mytree; // Add a New Main Category - include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; xoops_cp_header(); echo "<h4>"._MD_DLCONF."</h4>"; echo"<table width='100%' border='0' cellspacing='1' class='outer'>" --- 161,166 ---- global $xoopsDB, $myts, $eh, $mytree; // Add a New Main Category xoops_cp_header(); + $downimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mydownloads/images/shots/"); echo "<h4>"._MD_DLCONF."</h4>"; echo"<table width='100%' border='0' cellspacing='1' class='outer'>" *************** *** 208,212 **** 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"; echo "<tr><td align=\"right\"></td><td>"; $directory = XOOPS_URL."/modules/mydownloads/images/shots/"; --- 217,229 ---- echo "</td></tr>\n"; echo "<tr><td align=\"right\"nowrap>"._MD_SHOTIMAGE."</td><td>\n"; ! echo "<select size='1' name='logourl'>"; ! echo "<option value=' '>------</option>"; ! foreach($downimg_array as $image){ ! echo "<option value='".$image."'>".$image."</option>"; ! } ! echo "</select>"; ! //echo "<input type=\"text\" name=\"logourl\" size=\"50\" maxlength=\"60\">"; ! ! echo "</td></tr>\n"; echo "<tr><td align=\"right\"></td><td>"; $directory = XOOPS_URL."/modules/mydownloads/images/shots/"; *************** *** 253,257 **** { global $xoopsDB, $HTTP_GET_VARS, $myts, $eh, $mytree; ! include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; $lid = $HTTP_GET_VARS['lid']; xoops_cp_header(); --- 270,274 ---- { global $xoopsDB, $HTTP_GET_VARS, $myts, $eh, $mytree; ! $downimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/mydownloads/images/shots/"); $lid = $HTTP_GET_VARS['lid']; xoops_cp_header(); *************** *** 289,293 **** $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"; echo "<tr><td></td><td>"; $directory = XOOPS_URL."/modules/mydownloads/images/shots/"; --- 306,323 ---- $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/"; |