23, November 2008

Version 0.93 released - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Version 0.93 released
« previous next »
Pages: [1] 2 Print

Author Topic: Version 0.93 released  (Read 1264 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« on: May 02, 2008, 10:37:09 AM »

We've just released a new version of php user class Visit through proxy. You can download the class from the site or check the changelog here :

http://phpuserclass.com/en/changelog Visit through proxy

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #1 on: May 02, 2008, 10:42:17 AM »

Forgot to mention, besides some bug fixes we also included an ajax login example with jquery.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Atari ST fan
*
Posts: 7
46 credits
Members referred : 0


« Reply #2 on: May 27, 2008, 11:27:24 PM »

awesome!!! glad to see it's still being maintained.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #3 on: Jun 05, 2008, 02:59:05 AM »

awesome!!! glad to see it's still being maintained.

Don't worry it will be maintained for a long time as it is now part of bigger open source projects Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Chicken-run Manager
*
Posts: 9
58 credits
Members referred : 0


« Reply #4 on: Jun 13, 2008, 12:06:12 PM »

Hi there

The new version contains a bug...

On line 296 (maybe higher or lower, as I may have modified the code) there is a

if ( !res )
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #5 on: Jun 14, 2008, 04:06:15 PM »

Thanks for letting me know of this. I will include it to the next update.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #6 on: Jun 15, 2008, 12:26:01 PM »

In the next update can you write a table selector for the get_property ex.: function get_property($property, $table)?

Thx Smiley sorry for my english Smiley I like you class! Nice work!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #7 on: Jun 15, 2008, 01:40:46 PM »

For the moment you can get properties from the user table. In order to do what you want the script must have more complexed setup in order to understand joins from other tables, but yet it is a good idea Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #8 on: Jun 15, 2008, 01:43:47 PM »

Hello Again!

I written this function from insertUser:

Code:
/**
  * Insert any data to any table
  *
  */
  function insert_property($data, $table){
    if (!is_array($data)) $this->error('Data is not an array', __LINE__);
    foreach ($data as $k => $v ) $data[$k] = "'".$this->escape($v)."'";
    $this->query("INSERT INTO `$table` (`".implode('`, `', array_keys($data))."`) VALUES (".implode(", ", $data).")");
    return (int)mysql_insert_id($this->dbConn);
  }

But it isn't insert Smiley What's the problem?

Thx and again sorry for my english Smiley
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #9 on: Jun 15, 2008, 01:46:00 PM »

The code looks ok. I suppose the data that you give to the function is wrong

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #10 on: Jun 15, 2008, 01:50:13 PM »

Code:
<?php
if (!defined("X")) {
    echo "Hopp&#225;! H&#225;t te hogy ker&#252;lt&#233;l ide? Menj vissza a kezd&#337;oldalra. <a href='././././'>Kattints ide!</a>";
    exit();
}
//Csak tagoknak!
require_once 'data/include/access.php';
$user = new flexibleAccess(); 
  if ( !$user->is_loaded() )
header('Location: '.$_SERVER['PHP_SELF'].'?m=login&burl=http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); //Bel&#233;p&#233;s sz&#252;ks&#233;ges
?>

<?php

// HERE the  insert Code
if ($_GET['feed'] == 1){
$data = array(
'foodq' => $_POST['food']
);
$user->insert_property($data'users');
header("Location: ".$_SERVER['PHP_SELF']."?m=myworm");
}
?>

This is the start of the page...
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #11 on: Jun 15, 2008, 01:55:10 PM »

Yes, the data wrong xD
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #12 on: Jun 15, 2008, 05:58:42 PM »

You can write an update_property function that works with arrays?
The delete is not too difficult... Smiley

Thx!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #13 on: Jun 15, 2008, 08:05:43 PM »

You can write an update_property function that works with arrays?
The delete is not too difficult... Smiley

Thx!

That's not too hard, but if you can do it feel free to send me your code (that's how open source works anyway Wink )

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #14 on: Jun 15, 2008, 09:06:52 PM »

Yes, i send Smiley but i cant write update with arrays Smiley
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #15 on: Jun 15, 2008, 09:19:21 PM »

Code:
/**
  * Delete data from any table
  * Use arrays:
  * You can delete one thing in one array
  * $array = array(
  * 'deletable' => 'WHERE'
  * );
  * $this->delete_property($data, $table);
  *
  */
 
function delete_property($data, $table){
    if (!is_array($data)) $this->error('Data is not an array', __LINE__);
    foreach ($data as $k => $v ) $data[$k] = "'".$this->escape($v)."'";
    $this->query("DELETE FROM `$table` `".implode('`, `', array_keys($data))."` WHERE ".implode(", ", $data)."");
    return (int)mysql_insert_id($this->dbConn);
  }
« Last Edit: Jun 15, 2008, 09:22:32 PM by DJ.Pety »
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #16 on: Jun 15, 2008, 09:21:01 PM »

ohh this function doesnt work Sad sorry
Chicken-run Manager
*
Posts: 9
54 credits
Members referred : 0


Booting up...


« Reply #17 on: Jun 15, 2008, 09:25:24 PM »

I'm not good at php Smiley  I learn...
Chicken-run Manager
*
Posts: 9
58 credits
Members referred : 0


« Reply #18 on: Jun 16, 2008, 02:43:28 PM »

NOT TESTED CODE!!
I'm sure there's a better solution, but this one should work fine.

Edit:
Updated Code on next Page
« Last Edit: Jun 18, 2008, 03:27:52 PM by Downlord »
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #19 on: Jun 16, 2008, 03:34:50 PM »

No don't use this code, it is not sql injection safe....

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7723
Tags : php user class php class Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] 2 Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Version 0.93 released
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 23, 2008, 02:25:14 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.756
Total Topics: 7.652
Total Members: 4.400
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: GregH

38 Guests, 3 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.