ok, um isn't this wabbo/wubbo cms if not then nice edit I guess?
Printable View
ok, um isn't this wabbo/wubbo cms if not then nice edit I guess?
TrueCluez, It's devCMS
[Pre-release]
Many thanks
- ValorAngel
Well, i'm not expert in this area... But i did a little code to verify if email is already registered... Isn't a GREAT fix, but... :)
1° Go to private/application/library and open the class.user.php, then search for this public function user_name($username), then add this after void founded:
2° Go to private/application/theme/public and open the login.php, then search for this:PHP Code:public function user_mail($username)
{
GLOBAL $db;
$query = ('SELECT mail FROM users WHERE mail = ? LIMIT 1');
if ($statement = $db->prepare($query))
{
$statement->bind_param('s', $username);
$statement->execute();
$statement->bind_result($username);
$statement->fetch();
$statement->close();
return ($username);
}
}
After of found, add this:PHP Code:else if ($usr->user_name($_POST['reg_username']))
{
$errors[] = 'Please enter an username that does not already exist.';
}
Now you will have a verification of email!PHP Code:else if ($usr->user_mail($_POST['reg_email']))
{
$errors[] = 'Please enter an email that does not already exist.';
}
If have something wrong with code, tell me, i'm new in PHP :p
Great work (:
Sorry I haven't been active with the project, recently.
What I've done since the last update, I've changed, renamed, removed and updated the directories, I somewhat like the new folder structure and when you get chance, please give feedback.
I've modified some of the code inside the library.html.php (previously class.html.php) that I saw a few flaws inside. The users_search function doesn't want to play ball, so I'm going to leave the function as it is and move onto something else. Moreover to Housekeeping, infact. I really need to recode the .CSS for the layout because it doesn't work properly in some browsers, I'm hoping to keep the code the same.
Well man, tell me one thing... to do the client, is hard? xD
Not 100% sure of this as i just skimmed through ur code. I believe this line:
$statement->bind_param('s', '%'.$user.'%');
need to be
$statement->bind_param($query, '%'.$user.'%');
Due to the fact that its calling ur query to select users then selecting the user as follows.
PHP: mysqli_stmt::bind_param - Manual
http://i500.listal.com/image/3170273/500full.jpg
Fuck, where's the dislike button when you need it.
Oh hes using it differently. If u use it the way im using its the way i posted lol
He uses the MySQLi library without a wrapper arround it. I assume you do. Look better before you post things like that. It looks like you're a idiot.
Oh ya sorry didnt notice that now that i looked at his code lol
I've been pretty busy for the past week, but here's the new template class that'll I'll be using from now on. Basically I didn't like the fact that the template class (original) was using two classes and that there were functions inside the class that weren't needed etc.
PHP Code:<?php
if (!defined('INDEX'))
{
exit ('<h1>Access denied</h1><p>You do not have the privileges to access this webpage.</p>');
}
class template
{
private $template = NULL;
private $input = array ();
private $output;
public function template ($string)
{
$this->template = $string;
}
public function template_page ()
{
extract ($this->input);
$input = ('resources/resources_private/private_template/template_private/'.$this->template.'.tpl');
if (file_exists($input))
{
ob_start ();
include ($input);
$output = ob_get_contents ();
ob_end_clean ();
return $this->template_filter_input ($output);
}
else
{
exit ('<h1>Access denied</h1><p>Template ('.$this->template.') does not have the privileges to access this webpage.</p>');
}
}
private function template_filter_input ($string)
{
foreach ($this->input as $input => $output)
{
if (is_object($output))
{
continue;
}
$string = str_ireplace ('%'.$input.'%', $output, $string);
}
return $string;
}
public function template_input ($input, $output)
{
$this->input[$input] = is_object ($output) ? $output->fetch () : $output;
}
public function template_output ()
{
$this->output .= $this->template_page ();
echo $this->template_filter_input ($this->output);
}
}
?>
Database for this cms?
I get those errors, and can we please have the database file? prefer if its compatible with ButterstormQuote:
Notice: Undefined index: p in C:\xampp2\htdocs\xabbo2\index.php on line 12
Notice: Undefined variable: result in C:\xampp2\htdocs\xabbo2\private\application\library\class.html.php on line 44
Notice: Undefined variable: result in C:\xampp2\htdocs\xabbo2\private\application\library\class.html.php on line 392
Notice: Undefined variable: errors in C:\xampp2\htdocs\xabbo2\private\application\theme\public\login.php on line 89