Results 1 to 3 of 3

Thread: The date 0000-00-00 00:00:00

  1. #1
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question The date 0000-00-00 00:00:00

    Code:
    function saveComment($database, $tmpl) {
    
    	global $my, $mosConfig_offset, $maxLanguage, $mosConfig_live_site, $mainframe;
    
    	$maxConfig = new maxConfig();
    
    	$row = new mosComment($database);
    	$_contentid = mosGetParam($_POST,'contentid','');
    	$row->bind($_POST);
    	$comment =$row->comment;
    	$comment = addslashes($comment);
    	$row->comment = $comment;
    	$row->myid = $my->id;
    	$row->state = $maxConfig->auto_publish;
    	$row->approved = $maxConfig->auto_approve;
    	$row->ip = mosGetParam($_SERVER,'REMOTE_ADDR','');
    	$row->browser = mosGetParam($_SERVER,'HTTP_USER_AGENT','');
    	$zone=3600*3;
    	$d = gmdate( "D M Y H:i", time() + $zone);
    	$row->date = gmdate( "D M Y H:i", time() + $zone); 
    	$row->store();
    	$tmpl->addVar("emailcomment", 'date', $d);
    
    	$subject = $maxLanguage->EMAIL_SUBJECT_ADMIN_ALERT;
    
    	$tmpl = new patTemplate();
    	$tmpl->setBasedir("components/com_combomax/templates/");
    	$tmpl->setNameSpace('pxt');
    	$tmpl->readTemplatesFromFile("showcomment.tpl");
    	$tmpl->addVar("emailcomment", "NAME", stripslashes(stripslashes($row->name)));
    	$tmpl->addVar("emailcomment", 'email', stripslashes($row->email));
    	$tmpl->addVar("emailcomment", 'url', stripslashes($row->url));
    	$tmpl->addVar("emailcomment", 'comment', smile::smileReplace(stripslashes(stripslashes($row->comment))));
    	$tmpl->addVar("emailcomment", 'ip', stripslashes($row->ip));
    	$tmpl->addVar("emailcomment", 'browser', stripslashes($row->browser));
    	$tmpl->addVar("emailcomment", 'date', stripslashes($row->date));
    	$tmpl->addVar("emailcomment", 'reporturl', 'index.php?option=com_combomax&page=reportComment&commentid='.$row->id.'');
    
    	$tmpl->addVar("emailcomment", 'livesite', $mosConfig_live_site);
    	$tmpl->addVar("emailcomment", 'template', $mainframe->getTemplate());
    
    	$tmpl->addVar("emailcomment", 'contenttitle', getContentTitle($row->contentid));
    	$tmpl->addVar("emailcomment", 'linktocontent', $mosConfig_live_site.'/index.php?option=com_content&task=view&Itemid=1&id='.$row->contentid);
    
    	$tmpl->parseTemplate("emailcomment");
    	$message = $tmpl->getParsedTemplate("emailcomment");
    the date seems 0000-00-00 00:00:00
    Last edited by winpeace; 11-14-2006 at 09:30 AM. Reason: edit

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    How many threads do you need about the same exact code?

    One that is already being answered should be enough...
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am sorry but the problem is different

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •