"; $result = $xoopsDB->query("select cid, title, adress, zip, city, country, phone, mobile, fax, contemail, opentime, url, otwarte, logourl from ".$xoopsDB->prefix("addresses_links")." where lid=$lid") or $eh->show("0013"); echo ""._MD_MODLINK." "; list($cid, $title, $adress, $zip, $city, $country, $phone, $mobile, $fax, $contemail, $opentime, $url, $otwarte, $logourl) = $xoopsDB->fetchRow($result); $title = $myts->makeTboxData4Edit($title); $adress = $myts->makeTboxData4Edit($adress); $zip = $myts->makeTboxData4Edit($zip); $city = $myts->makeTboxData4Edit($city); $country = $myts->makeTboxData4Edit($country); $phone = $myts->makeTboxData4Edit($phone); $mobile = $myts->makeTboxData4Edit($mobile); $fax = $myts->makeTboxData4Edit($fax); $contemail = $myts->makeTboxData4Edit($contemail); $opentime = $myts->makeTareaData4Edit($opentime); $url = $myts->makeTboxData4Edit($url); // $url = urldecode($url);
$otwarte = $myts->makeTboxData4Edit($otwarte);
$logourl = $myts->makeTboxData4Edit($logourl); // $logourl = urldecode($logourl); $result2 = $xoopsDB->query("select description from ".$xoopsDB->prefix("addresses_text")." where lid=$lid"); list($description)=$xoopsDB->fetchRow($result2); $GLOBALS['description'] = $myts->makeTareaData4Edit($description); echo ""; echo "
\n"; echo ""; //SHINE need to change later // echo " "; //echo " "; echo "\n";
echo "\n"; echo myTextForm("index.php?op=delLink&lid=".$lid , _MD_DELETE); //SHINE need to change later echo " | \n"; echo myTextForm("index.php?op=addressesConfigMenu", _MD_CANCEL); echo " | \n"; echo " ";
$result5=$xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("addresses_votedata")." WHERE lid = $lid"); list($totalvotes) = $xoopsDB->fetchRow($result5); echo "\n"; echo ""; printf(_MD_TOTALVOTES,$totalvotes); echo "
| \n"; // Show Registered Users Votes $result5=$xoopsDB->query("SELECT ratingid, ratinguser, rating, ratinghostname, ratingtimestamp FROM ".$xoopsDB->prefix("addresses_votedata")." WHERE lid = $lid AND ratinguser >0 ORDER BY ratingtimestamp DESC"); $votes = $xoopsDB->getRowsNum($result5); echo "
"; printf(_MD_USERTOTALVOTES,$votes); echo "
| \n"; echo "" ._MD_USER." | " ._MD_IP." | " ._MD_RATING." | " ._MD_USERAVG." | " ._MD_TOTALRATE." | " ._MD_DATE." | " ._MD_DELETE." | \n"; if ($votes == 0){ echo "" ._MD_NOREGVOTES."
| \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("addresses_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); $ratingusername = XoopsUser::getUnameFromId($ratinguser); echo "".$ratingusername." | ".$ratinghostname." | $rating | ".$useravgrating." | ".$uservotes." | ".$ratingtimestamp." | ".myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid", "X")." | \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("addresses_votedata")." WHERE lid = $lid AND ratinguser = 0 ORDER BY ratingtimestamp DESC"); $votes = $xoopsDB->getRowsNum($result5); echo "
"; printf(_MD_ANONTOTALVOTES,$votes); echo "
| \n"; echo "" ._MD_IP." | " ._MD_RATING." | " ._MD_DATE." | " ._MD_DELETE." |
"; if ( $votes == 0 ) { echo "" ._MD_NOUNREGVOTES."
| "; } $x=0; $colorswitch="dddddd"; while ( list($ratingid, $rating, $ratinghostname, $ratingtimestamp)=$xoopsDB->fetchRow($result5) ) { $formatted_date = formatTimestamp($ratingtimestamp); echo "$ratinghostname | $rating | $formatted_date | ".myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid", "X")." | "; $x++; if ( $colorswitch == "dddddd" ) { $colorswitch="ffffff"; } else { $colorswitch="dddddd"; } } echo "
| \n"; echo " \n"; echo" |