View Single Post
  #6  
Old 02-06-2016, 11:41 AM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 43,979
Ittermat is on a distinguished road
Default

EDIT:My whole post has info...and my page has a different error now... ugh...

I did some more Messing with it...and I came across this now...

Fatal error: Class 'ArewardsView' not found in /home/atrocity/public_html/classes/class_controller.php on line 135

Im really trying to figure this whole thing out on my own... but I am stumped!

________


Thank you Kyttias! I'll try this out <3

Sorry im such a bother XD I am trying to learn I just dont get it as fast and I get easily confused... so thanks for being patient with me, now and in the future.

EDIT: Okay I managed to get my page to show up-

This is the code Im currently using in Adminrewardsview-

PHP Code:
    <?php
  
class Arewards extends View{

    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;        
        
$document->setTitle("Adminstrator rewards");
if(
$mysidia->user->status->admin != "yes"){
    
$document->add(new Comment("Sorry! you're not an Administrator!!"));
    
$document->add(new Comment("Thank you for collecting your paycheck!!"));
} else {
    }          
        if (
strtotime($mysidia->user->lastday) < strtotime("-30 days")) {
            
$document->add(new Comment("It has been at least 30 days since your last visit!"FALSE));
            
// Give User Item
              
$amount 50000;
             
$mysidia->user->changecash($amount);  
            
$newitem = new StockItem($item);
            
$newitem->append($qty$mysidia->user->username);  
            
$document->add(new Comment("You've recieved 50,000 beads!"));
            
// Reset Timestamp
            
$now = new DateTime();
            
$today $now->format('Y-m-d');
            
$mysidia->db->update("users", array("lastday" => $today), "username = '{$mysidia->user->username}'");
        } else {
            
$daysleft strtotime($mysidia->user->lastday);
            
$document->add(new Comment("We're sorry, 30 days have not yet passed! Please wait {$daysleft} more days!"FALSE));
        }  
    }
    
}
?>
I cant figure out where I went wrong..

Last edited by Ittermat; 02-06-2016 at 11:22 PM.
Reply With Quote