21
djayc2104
Re: Need a answer to the following question please!
  • 2006/11/18 1:11

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Posted my index code, have a look see if you can see a prob
<?php
require_once('../../mainfile.php');
include_once ('../../header.php');
global $xoopsUser, $xoopsDB;

$tpl = new XoopsTpl();
if(!is_object($xoopsUser)) {
redirect_header(XOOPS_URL, 0, _NOPERM);
}

$sql = $xoopsDB->query("SELECT groupid FROM ".$xoopsDB->prefix('groups')." WHERE name='Affiliate'");

list($groupid) = $xoopsDB->fetchRow($sql);
$uid = $xoopsUser->getVar("uid");
$uname = $xoopsUser->getVar("uname");

$sql = $xoopsDB->query("SELECT payment FROM ".$xoopsDB->prefix('affiliate_perc')." WHERE payid=1");
list($payment) = $xoopsDB->fetchRow($sql);

$linkurl = substr(md5(uniqid(mt_rand(), 1)),0 ,8);

$tpl->append('affs', array(
'uid'=>$uid,
'uname'=>$uname,
'linkurl'=>$linkurl,
'payment'=>$payment,
'groupid'=>$groupid));

$tpl->display(XOOPS_ROOT_PATH . "/modules/affiliate/templates/affiliate_index.html");

include "../../footer.php";

Can you tell anything from this.
all permissions to the module have been set correctly
im using XOOPS 2.0.15 with the new form.php uploaded.
Thanks
Dave



22
djayc2104
Need a answer to the following question please!
  • 2006/11/18 0:36

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Im in the final stages of my new module testing phase and just need a quick answer to my question if possible please.
The question is:
Everytime a user clicks the link into my new module, all the users seem to get admin rights to the rest of the site and when they come out of my module the admin rights stay.

Can anyone give me an answer to the question please.

Thanks in advance

Dave.



23
djayc2104
Re: Unknown error always coming up!
  • 2006/11/16 7:07

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Thanks for your response's Monty and Rowdie.
I am using a standard call to the database.
$sql=("SELECT payment FROM xoops_users WHERE uid=$uid");
$result=mysql_query($sql);
$payment=mysql_fetchRow($result);

But I will try your suggestion Monty. Thanks

Once again thanks to all that replied.

Dave.



24
djayc2104
Re: Unknown error always coming up!
  • 2006/11/16 7:06

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Thanks for your response's Monty and Rowdie.
I am using a standard call to the database.
$sql=("SELECT username FROM xoops_users WHERE uid=$uid");
$result=mysql_query($sql);
$payment=mysql_fetchRow($result);

But I will try your suggestion Monty. Thanks

Once again thanks to all that replied.

Dave.



25
djayc2104
Re: Unknown error always coming up!
  • 2006/11/15 23:06

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Thanks for your reply.
I am designing a new module for XOOPS and the error started once I started testing my module.
It started when I called some data from a MySQL table. The variable that im calling came back with the value of "ARRAY".
I just dont understand whats going on.
Is it coming back with this error because of the module or is it the calling of the database.
Someone please help im going NUTS!!!!!
I am using XOOPS 2.0.15,
mysql version 4.1.10
php version 4.4.1
apache version 1.3.4
Thanks
Dave



26
djayc2104
Found a serious problem with Login!!!
  • 2006/11/14 23:41

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
I have XOOPS version 2.0.15 and have found a really serious problem with the login.
If you type mess into username and password boxes, the site logs onto the last member who just logged out.
Try this:
sign someone in on your system through the login system and then logout.
then type anything into the two boxes again like,

username:fsasgas
Password:kjfkJF

and XOOPS logs you into the acount of the last user.
I get a message that says incorrect login but then refreshes the page and logs in the last user.

What could be the prob???
Thanks
Dave

xoops 2.0.15
have the correct form.php file uploaded.



27
djayc2104
Unknown error always coming up!
  • 2006/11/14 22:26

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
I keep getting an error in XOOPS 2.0.15.
The error I get is
<B>undefined index: 29 in file /header.php</B>
Does anyone know what this is because I cannot seem to get rid of it.
Thanks in advance.
Dave



28
djayc2104
Re: I really have a problem!
  • 2006/11/6 18:29

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


hi,
Thanks for your response.
My vars are:
Apache vers: 1.3.34
PHP version 4.4.1
Xoops version 2.0.15
Code Im using is as follows:

1)Sessions
function setsessionvalue($name, $value){
session_start();
$_SESSION[$name] = $value;
}
function getsessionvalue($name){
session_start();
if (isset($_SESSION[$name])){
return $_SESSION[$name];
} else {
return false;
}
}
2)Cookies
function setcookievalue($name, $value, $time){
setCookie($name, $value, $time()+3600*24);
}
to get the cookie value I use
$value = $_COOKIE($name);

Hope this helps in helping me where I'm going wrong

Thanks
Dave



29
djayc2104
DEsigning new Smarty tags in xoops
  • 2006/11/6 16:56

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi,
Is there any way of desinging new smarty tags in xoops. I would like a smarty tag that says
{$xoops_issubscriber} & {$xoops_isaffiliate}
I know that there are two smarty tags that are used extensivly in xoops: {$xoops_isuser} and {$xoops_isadmin} but I would like to design my own.
Is there a way of defining these and if so where would I add them so my site could read all default smarty tags and the ones that I have designed myself.
Do I design them in a class?.
Thanks

Dave.



30
djayc2104
I really have a problem!
  • 2006/11/6 16:13

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi everyone,
Just to say first that XOOPS is great and the best CMS out there. Well thats all the praise over and done with, I have a prob that I hope can be sorted before I pull all my hair out.
I am using XOOPS 2.0.15 and whatever I do I cannot pass url variables, what I mean is
www.mydomain.co.uk/index.php?yourid=123456.
I am trying to store the variable and use it on another page of my site.
I have tried the following methods:

1.Setting a session and calling it with $_SESSION['yourid'].

2.Coded the session as a class function and included it once under the include"header.php"

3.I have tried setting it in a cookie with setCookie($name, $value, $time) and calling it with $yourid = $_COOKIE[$name]

4.I have tried witing it to a small file on my server.
I have included the globals $_COOKIE etc, even though it says you dont need to.

Nothing I try is working. Am I doing something wrong with my coding?????
I have changed preferences to allow me to use my own cookies.
I have tried to search the forum for answers, please help me so I can finish my module.
Thanks
Dave




TopTop
« 1 2 (3) 4 »



Login

Who's Online

235 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 235


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