|
From: <be...@us...> - 2013-08-06 19:24:01
|
Revision: 11886
http://sourceforge.net/p/xoops/svn/11886
Author: beckmi
Date: 2013-08-06 19:23:58 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
More bug fixing
Modified Paths:
--------------
XoopsModules/mxDirectory/trunk/mxdirectory/admin/coupon.php
XoopsModules/mxDirectory/trunk/mxdirectory/admin/main.php
XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_cats.php
XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_coup.php
XoopsModules/mxDirectory/trunk/mxdirectory/brokenlink.php
XoopsModules/mxDirectory/trunk/mxdirectory/include/functions.php
XoopsModules/mxDirectory/trunk/mxdirectory/include/waiting.plugin.php
XoopsModules/mxDirectory/trunk/mxdirectory/index.php
XoopsModules/mxDirectory/trunk/mxdirectory/modlink.php
XoopsModules/mxDirectory/trunk/mxdirectory/mylistings.php
XoopsModules/mxDirectory/trunk/mxdirectory/print.php
XoopsModules/mxDirectory/trunk/mxdirectory/ratelink.php
XoopsModules/mxDirectory/trunk/mxdirectory/singlelink.php
XoopsModules/mxDirectory/trunk/mxdirectory/sql/mysql.sql
XoopsModules/mxDirectory/trunk/mxdirectory/submit.php
XoopsModules/mxDirectory/trunk/mxdirectory/templates/xdir_savings.html
XoopsModules/mxDirectory/trunk/mxdirectory/viewalpha.php
XoopsModules/mxDirectory/trunk/mxdirectory/viewcat.php
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/admin/coupon.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/admin/coupon.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/admin/coupon.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -35,7 +35,7 @@
//In html templates $mydirname = Smarty variable <{$smartydir}>
//$mydirname = $xoopsModule->getVar('dirname');
-
+include_once "admin_header.php";
xoops_cp_header();
include 'functions.php';
//adminmenu(-1);
@@ -134,7 +134,7 @@
}
$output .= "<tr class='".$class."'>
<td>";
- $output .= '<a href="'.XOOPS_URL.'/modules/' .$mydirname. '/addcoupon.php?couponid='.$coupon['couponid'].'"><img src="'.XOOPS_URL.'/modules/' .$mydirname. '/images/editicon.gif" alt="'._MD_EDITCOUPON.'" /></a>
+ $output .= '<a href="'.XOOPS_URL.'/modules/' .$mydirname. '/addcoupon.php?couponid='.$coupon['couponid'].'"><img src="'. $pathIcon16 .'/edit.png"'.' alt="'._MD_EDITCOUPON.'" /></a>
<a href="'.XOOPS_URL.'/modules/' .$mydirname. '/singlelink.php?lid='.$coupon['lid'].'">'.$coupon['linkTitle'].'</a><br />
<br />
'._MD_PUBLISHEDON.' '.$coupon['publish'];
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/admin/main.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/admin/main.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/admin/main.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -92,7 +92,7 @@
echo"<span style='font-size:xx-small;'><table class=\"outer\" cellpadding=\"0\" cellspacing=\"1\" width=\"100%\"><tr class=\"head\"><td width=\"12%\" >"._MI_XDIR_PREMIUM_ACTV."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_ON."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_SLLI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_SLSLI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_SLLF."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_CALI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_CALF."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_LOLI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_LOLF."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_LLSLI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_LLCSLI."</td><td width=\"8%\">"._MI_XDIR_PREMIUM_UON."</td></tr></table></span>";
reset($actvlvls);
while (list($key, $val) = each($actvlvls)) {
- $actvopts = getpremopts($key);
+ $actvopts = getPremiumOptions($key);
echo"<span style='font-size:xx-small;'><table class=\"outer\" width=\"100%\"><tr class=\"even\"><td width=\"12%\" >$val</td>";
while (list ($okey, $oval) = each($actvopts)){
echo"<td width=\"8%\" ><div style=\"text-align: center;\">$oval</div></td>";
@@ -917,7 +917,7 @@
$totalmodrequests = $xoopsDB->getRowsNum($result);
echo "<table>";
echo "<tr><td colspan='2' align='left'><h4>"._MD_WEBLINKSCONF."</h4></td></tr>";
-// echo "<table><tr><td valign=top width=45%>";
+// echo "<table><tr><td valign=top width=45 >";
if ( $totalmodrequests > 0 ) {
@@ -979,9 +979,9 @@
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSCITY , "<span style='font-size:xx-small;'>".$origcity."</span>"));
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSSTATE , "<span style='font-size:xx-small;'>".$origstate."</span>"));
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSCOUNTRY , "<span style='font-size:xx-small;'>".$origcountry."</span>"));
- $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSMFHRS , "<span style='font-size:xx-small;'>".ampm($origmfhrs)."</span>"));
- $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSSATHRS , "<span style='font-size:xx-small;'>".ampm($origsathrs)."</span>"));
- $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSSUNHRS , "<span style='font-size:xx-small;'>".ampm($origsunhrs)."</span>"));
+ $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSMFHRS , "<span style='font-size:xx-small;'>".displayTime($origmfhrs)."</span>"));
+ $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSSATHRS , "<span style='font-size:xx-small;'>".displayTime($origsathrs)."</span>"));
+ $listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSSUNHRS , "<span style='font-size:xx-small;'>".displayTime($origsunhrs)."</span>"));
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSPHONE , "<span style='font-size:xx-small;'>".$origphone."</span>"));
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSFAX , "<span style='font-size:xx-small;'>".$origfax."</span>"));
$listmodreqorigform->addElement(new XoopsFormLabel(_MD_BUSMOBILE , "<span style='font-size:xx-small;'>".$origmobile."</span>"));
@@ -1009,9 +1009,9 @@
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSCITY , "<span style='font-size:xx-small;'>".$city."</span>"));
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSSTATE , "<span style='font-size:xx-small;'>".$state."</span>"));
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSCOUNTRY , "<span style='font-size:xx-small;'>".$country."</span>"));
- $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSMFHRS , "<span style='font-size:xx-small;'>".ampm($mfhrs)."</span>"));
- $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSSATHRS , "<span style='font-size:xx-small;'>".ampm($sathrs)."</span>"));
- $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSSUNHRS , "<span style='font-size:xx-small;'>".ampm($sunhrs)."</span>"));
+ $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSMFHRS , "<span style='font-size:xx-small;'>".displayTime($mfhrs)."</span>"));
+ $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSSATHRS , "<span style='font-size:xx-small;'>".displayTime($sathrs)."</span>"));
+ $listmodreqform->addElement(new XoopsFormLabel(_MD_BUSSUNHRS , "<span style='font-size:xx-small;'>".displayTime($sunhrs)."</span>"));
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSPHONE , "<span style='font-size:xx-small;'>".$phone."</span>"));
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSFAX , "<span style='font-size:xx-small;'>".$fax."</span>"));
$listmodreqform->addElement(new XoopsFormLabel(_MD_BUSMOBILE , "<span style='font-size:xx-small;'>".$mobile."</span>"));
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_cats.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_cats.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_cats.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -35,10 +35,13 @@
* $options[1] = Horizontal Menu (1=yes, 0=no)
* Output : Returns the links to categories
******************************************************************************/
+$mydirname = basename ( dirname(dirname( __FILE__ ) ) ) ;
+//include XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
+
function b_xdir_categories($options) {
//include_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
- $mydirname = basename ( dirname(dirname( __FILE__ ) ) ) ;
- include XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
+// $mydirname = basename ( dirname(dirname( __FILE__ ) ) ) ;
+// include XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
global $xoopsDB, $xoopModuleConfig;
$mydirname = basename ( dirname( dirname( __FILE__ ) ) ) ;
@@ -72,8 +75,8 @@
function b_xdir_cat_edit($options) {
//include_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
- $mydirname = basename ( dirname(dirname( __FILE__ ) ) ) ;
- include_once XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
+// $mydirname = basename ( dirname(dirname( __FILE__ ) ) ) ;
+// include_once XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
global $xoopsDB, $xoopModuleConfig;
$mytree = new MxdirectoryTree($xoopsDB->prefix("xdir_cat"),"cid","pid");
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_coup.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_coup.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/blocks/xdir_coup.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -53,7 +53,7 @@
$mydirname = (basename ( dirname ( dirname( __FILE__ ) ) , "a" ) ) ;
include_once XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/coupon.php";
$myts =& MyTextSanitizer::getInstance();
- include_once XOOPS_ROOT_PATH."/modules/" . $mydirname . "/header.php";
+// include_once XOOPS_ROOT_PATH."/modules/" . $mydirname . "/header.php";
$coupon_handler = new XdirectoryCouponHandler($xoopsDB);
$block = array();
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/brokenlink.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/brokenlink.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/brokenlink.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -61,7 +61,7 @@
$sql = sprintf("INSERT INTO %s (reportid, lid, sender, ip) VALUES (%u, %u, %u, '%s')", $xoopsDB->prefix("xdir_broken"), $newid, $lid, $sender, $ip);
$xoopsDB->query($sql) or exit();
$tags = array();
- $tags['BROKENREPORTS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=listBrokenLinks';
+ $tags['BROKENREPORTS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=listBrokenLinks';
$notification_handler =& xoops_gethandler('notification');
$notification_handler->triggerEvent('global', 0, 'link_broken', $tags);
redirect_header("index.php",2,_MD_THANKSFORINFO);
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/include/functions.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/include/functions.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/include/functions.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -243,7 +243,7 @@
return $letterchoice;
}
//Display Time
-function ampm($value){
+function displayTime($value){
global $xoopsModuleConfig;
// $valckr = ($value = "0") ? _MD_UNKNOWN : $value ;
@@ -275,30 +275,31 @@
$clocktype = ($clocktype < 1 ) ? $clocktype = $timearray : $clocktype = $ampmarray ;
//display specific
- $value = ( ($value !== '') && ($closestrip !== '25:00') && ($closestrip !== '26:00') && ($openstrip !== '25:00') && ($openstrip !== '26:00') )? ($clocktype[$openstrip].' - '.$clocktype[$closestrip]) : $value ;
+ $value = ( ($value !== '') && ($closestrip !== '25:00') && ($closestrip !== '26:00') && ($openstrip !== '25:00') && ($openstrip !== '26:00') )? ((isset($clocktype[$openstrip])?$clocktype[$openstrip]:0).' - '.(isset($clocktype[$closestrip])?$clocktype[$closestrip]:0)) : $value ;
$value = ( ( $openstrip == '25:00') || ($closestrip == '25:00')) ? _MD_BUSCLOSED : $value ;
$value = ( ( $openstrip == '26:00') || ($closestrip == '26:00')) ? _MD_ALOPEN : $value ;
- $value = ( ($value == ' - ') || ( $openstrip == ' - ') || ($closestrip == ' - ') ) ? _MD_UNKNOWN : $value ;
+ $value = ( ($value == ' - ') || ( $openstrip == ' - ') || ($closestrip == ' - ') ) ? _MD_UNKNOWN : $value ;
$value = ( ($value == '-') || ($value == '') || ( $osckr == '-') || ($csckr == '-') ) ? _MD_UNKNOWN : $value ;
return $value;
}
//Level Options Arrayer
-function getpremopts($olvl) {
- global $xoopsModuleConfig, $mydirname;
- $mylvlopt = ($xoopsModuleConfig['premium_listing'.$olvl.'opts']);
+function getPremiumOptions($olvl)
+{
+ global $xoopsModuleConfig, $mydirname;
+ $myLevelOption = ($xoopsModuleConfig['premium_listing' . $olvl . 'opts']);
//$nl = intval(count($mylvlopt));
// $nlvls with 11
- for ($opi = 1; $opi < 12; $opi++) {
- $premopt = (in_array($opi, $mylvlopt)) ? '1' : '0';
- $lvloptions[$opi] = $premopt;
- if ($lvloptions['1'] == '0'){
- array_fill(2, 9, '0');
- $opi = 12;
- }
-
- }
- return $lvloptions;
+ for ($opi = 1; $opi < 12; $opi++) {
+ $premiumOption = (in_array($opi, $myLevelOption)) ? '1' : '0';
+ $levelOptions[$opi] = $premiumOption;
+ if ($levelOptions['1'] == '0') {
+ array_fill(2, 9, '0');
+ $opi = 12;
+ }
+
+ }
+ return $levelOptions;
}
//Level Select Builder
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/include/waiting.plugin.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/include/waiting.plugin.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/include/waiting.plugin.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -32,7 +32,7 @@
// list($block['pendingnum']) = $xoopsDB->fetchRow($result);
// $block['lang_linkname'] = _PI_WAITING_EVENTS ;
list($cnt) = $xoopsDB->fetchRow($result);
- $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/index.php?op=listNewLinks",
+ $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/main.php?op=listNewLinks",
"pendingnum" => $cnt,
"lang_linkname" => _PI_WAITING_SUBMITTED );
}
@@ -42,14 +42,14 @@
// list($block['pendingnum']) = $xoopsDB->fetchRow($result);
// $block['lang_linkname'] = _PI_WAITING_EVENTS ;
list($cnt) = $xoopsDB->fetchRow($result);
- $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/index.php?op=listModReq",
+ $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/main.php?op=listModReq",
"pendingnum" => $cnt,
"lang_linkname" => _PI_WAITING_MODREQS );
}
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix('xdir_broken'));
if ( $result ) {
list($cnt) = $xoopsDB->fetchRow($result);
- $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/index.php?op=listBrokenLinks",
+ $block[] = array("adminlink" => XOOPS_URL."/modules/".$mydirname."/admin/main.php?op=listBrokenLinks",
"pendingnum" => $cnt,
"lang_linkname" => _PI_WAITING_BROKENS );
}
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/index.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/index.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/index.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -36,7 +36,8 @@
include XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
//include 'include/functions.php';
-global $xoopModuleConfig;
+global $xoopModuleConfig, $xoopsModule;
+$pathIcon16 = $xoopsModule->getInfo('icons16');
/* // EVU CODE FIX - To make it work using PHP5
function add_header($tpl_source, &$xoopsTpl)
@@ -147,9 +148,9 @@
//Nice arrays for smarty selects
//include_once "include/functions.php";
-$mfhrs = ampm($mfhrs);
-$sathrs = ampm($sathrs);
-$sunhrs = ampm($sunhrs);
+$mfhrs = displayTime($mfhrs);
+$sathrs = displayTime($sathrs);
+$sunhrs = displayTime($sunhrs);
$bizhrs = array('1' => _MD_BUSMFHRSSHORT.$mfhrs,'2' => _MD_BUSSATHRSSHORT.$sathrs,'3' => _MD_BUSSUNHRSSHORT.$sunhrs,);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
@@ -157,10 +158,10 @@
$is_owner = (!empty($xoopsUser) && ($xoopsUser->getvar('uid') == $submitter)) ? '1' : null ;
-$lvlopts = getpremopts($premium);
+$lvlopts = getPremiumOptions($premium);
if ($isadmin) {
- $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
+ $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=modLink&lid='.$lid.'"><img src="'. $pathIcon16 .'/edit.png"'.' border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
} else {
$adminlink = '';
}
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/modlink.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/modlink.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/modlink.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -159,7 +159,7 @@
// and finally set the notification
//
$tags = array();
- $tags['MODIFYREPORTS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=listModReq';
+ $tags['MODIFYREPORTS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=listModReq';
$notification_handler =& xoops_gethandler('notification');
$notification_handler->triggerEvent('global', 0, 'link_modify', $tags);
redirect_header("index.php",2,_MD_THANKSFORINFO);
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/mylistings.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/mylistings.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/mylistings.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -31,7 +31,8 @@
include_once XOOPS_ROOT_PATH."/class/pagenav.php";
include_once "class/coupon.php";
-global $xoopsDB, $xoopsUser, $xoopsModuleConfig;
+global $xoopsDB, $xoopsUser, $xoopsModuleConfig, $xoopsModule;
+$pathIcon16 = $xoopsModule->getInfo('icons16');
$myts =& MyTextSanitizer::getInstance();// MyTextSanitizer object
$coupon_handler = new XdirectoryCouponHandler($xoopsDB);
@@ -62,7 +63,7 @@
if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
$isadmin = true;
- $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
+ $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=modLink&lid='.$lid.'"><img src="'. $pathIcon16 .'/edit.png"'.' border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
} else {
$adminlink = '';
$isadmin = false;
@@ -102,14 +103,14 @@
$is_owner = ($userid == $submitter) ? '1' : null ;
//Adding record related template items
-$mfhrs = ampm($mfhrs);
-$sathrs = ampm($sathrs);
-$sunhrs = ampm($sunhrs);
+$mfhrs = displayTime($mfhrs);
+$sathrs = displayTime($sathrs);
+$sunhrs = displayTime($sunhrs);
$bizhrs = array(_MD_BUSMFHRSSHORT.$mfhrs,_MD_BUSSATHRSSHORT.$sathrs,_MD_BUSSUNHRSSHORT.$sunhrs);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
$biznums = displaybiznums($bnums);
-$lvlopts = getpremopts($premium);
+$lvlopts = getPremiumOptions($premium);
if ($status == 0) {
$new = '';
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/print.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/print.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/print.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -54,9 +54,9 @@
$xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS);
}
- $mfhrs = ampm($mfhrs);
- $sathrs = ampm($sathrs);
- $sunhrs = ampm($sunhrs);
+ $mfhrs = displayTime($mfhrs);
+ $sathrs = displayTime($sathrs);
+ $sunhrs = displayTime($sunhrs);
$bizhrs = array( _MD_BUSMFHRSSHORT.$mfhrs, _MD_BUSSATHRSSHORT.$sathrs, _MD_BUSSUNHRSSHORT.$sunhrs);
$bnums = array(0=>$phone, 1=>$fax, 2=>$mobile, 3=>$home, 4=>$tollfree);
$biznums = displaybiznums($bnums);
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/ratelink.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/ratelink.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/ratelink.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -104,8 +104,8 @@
$xoopsOption['template_main'] = 'xdir_ratelink.html';
include XOOPS_ROOT_PATH."/header.php";
- $lid = intval($_GET['lid']);
- $cid = intval($_GET['cid']);
+ $lid = isset($_GET['lid']) ? intval($_GET['lid']) : 0;
+ $cid = isset($_GET['cid']) ? intval($_GET['cid']) : 0;
$result=$xoopsDB->query("select title from ".$xoopsDB->prefix("xdir_links")." where lid=$lid");
list($title) = $xoopsDB->fetchRow($result);
$xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title)));
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/singlelink.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/singlelink.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/singlelink.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -34,6 +34,9 @@
include_once XOOPS_ROOT_PATH."/modules/$mydirname/class/coupon.php";
//include_once "include/functions.php";
+global $xoopsModule;
+$pathIcon16 = $xoopsModule->getInfo('icons16');
+
$myts =& MyTextSanitizer::getInstance();// MyTextSanitizer object
//include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
$mydirname = basename ( dirname( __FILE__ ) ) ;
@@ -57,7 +60,7 @@
//Pretty Page Titles
$title="";
-$lvlopts = getpremopts($premium);
+$lvlopts = getPremiumOptions($premium);
if($cid>0)
{
$show = 0;
@@ -83,7 +86,7 @@
$admcont = '';
if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
$xoopsTpl->assign('admin', 1);
- $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
+ $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=modLink&lid='.$lid.'"><img src="'. $pathIcon16 .'/edit.png"'.' border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
if (trim($admname) != '') {
$admcont = trim($admname)." - ";
$admcont .= trim($admnumb)== '' ? _MD_UNKNOWN : trim($admnumb);
@@ -95,16 +98,16 @@
$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
if ($xoopsModuleConfig['useshots'] == 1) {
- $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['logo_maximagewidth']);
- $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['logo_maximagewidth'] + 10);
+ $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['logo_maximgwidth']);
+ $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['logo_maximgwidth'] + 10);
$xoopsTpl->assign('show_screenshot', true);
$xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS);
}
//include_once "include/functions.php";
-$mfhrs = ampm($mfhrs);
-$sathrs = ampm($sathrs);
-$sunhrs = ampm($sunhrs);
+$mfhrs = displayTime($mfhrs);
+$sathrs = displayTime($sathrs);
+$sunhrs = displayTime($sunhrs);
$bizhrs = array('1' => _MD_BUSMFHRSSHORT.$mfhrs,'2' => _MD_BUSSATHRSSHORT.$sathrs,'3' => _MD_BUSSUNHRSSHORT.$sunhrs,);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/sql/mysql.sql
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/sql/mysql.sql 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/sql/mysql.sql 2013-08-06 19:23:58 UTC (rev 11886)
@@ -79,7 +79,7 @@
# --------------------------------------------------------
#
-# Table structure for table `xdir_mod`
+# Table structure for table `xdir_mod`, holding link modifications to be reviewed
#
CREATE TABLE `xdir_mod` (
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/submit.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/submit.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/submit.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -189,7 +189,7 @@
$notification_handler->triggerEvent('category', $cid, 'new_link', $tags);
redirect_header("index.php",2,_MD_RECEIVED."<br />"._MD_ISAPPROVED."");
}else{
- $tags['WAITINGLINKS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=listNewLinks';
+ $tags['WAITINGLINKS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=listNewLinks';
$notification_handler->triggerEvent('global', 0, 'link_submit', $tags);
$notification_handler->triggerEvent('category', $cid, 'link_submit', $tags);
if ($notify) {
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/templates/xdir_savings.html
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/templates/xdir_savings.html 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/templates/xdir_savings.html 2013-08-06 19:23:58 UTC (rev 11886)
@@ -10,7 +10,7 @@
<td>
<div><{if $coupon.logourl}> <img src="<{$xoops_url}>/modules/<{$smartydir}>/images/shots/<{$coupon.logourl}>" alt="<{$coupon.linkTitle}> <{$smarty.const._MD_LOGO}>" border="0" />
<{/if}>
- <div> <{if $admin}> <a href="<{$xoops_url}>/modules/<{$smartydir}>/addcoupon.php?couponid=<{$coupon.couponid}>"><img src="<{$xoops_url}>/modules/<{$smartydir}>/images/editicon.gif" alt="<{$smarty.const._MD_EDITCOUPON}>" /></a>
+ <div> <{if $admin}> <a href="<{$xoops_url}>/modules/<{$smartydir}>/addcoupon.php?couponid=<{$coupon.couponid}>"><img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._MD_EDITCOUPON}>" /></a>
<{/if}> <a href="<{$xoops_url}>/modules/<{$smartydir}>/singlelink.php?lid=<{$coupon.lid}>" class="c_title"><{$coupon.linkTitle}></a><br />
<span class="c_body"><{$coupon.address}><br />
<{if $coupon.address2}> <{$coupon.address2}><br />
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/viewalpha.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/viewalpha.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/viewalpha.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -37,7 +37,8 @@
include XOOPS_ROOT_PATH."/modules/" . $mydirname . "/class/mxdirectorytree.php";
include_once XOOPS_ROOT_PATH."/class/pagenav.php";
-global $xoopsDB, $xoopModuleConfig;
+global $xoopsDB, $xoopModuleConfig, $xoopsModule;
+$pathIcon16 = $xoopsModule->getInfo('icons16');
include_once XOOPS_ROOT_PATH."/modules/$mydirname/class/coupon.php";
$mytree = new MxdirectoryTree($xoopsDB->prefix("xdir_cat"),"cid","pid");
@@ -105,20 +106,20 @@
while(list($lid, $cid, $ltitle, $address, $address2, $city, $state, $zip, $country, $mfhrs, $sathrs, $sunhrs, $phone, $fax, $mobile, $home, $tollfree, $email, $url, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $premium, $description) = $xoopsDB->fetchRow($result)) {
- $lvlopts = getpremopts($premium);
+ $lvlopts = getPremiumOptions($premium);
$pcounter = intval($lvlopts['9']);
$pcount = ( $pcounter != 0 ) ? ($pcount + 1) : $pcount;
if ($isadmin) {
- $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
+ $adminlink = '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=modLink&lid='.$lid.'"><img src="'. $pathIcon16 .'/edit.png"'.' border="0" alt="'._MD_EDITTHISLINK.'" /></a>';
} else {
$adminlink = '';
}
// include_once "include/functions.php";
- $mfhrs = ampm($mfhrs);
- $sathrs = ampm($sathrs);
- $sunhrs = ampm($sunhrs);
+ $mfhrs = displayTime($mfhrs);
+ $sathrs = displayTime($sathrs);
+ $sunhrs = displayTime($sunhrs);
$bizhrs = array('1' => _MD_BUSMFHRSSHORT.$mfhrs,'2' => _MD_BUSSATHRSSHORT.$sathrs,'3' => _MD_BUSSUNHRSSHORT.$sunhrs,);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
$biznums = displaybiznums($bnums);
Modified: XoopsModules/mxDirectory/trunk/mxdirectory/viewcat.php
===================================================================
--- XoopsModules/mxDirectory/trunk/mxdirectory/viewcat.php 2013-08-06 18:58:57 UTC (rev 11885)
+++ XoopsModules/mxDirectory/trunk/mxdirectory/viewcat.php 2013-08-06 19:23:58 UTC (rev 11886)
@@ -38,7 +38,8 @@
include_once XOOPS_ROOT_PATH."/class/pagenav.php";
include_once XOOPS_ROOT_PATH."/modules/$mydirname/class/coupon.php";
-global $xoopsDB, $xoopModuleConfig;
+global $xoopsDB, $xoopModuleConfig, $xoopsModule;
+$pathIcon16 = $xoopsModule->getInfo('icons16');
$mytree = new MxdirectoryTree($xoopsDB->prefix("xdir_cat"),"cid","pid");
$orderby = (isset($_GET['orderby'])) ? convertorderbyin($_GET['orderby']) : "title ASC";
@@ -165,22 +166,23 @@
}
while(list($lid, $cid, $ltitle, $address, $address2, $city, $state, $zip, $country, $mfhrs, $sathrs, $sunhrs, $phone, $fax, $mobile, $home, $tollfree, $email, $url, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $premium, $description) = $xoopsDB->fetchRow($result)) {
- $lvlopts = getpremopts($premium);
- $pcounter = intval($lvlopts['9']);
+ $lvlopts = getPremiumOptions($premium);
+// $pcounter = intval($lvlopts['9']);
+ $pcounter = isset($lvlopts['9']) ? intval($lvlopts['9']) : 0;
$pcount = ( $pcounter !=0 ) ? ($pcount + 1) : $pcount;
// include_once "include/functions.php";
- $mfhrs = ampm($mfhrs);
- $sathrs = ampm($sathrs);
- $sunhrs = ampm($sunhrs);
+ $mfhrs = displayTime($mfhrs);
+ $sathrs = displayTime($sathrs);
+ $sunhrs = displayTime($sunhrs);
$bizhrs = array('1' => _MD_BUSMFHRSSHORT.$mfhrs,'2' => _MD_BUSSATHRSSHORT.$sathrs,'3' => _MD_BUSSUNHRSSHORT.$sunhrs,);
$bnums = array($phone,$fax,$mobile,$home,$tollfree);
$biznums = displaybiznums($bnums);
$is_owner = (!empty($xoopsUser) && ($xoopsUser->getvar('uid') == $submitter)) ? '1' : null ;
- $adminlink = ($isadmin) ? '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=modLink&lid='.$lid.'"><img src="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/images/editicon.gif" border="0" alt="'._MD_EDITTHISLINK.'" /></a>' : '';
+ $adminlink = ($isadmin) ? '<a href="'.XOOPS_URL.'/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php?op=modLink&lid='.$lid.'"><img src="'. $pathIcon16 .'/edit.png"'.' border="0" alt="'._MD_EDITTHISLINK.'" /></a>' : '';
$votestring = ($votes == 1) ? _MD_ONEVOTE : sprintf(_MD_NUMVOTES,$votes);
$path = $mytree->getPathFromId($cid, "title");
|