MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completely customizable, expandable and suitable for all needs.
A2Hosting
Moderators: Moderators
Forum RSS feedReply
calendar
AuthorText
spam
Junior Member

Posts: 15
Contributes: 27

Gender: _NEUTRAL_
Online: No

Version: 4.0.1
Date: 09/02/2010 16:30
calendar
#post23421
Site url: http://solbjor.org
MemHT version: 4.0.1
Hosting OS: Linux
PHP and MySQL versions: ...
Installed addons/scripts: calendar
Error/Problem:
Hi, can anyone help me?

I want to modify the calendar of event like this:

code
                                        if ($save) {
                                                $dblink->query("INSERT INTO memht_calendar_events (id,date,title,text,autoDato,author,ip)
                                                                                VALUES (null,'$date','$title','$text','$tzNOW','$user','"
.$visitorInfo['ip']."')");

but it doesn`t save autoDato into the database (the field is created in the calendar of event table).

function newEvent code
code
function newEvent($date,$title,$text,$operation) {
        global $dblink,$siteConfig,$visitorInfo,$tzNOW,$user,$admin;
       
        if (isAdmin($admin)) {
                $row = $dblink->get_row("SELECT email FROM memht_utenti WHERE user='$user'");
                $dbuser = $user;
                $dbemail = outCode($row['email']);
       
                switch($operation) {
                        case "add":
                                @session_start();
                                if ((isset($_POST['post_code_page']) AND isset($_SESSION['chk_calendar']) AND strtolower($_POST['post_code_page'])==strtolower($_SESSION['chk_calendar'])) OR !(extension_loaded('gd') AND $siteConfig['graphic_check']==1)) {
                                        $save = true;
                                        if (!eregi("^([0-9]{4}-[0-9]{2}-[0-9]{2})$",$date)) { $save = false; $msg = "<b>"._EMPTY_."/"._SYNTAX_ERROR_."</b>: "._DATE_; }
                                        if ($title=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._TITLE_; }
                                        if ($text=="") { $save = false; $msg = "<b>"._EMPTY_."</b>: "._TEXT_; }
                               
                                        if ($save) {
                                                $dblink->query("INSERT INTO memht_calendar_events (id,date,title,text,autoDato,author,ip)
                                                                                VALUES (null,'$date','$title','$text','$tzNOW','$user','"
.$visitorInfo['ip']."')");
                                               
                                                $date = explode("-",$date);
                                                $year = $date[0];
                                                $month = $date[1];
                                                $day = $date[2];                                               
                                                echo "<meta http-equiv='refresh' content='0;URL=index.php?page=calendar&op=events&year=$year&month=$month&day=$day'>";
                                               
                                        } else {
                                                echo "<div align='center' id='errorText' class='box'><b>"._FIELDINVALID_."</b><br>$msg</div>";
                                        }
                                } else {
                                        echo "<div align='center' id='errorText' class='box'><b>"._WRONGSECCODE_."</b></div>";
                                }
                        break;


Note: If any of those items is missing, your post could be ignored or even closed/deleted
I like very long signature...
Delete Edit Quote
 
Reply
Tags Cloud
Twitter updates...
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.107.179.231

Username
Password
MemHT Wiki
Language
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo