1
slitzx
Re: Error in ExtGallery
  • 2010/1/23 17:15

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


can anyone get their slideshow working, as mine isn't after i downloaded the mootools and edit it to my theme.html



2
slitzx
Google map module
  • 2010/1/20 17:55

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


hi, i am currently using googlemaps module and mxdirectory. I am trying to link the map to the id of a particular listing i posted in with my mxdirectory, however, i had faced some troubles. i tried to add in a drop down menu to get the title when the admin wants to add a new point, however, the result is not being uploaded to sqldb.
Resized Image

as attached the lid is blank, please help me =)
this is the add point page
Resized Image

//Add in a new point
function pointAdd()
{
    global 
$xoopsDB$xoopsModule$xoopsModuleConfig;
    
    
$result2 $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("gmap_category")."");
    list(
$numrows2) = $xoopsDB->fetchRow($result2);
    if ( 
$numrows2 ) {    
        
$result1 $xoopsDB->query("select map_id, name from ".$xoopsDB->prefix("gmap_category")."");
            
$i 0;
        while (
$array $xoopsDB->fetchArray($result1)) {
            
$entry[$i]['map_id']   = $array['map_id'];
            
$entry[$i]['name']   = $array['name'];
            
$i++;
        }  
        
xoops_cp_header();
        echo
"<script src="http://maps.google.com/maps?file=api&v=2.x&key=".$xoopsModuleConfig['api']."" type="text/javascript"></script >n";
        
echo"<script type="text/javascript">n";
        echo
"//<![CDATA[ n";
        echo
"function loadMap(){n";
        
//echo"function GPoint2(x,y) { return new GLatLng(y,x); }n";
        
echo"var map = new GMap2(document.getElementById("map"));n";
        echo
"map.addControl(new GLargeMapControl());n";
        echo
"map.addControl(new GMapTypeControl());n";
        echo
"map.setCenter(new GLatLng(0, 0), 1);n";
        echo
"GEvent.addListener(map, "click", function(overlay, point){n";
        echo
"map.clearOverlays();n";
        
//echo"GEvent.addListener(map, 'zoomend', function() {n";
        
echo"document.getElementById("zoom").value = map.getZoom();n";
        
//echo"});n";    
        
echo"if (point) {n";
        echo
"map.addOverlay(new GMarker(point,{draggable:true}));n";
        echo
"map.panTo(point);n";
        echo
"lat = point.y;n";
        echo
"lon = point.x;n";
        echo
"document.getElementById("lat").value = lat;n";
        echo
"document.getElementById("lon").value = lon;n";
        echo
"}n";
        echo
"});n";
        echo
"}n";
        echo
"// arrange for our onload handler to 'listen' for onload eventsn";
        echo
"if (window.attachEvent) {n";
        echo
"window.attachEvent("onload", function() {n";
        echo
"loadMap();    // Internet Explorern";
        echo
"});n";
        echo
"} else {n";
        echo
"window.addEventListener("load", function() {n";
        echo
"loadMap(); // Firefox and standard browsersn";
        echo
"}, false);n";
        echo
"}n";
        echo
"//]]>n";
        echo
"</script >n";

        echo
"<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>"._MD_ADDNEWPOINT."</th></tr>";
            echo 
"<form method=post action="index.php">n";
        echo 
"<tr valign='top' align='center'><td class='head' colspan='2'><div id='map' style='height: 400px'></div ></td></tr>";
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_LOCATION."</td>";
        echo 
"<td class='even'><input type=text name=title size=50 maxlength=100></td>";    
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_SITETITLE."</td>";//
         
echo "<td class='even'><select name="._MD_SITETITLE."   size='1' ><";
         
$getmxlid=$xoopsDB->query("select lid, title from ".$xoopsDB->prefix("xdir_links")."");
        while (
$mxlink $xoopsDB->fetchArray($getmxlid) ) {
    
$lid=$mxlink['lid'];
    
$title2=$mxlink['title'];
    
        echo 
"<option value=".$lid." selected=".$lid.">".$title2.$lid."</option>";
                    } echo  
" </select></td>";//
        
echo "<tr valign='top' align='left'><td class='head'>"._MD_LONGITUDE."</td>";
                    echo 
"<td class='even'><input id=lon type=text name=lon size=50 maxlength=250></td><tr>n";    
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_LATITUDE."</td>";
            echo 
"<td class='even'><input id=lat type=text name=lat size=50 maxlength=250></td><tr>n";    
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_ZOOM."</td>";
            echo 
"<td class='even'><input id=zoom type=text name=zoom size=50 maxlength=250></td><tr>n";    
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_CATEGORYC."</td>";
            echo 
"<td class='even'><select size='1' name='category'>";
        
$count_msg count($entry);
        for ( 
$i 0$i $count_msg$i++ ) {
            echo 
"<option value='".$entry[$i]['map_id']."'>".$entry[$i]['name']."</option>";
        }
        echo 
"</select></td></tr>n";    
        echo 
"<tr valign='top' align='left'><td class='head'>"._MD_DESCRIPTIONC."</td>";
        echo 
"<td class='even'>";
        
xoopsCodeTarea("description",60,8);
        
xoopsSmilies("description");
            echo 
"</td></tr>n";
        echo 
"<input type="hidden" name="op" value="pointInsert"></input>n";
        
        echo 
"<tr valign='top' align='left'><td class='head'></td><td class='even'><input type='submit' class='formButton' name='post'  id='post' value='"._MD_ADD."' accesskey="s" /></form></td></tr></table>";        
        
xoops_cp_footer();
       }else{
        
redirect_header("index.php?op=catAdd",1,_MD_NOCATSADD);
    }
}

//Insert the new point into the DB
function pointInsert()
{
    global 
$xoopsConfig$xoopsDB$myts$xoopsUser$xoopsModule$eh;
    
$title $myts->makeTboxData4Save($_POST["title"]);
    
$lat $myts->makeTboxData4Save($_POST["lat"]);
    
$lon $myts->makeTboxData4Save($_POST["lon"]);
    
$zoom $myts->makeTboxData4Save($_POST["zoom"]);
    
$category $myts->makeTboxData4Save($_POST["category"]);
    
$description $myts->makeTareaData4Save($_POST["description"]);
    
$lid $myts->makeTboxData4Save($_POST["lid"]);
    
$submitter $xoopsUser->uid();
    
$date time();
    
$errormsg '';
    
// Check if Title exist
    
    
if ( $title == "" ) {
        
$errormsg .= "<h4 style='color: #ff0000'>";
        
$errormsg .= _MD_ERRORTITLE."</h4>";
        
$error =1;
    }

    
// Check if Description exist
    
if ( $description == "" ) {
        
$errormsg .= "<h4 style='color: #ff0000'>";
        
$errormsg .= _MD_ERRORDESC."</h4>";
        
$error =1;
    }
    if ( 
$error == ) {
        
xoops_cp_header();
        echo 
$errormsg;
        
xoops_cp_footer();
        exit();
    }
    list(
$order) = $xoopsDB->fetchRow($xoopsDB->query("SELECT MAX(`order`) FROM ".$xoopsDB->prefix("gmap_points")." WHERE `map_id` = ".$category));
    
$order++;
    
$sql "INSERT INTO ".$xoopsDB->prefix("gmap_points")." (`map_id` , `lat` , `lon` , `title` , `html` , `zoom` , `submitter` , `status` , `date`, `order`, `lid`) VALUES ('$category', '$lat', '$lon', '$title', '$description', '$zoom','$submitter', '1', '$date', '$order', '$lid')";
    
$xoopsDB->query($sql) or $eh->show("0013");
    if ( 
$newid == ) {
    
$newid $xoopsDB->getInsertId();
    }
    
redirect_header("index.php?op=linksConfigMenu",1,_MD_NEWPOINTADDED);
}

thank you very much !



3
slitzx
Re: mxdirectory help
  • 2010/1/14 17:28

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


okay, i have successfully modified my fields and forms and can proceed with listing, however, i am stuck with the rating portion as
the rating is not working for me
<?php

include "header.php";
include_once 
XOOPS_ROOT_PATH."/class/module.errorhandler.php";
$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object

if (!empty($HTTP_POST_VARS['submit'])) {
    
$eh = new ErrorHandler//ErrorHandler object
    
if(empty($xoopsUser)){
        
$ratinguser 0;
    }else{
        
$ratinguser $xoopsUser->getVar('uid');
    }

       
//Make sure only 1 anonymous from an IP in a single day.
       
$anonwaitdays 1;
       
$ip getenv("REMOTE_ADDR");
    
$lid intval($HTTP_POST_VARS['lid']);
    
$cid intval($HTTP_POST_VARS['cid']);
    
$rating intval($HTTP_POST_VARS['rating']);

       
// Check if Rating is Null
       
if ($rating=="--") {
        
redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING);
        exit();
       }

       
// Check if Link POSTER is voting (UNLESS Anonymous users allowed to post)
       
if ($ratinguser != 0) {
           
$result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("xdir_links")." where lid=$lid");
           while(list(
$ratinguserDB) = $xoopsDB->fetchRow($result)) {
               if (
$ratinguserDB == $ratinguser) {
                
redirect_header("index.php",4,_MD_CANTVOTEOWN);
                exit();
              }
           }

        
// Check if REG user is trying to vote twice.
           
$result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("xdir_votedata")." where lid=$lid");
           while(list(
$ratinguserDB) = $xoopsDB->fetchRow($result)) {
               if (
$ratinguserDB == $ratinguser) {
                
redirect_header("index.php",4,_MD_VOTEONCE2);
                exit();
               }
          }

       } else {

           
// Check if ANONYMOUS user is trying to vote more than once per day.
        
$yesterday = (time()-(86400 $anonwaitdays));
           
$result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("xdir_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday");
           list(
$anonvotecount) = $xoopsDB->fetchRow($result);
           if (
$anonvotecount 0) {
            
redirect_header("index.php",4,_MD_VOTEONCE2);
            exit();
           }
       }
    if(
$rating 10){
        
$rating 10;
    }

    
//All is well.  Add to Line Item Rate to DB.
    
$newid $xoopsDB->genId($xoopsDB->prefix("xdir_votedata")."_ratingid_seq");
    
$datetime time();
    
$sql sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)"$xoopsDB->prefix("xdir_votedata"), $newid$lid$ratinguser$rating$ip$datetime);
    
$xoopsDB->query($sql) or $eh->show("0013");

    
//All is well.  Calculate Score & Add to Summary (for quick retrieval & sorting) to DB.
    
updaterating($lid);
    
$ratemessage _MD_VOTEAPPRE."<br />".sprintf(_MD_THANKURATE,$xoopsConfig[sitename]);
    
redirect_header("index.php",2,$ratemessage);
    exit();

} else {

    
$xoopsOption['template_main'] = 'xdir_ratelink.html';
    include 
XOOPS_ROOT_PATH."/header.php";
    
$lid intval($_GET['lid']);
    
$cid intval($_GET['cid']);
    
$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)));
    
$xoopsTpl->assign('lang_voteonce'_MD_VOTEONCE);
    
$xoopsTpl->assign('lang_ratingscale'_MD_RATINGSCALE);
    
$xoopsTpl->assign('lang_beobjective'_MD_BEOBJECTIVE);
    
$xoopsTpl->assign('lang_donotvote'_MD_DONOTVOTE);
    
$xoopsTpl->assign('lang_rateit'_MD_RATEIT);
    
$xoopsTpl->assign('lang_cancel'_CANCEL);
    
//Smarty directory autodetect
    
$smartydir $xoopsModule->getVar('dirname');
    
$xoopsTpl->assign('smartydir'$smartydir);
    include 
XOOPS_ROOT_PATH.'/footer.php';
}
?>

may i know which code to change as the values are not added to db after i click rate!



4
slitzx
Re: Evennews (mailings)
  • 2010/1/12 16:25

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


sorry for the mislead, the problem i am facing is same as the thread starter,
WarningMyTextSanitizer::oopsStripSlashesGPC is deprecated in file /class/module.textsanitizer.php line 918
Warning
MyTextSanitizer::oopsStripSlashesGPC is deprecated in file /class/module.textsanitizer.php line 918
Notice
: Function getMailer() is deprecated, use xoops_getMailer instead in file /include/functions.legacy.php line 78


how do i resolve this issue?



5
slitzx
Re: mxdirectory help
  • 2010/1/12 16:23

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


hi, thanks for the welcome =)
i have solved the issue of changing the fields name in my property listing form
where i change the name by language\english\main.php

Resized Image




6
slitzx
Re: Evennews (mailings)
  • 2010/1/12 4:07

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


sorry to bump a old thread, as i am using 2.4.1 version of xoops, how do i go about configuring this module to work or is there an alternative that i can use for newsletter. thank you very much



7
slitzx
mxdirectory help
  • 2010/1/12 3:30

  • slitzx

  • Just popping in

  • Posts: 7

  • Since: 2010/1/12


hi i am wondering if anyone can guide in me changing the fields in mxdirectory listing so that ican edit or add in fields that can suitable for me thanks ! below is the code in submit.php.
Resized Image
<?php
include "header.php";
include_once 
XOOPS_ROOT_PATH.'/header.php';

global 
$xoopsDB$eh$xoopsConfig$xoopsModuleConfig$xoopsUser;
include 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
include_once 
XOOPS_ROOT_PATH."/class/xoopstree.php";
include_once 
XOOPS_ROOT_PATH."/class/module.errorhandler.php";
include_once 
XOOPS_ROOT_PATH."/class/xoopslists.php";
include_once 
XOOPS_ROOT_PATH."/include/xoopscodes.php";
include 
"include/securitycheck.php";
include 
'class/formtime.php';
$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
$mytree = new XoopsTree($xoopsDB->prefix("xdir_cat"),"cid","pid");
$mydirname basename dirname__FILE__ ) )  ;
$uploadirectory="modules/" $mydirname"/images/shots";
$eh = new ErrorHandler//ErrorHandler object

//$captcha_anon = $xoopsModuleConfig['captcha_anon'];          //check captcha for annon users?

if (empty($xoopsUser) && !$xoopsModuleConfig['anonpost']) {
    
redirect_header(XOOPS_URL."/user.php",2,_MD_MUSTREGFIRST);
    exit();
}

if (!empty(
$_POST['submit'])) {
    
// Form posted - evaluate the results & put into the dB for approval
    //xoops security class before captcha eval.
        
if (!$GLOBALS['xoopsSecurity']->check()) {
        print 
_MD_SUBMITTER.'<br />'._MD_SECURITY_CODE.' '._MD_UPGRADEFAILED;
        return;
        }
    
// next check captcha security
    
if (empty($_POST['captcha_stat'] ) ) {
         
redirect_header("./",5,_MD_FAIL_SECURITY);
  }
    switch (
$_POST['captcha_stat'] ) {
        case 
false:
        case 
0:
            
redirect_header(XOOPS_URL."./",5,_MD_FAIL_GD_LOAD);
            break;
        case 
1:
        case 
2:
            if (empty(
$_POST["security"]) || empty($_POST["sec_hidden"])) {
                
$eh->show("0008");
            } else {
            
// values are set - now verify
                
$sec_post $myts->addSlashes($_POST["security"]);
                
$sec_post_hidden $myts->addSlashes($_POST["sec_hidden"]);
                
$spass mx_security_check($sec_post,$sec_post_hidden);
                if (
$spass === false){
                  
redirect_header("./",5,_MD_FAIL_SECURITY);
                 }
          }
            break;
        default:
            break;
    }
    
// end of security graphic validation check

    
$submitter = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0;

    
$notify = !empty($_POST['notify']) ? 0;
    
$cid = ( !empty($_POST['cid']) ) ? intval($_POST['cid']) : 0;
    
    
// Check if title is invalid - will only happen if someone tries to spoof the form
     
if ( !isset($_POST["title"]) || (trim($_POST["title"])=="") ) {
         
redirect_header("./",5,_MD_FIELDEMPTY);
    } elseif ( !isset(
$_POST["submitter"] ) ) {
        
//        $url = $myts->formatURL($_POST["url"]);
        //        $url = urlencode($url);
        
redirect_header("./",5,_MD_NOPERM);
    }

    
$status = ( $xoopsModuleConfig['autoapprove'] == ) ? ;

    if (!empty(
$_FILES["logoup"]["name"])){
            
$thislogo $_FILES["logoup"]["name"];
            
$logourl $myts->addSlashes($thislogo);
    }    elseif(!empty(
$POST["logourl"])) {
        
$logourl $myts->addSlashes($_POST["logourl"]);
            
$logourl = ( basename($logourl) == "0") ? "" $logourl ;
    } else {
      
$logourl '';
    }
    
$title trim($myts->addSlashes($_POST["title"]));
    
$address trim($myts->addSlashes($_POST["address"]));
    
$address2 trim($myts->addSlashes($_POST["address2"]));
    
$city trim($myts->addSlashes($_POST["city"]));
    
$state trim($myts->addSlashes($_POST["state"]));
    
$zip trim($myts->addSlashes($_POST["zip"]));
    
$country trim($myts->addSlashes($_POST["country"]));
    
$mfhrs trim($myts->addSlashes($_POST["mfhrs"]));
    
$sathrs =    trim($myts->addSlashes($_POST["sathrs"]));
    
$sunhrs =    trim($myts->addSlashes($_POST["sunhrs"]));            
    
$phone trim($myts->addSlashes($_POST["phone"]));
    
$fax trim($myts->addSlashes($_POST["fax"]));
    
$mobile trim($myts->addSlashes($_POST["mobile"]));
    
$home trim($myts->addSlashes($_POST["home"]));
    
$tollfree trim($myts->addSlashes($_POST["tollfree"]));            
    
$email trim($myts->addSlashes($_POST["email"]));
    
$url trim($myts->addSlashes($_POST["url"]));
    
$admcontname trim($myts->addSlashes($_POST["admcontname"]));
    
$admcontnumb trim($myts->addSlashes($_POST["admcontnumb"]));
    
$premium trim($myts->addSlashes($_POST["premium"]));
    
$moddesc trim($myts->addSlashes($_POST["moddesc"]));
    
$date time();
    
    
// now check for a valid image
    
$domain XOOPS_URL;
    
$path './images/shots/';   //path to targetfolder
    
$path_after_domain '/modules/' $mydirname '/images/shots/';   //path to targetfolder for use in url
    
$max_size $xoopsModuleConfig['logo_maxfilesize'];          //maximum filesize
    
$ferror false;
    if ((isset(
$_FILES['logoup'])) &&  (is_uploaded_file($_FILES['logoup']['tmp_name']))) {
        if (
$_FILES['logoup']['size']>$max_size) {
            
$ferror _MD_ELOGOSIZE// file too big
        
} else {
            if ((
$_FILES['logoup']['type']=="image/gif") || ($_FILES['logoup']['type']=="image/png") || ($_FILES['logoup']['type']=="image/jpeg")) {
                if (
file_exists($path $_FILES['logoup']['name'])) {
                    
$ferror _MD_ELOGOSAMENAME;  // file exists
                
} else {
                    if (!
copy($_FILES['logoup']['tmp_name'], $path .$_FILES['logoup']['name'])) {
                      
$ferror _MD_ELOGOTEMP;
                  }
                }
            } else {
                
$ferror _MD_ELOGOTYPE;  // wrong file type
            
}
        }
//    } elseif ((isset($_FILES['logoup'])) &&  ($_FILES['logoup']['error'] != 0)) { 
//        $ferror = sprintf(_MD_ELOGOUNK , $_FILES['logoup']['error']);
    
}

    if (
$ferror) { redirect_header("./",3,$ferror); exit(); }  // exit if error
    //
    // everything's okay so put it in the dB
    //
    
$newid $xoopsDB->genId($xoopsDB->prefix("xdir_links")."_requestid_seq");

    
$sql sprintf("INSERT INTO %s (lid, cid, title, address, address2, city, state, zip, country, mfhrs, sathrs, sunhrs, phone, fax, mobile, home, tollfree, email, url, admcontname, admcontnumb, logourl, submitter, status, date, hits, rating, votes, comments, premium) VALUES (%u, %u, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %u, %u, %u, %u, %u, %u, %u, %u)"$xoopsDB->prefix("xdir_links"), $newid$cid$title$address$address2$city$state$zip$country$mfhrs$sathrs$sunhrs$phone$fax$mobile$home$tollfree$email$url$admcontname$admcontnumb$logourl$submitter$status$date0000$premium);
    
$xoopsDB->query($sql) or $eh->show("0013");
    
$newid = ($newid == 0) ? $newid $xoopsDB->getInsertId() : $newid ;
    
$sql sprintf("INSERT INTO %s (lid, description) VALUES (%u, '%s')"$xoopsDB->prefix("xdir_text"), $newid$moddesc);
    
$xoopsDB->query($sql) or $eh->show("0013");
    
//
    // and finally set the notification
    //
    
$notification_handler =& xoops_gethandler('notification');
    
$tags = array();
    
$tags['LINK_NAME'] = $title;
    
$tags['LINK_URL'] = XOOPS_URL '/modules/'$xoopsModule->getVar('dirname') . '/singlelink.php?cid=' $cid '&lid=' $newid;
    
$sql "SELECT title FROM " $xoopsDB->prefix("xdir_cat") . " WHERE cid=" $cid;
    
$result $xoopsDB->query($sql);
    
$row $xoopsDB->fetchArray($result);
    
$tags['CATEGORY_NAME'] = $row['title'];
    
$tags['CATEGORY_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/viewcat.php?cid=' $cid;
    if ( 
$xoopsModuleConfig['autoapprove'] == ) {
        
$notification_handler->triggerEvent('global'0'new_link'$tags);
        
$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';
        
$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",10,_MD_RECEIVED);
    }
    exit();

} else {     
// Display submit form

    
$submitter = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : _MD_ANON;
    
$arry1 = array( =>_MD_NONE);
    
$linkimg_array XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/modules/".$mydirname."/images/shots/");
    
$linkimg_array array_merge($arry1 $linkimg_array);
    
$logourl '';  // clear logo
    
    
$sql "SELECT cid, title FROM ".$xoopsDB->prefix("xdir_cat");
    
$result $xoopsDB->query($sql);

    
$modlinkform = new XoopsThemeForm(_MD_ADDNEWLINK'submitform'$_SERVER['PHP_SELF'], 'POST',true);
    
$modlinkform->addElement(new XoopsFormText(_MD_SITETITLE 'title'50100''),true);
    
    
$addrtray = new XoopsFormElementTray(_MD_BUSADDRESS,'<br />');
    
$addrtray->addElement(new XoopsFormText(_MD_BUSADDRESS1 'address'38200''));
    
$addrtray->addElement(new XoopsFormText(_MD_BUSADDRESS2 'address2'38100''));
    
$modlinkform->addElement($addrtray);
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSCITY 'city'5080''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSSTATE 'state'5080''));// EVU CODE changed size and max size
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSZIP 'zip'1515''));
    
$modlinkform->addElement(new XoopsFormSelectCountry(_MD_BUSCOUNTRY 'country'''));        
    
$hrtray = new XoopsFormElementTray(_MD_BUSHRS ,'<br />');
    
$hrtray->addElement(new XoopsFormTime(_MD_BUSMFHRS 'mfhrs'15''));    
    
$hrtray->addElement(new XoopsFormTime(_MD_BUSSATHRS 'sathrs'15''));
    
$hrtray->addElement(new XoopsFormTime(_MD_BUSSUNHRS 'sunhrs'15''));
    
$modlinkform->addElement($hrtray);
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSPHONE 'phone'1535''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSFAX 'fax'1535''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSMOBILE 'mobile'1535''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSHOME 'home'1535''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSTOLLFREE 'tollfree'1535''));
    
$modlinkform->addElement(new XoopsFormText(_MD_BUSEMAIL 'email'50100''));
    
$modlinkform->addElement(new XoopsFormText(_MD_SITEURL 'url'50250''));                                                            
    
$contray = new XoopsFormElementTray(_MD_BUSADMCONT '<br />');
    
$contray->addElement(new XoopsFormText(_MD_BUSADMCONTNAME 'admcontname'2835''),true);       
    
$contray->addElement(new XoopsFormText(_MD_BUSADMCONTNUMB 'admcontnumb'2835''),true);    
    
$modlinkform->addElement($contray);    
    
$sel_cat = (new XoopsFormSelect(_MD_CATEGORYC 'cid'''1false));
    
$tree $mytree->getChildTreeArray(0,"title ASC");
    foreach (
$tree as $branch ) {
        
$branch['prefix'] = substr($branch['prefix'], 0, -1);
        
$branch['prefix'] = str_replace(".","--",$branch['prefix']);
        
$sel_cat -> addOption($branch['cid'],$branch['prefix'].$branch['title']);
    }
    
$modlinkform->addElement($sel_cat);
    
$modlinkform->addElement(new XoopsFormDhtmlTextArea(_MD_DESCRIPTIONC 'moddesc' null 850), false);

    
$modlinkform->addElement(new XoopsFormFile(_MD_LOGOUP 'logoup'$xoopsModuleConfig['logo_maxfilesize']));

    
$premtray = new XoopsFormElementTray(_MD_PREMIUM ,'');
    
    
$premopts getlvlselects();
    
$premmenu = new XoopsFormSelect(_MD_PREMIUM 'premium'''''false);
    
$premmenu->addOptionArray($premopts);
    
//$modlinkform->addElement($premmenu);
    
$premtray->addElement($premmenu);
    
$whaturl XOOPS_URL."/modules/".$mydirname."/matrix.php";
    
$premtray->addElement(new XoopsFormLabel("","<a href="" . $whaturl . "">" _MD_WHATTHIS ."</a>"));
    
$modlinkform->addElement($premtray);
    
//
    // zyspec - add code for security graphic
    // modified from original code from XoopsContact v1.6 by IBDeeming
    //
    // captcha_stat = 
    //                                0 or false, gd not loaded - validate captcha
    //                                1, gd loaded, - validate captcha
    //                                2, gd2 loaded - validate captcha
    //                                else, - don't validate captcha
    //
    
if ( empty($xoopsUser) && $xoopsModuleConfig['captcha_anon'] ) {
//    if (($xoopsModuleConfig['captcha_anon'])) {          //check captcha for annon users?
        
$gd = ( extension_loaded('gd') ) ? false ;
        
$gd = ( extension_loaded('gd2') ) ? $gd ;
        
$captcha_stat $gd;
        if ( 
$gd ){
            
mt_srand((double)microtime()*10000);
            
$random_num mt_rand(0100000);
            
$security "<img src='getgfx.php?random_num=$random_num&gd=$gd' border='1' alt='"._MD_SECURITY_CODE."' title='"._MD_SECURITY_CODE."' />&nbsp;&nbsp;"
                                    
."<img src='images/no-spam.jpg' alt='"._MD_NO_SPAM."' title='"._MD_NO_SPAM."' />";
            
$captchatray = new XoopsFormElementTray('','<br />');
            
$captchatray->addElement(new XoopsFormLabel('' $security));
            
$captchatray->addElement(new XoopsFormHidden('sec_hidden',$random_num));
            
$captchatray->addElement(new XoopsFormText('','security',15,10,''));
            
$modlinkform->addElement($captchatray);
        }
    } else {
        
$captcha_stat 99;
    }
    
$modlinkform->addElement(new XoopsFormHidden('captcha_stat'$captcha_stat));
    
//    zyspec - end of security graphic code

    
$submittray = new XoopsFormElementTray('','');
    
$regtray = new XoopsFormElementTray('','');
    
$regtray->addElement(new XoopsFormButton(''''_MD_SUBMIT'submit'));
    
$regtray->addElement(new XoopsFormHidden('submit',true));
    
$regtray->addElement(new XoopsFormButton('''cancel'_MD_CANCEL'reset'));
    
$submittray->addElement($regtray);

//    $modlinkform->addElement(new XoopsFormHidden('description', $desc));        
    
$modlinkform->addElement(new XoopsFormHidden('mfhrs'''));
    
$modlinkform->addElement(new XoopsFormHidden('sathrs'''));
    
$modlinkform->addElement(new XoopsFormHidden('sunhrs'''));
    
$modlinkform->addElement(new XoopsFormHidden('submitter'$submitter));
    
$modlinkform->addElement($submittray);

    
$modlinkform->setExtra('enctype="multipart/form-data"');
    
$modlinkform->display();
  include 
XOOPS_ROOT_PATH.'/footer.php';
}
?>




TopTop



Login

Who's Online

70 user(s) are online (52 user(s) are browsing Support Forums)


Members: 0


Guests: 70


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits