Project Help Wanted
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherProject Help Wanted

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 22nd, 2003, 07:28 PM
liberate liberate is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 34 liberate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Php / mysql dynamically generated multi user website

I need a php / mysql programmer to fix the errors in the functions.php page. You will find a copy of the functions.php below. The code is 90% correct. I am presently using it but there are errors.

The functions.php is still looking in too many places. Only fk_accounts 24, 25, and 26 hold that data is needed for the website.
25 = Name
24 = email
26 = ID #

The code is looking in too many places which is causing errors and omissions.

The functions.php retrieves each member's data by looking up the "id=" querrystring. Such as:
http://www.uc2.biz/isb.php?t=1&id=000-03-9425
Each member has their own personal dynamically generated website.

If you are willing to fix the functions.php code, I will give you a quick overview of what the code is to do, although that should be self evident.

Best Regards
Liberate



<?php

##functions.php

function dbc() {
//connect to mysql and choose database.
mysql_connect("mysql1.xxxxxxxxxx.com","xxxxxxx","xxxxxxx");
mysql_select_db("maillist");
}

dbc();

function checkid() {
global $id;
//is this ID# a valid one from the DB?
$result = mysql_query("select value from swd_doppar where value='$id'") or die(mysql_error());
if(mysql_num_rows($result) > 0) {
return 1;
}else{
return 0;
}
}

if(!checkid()) {
print("<script Language=\"JavaScript\">location.href=('http://www.uc2.biz/adm/not_registered.php');</script></NO SCRIPT>");

exit;
}

function getuid($id) {
global $uid;
//get fk_user value from db table 'swd_doppar' based on $id
$result = mysql_query("select value,fk_user from swd_doppar where value='$id'") or die(mysql_error());
$row = mysql_fetch_array($result);
$uid = $row['fk_user'];
return $uid;
}

dbc();
$uid = "";
getuid($id);

function printName() {
global $uid;
//locator id's
$id1 = 25;
$id2 = 17;
$id3 = 21;

//get name
$qry = "select * from swd_doppar where fk_user='$uid' and fk_fields='25'";
$result = mysql_query($qry) or die(mysql_error());
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id1'");
if(mysql_num_rows($result) == 0) {
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id2'");

if(mysql_num_rows($result) == 0) {
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id3'");
}
}
$row = mysql_fetch_array($result);
print($row[2]);
}

function printEmail($toggle) {
global $uid;
//locator id's
$id1 = 24;
$id2 = 20;
$id3 = 24;

//get email
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id1'");
if(mysql_num_rows($result) == 0) {
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id2'");

if(mysql_num_rows($result) == 0) {
$result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id3'");
}
}


$row = mysql_fetch_array($result);

//display email in a way that it won't be harvested...
//explode email into two different parts

if($toggle==1) {
$expld = explode("@",$row[2]);
?>
<SCRIPT language="JavaScript" type="text/javascript">
<!--
var name = "<? print($expld[0]); ?>";
var domain = "<? print($expld[1]); ?>";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
document.write(name + '@' + domain + '<\/a>');
// -->
</SCRIPT>
<?
}else{
$rec_email = $row[2];
return $rec_email;
}
}
?>

Reply With Quote
  #2  
Old September 24th, 2003, 06:11 PM
wndrer wndrer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: kentucky
Posts: 31 wndrer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 36 sec
Reputation Power: 5
is this a paid fix?
the link to my online resume:
tellmama.com:800/cds/resumeComp.html
Email : wndrer@earthling.net

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherProject Help Wanted > Php / mysql dynamically generated multi user website


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway