Bienvenue,
Invité
|
Mesage Error
(1 visualisation(s)) (1) Invité
Joomloc-LITE composant pour joomla 1.6
SUJET: Mesage Error
Mesage Error il y a 11 ans, 9 mois #32
|
Bonsoir a tous
Je acheté votre script et je le message de erreur suivante Fatal error: Call to a member function close() on a non-object in /homepages/4/d371643198/htdocs/Prussiana/en/administrator/components/com_joomloc/controller.php on line 209 C'est grave ? Comment on peut remédie ça ? Merci |
|
Re: Mesage Error il y a 11 ans, 9 mois #33
|
Bonjour
Pour commencer vérifiez que vous êtes bien en php5 et non en php4 |
Laubro
![]() |
Re: Mesage Error il y a 11 ans, 9 mois #39
|
Bonjour
prussiana - MySQL5.0 - disponible Oui Merci |
Dernière édition: il y a 11 ans, 9 mois par .
|
Re: Mesage Error il y a 11 ans, 9 mois #40
|
je vous ais demandé de regarder php5 pas Mysql 5, vous devez avoir une config serveur :
I have request you to look if you have php5, not Mysql, you need to have a server config with : - PHP5 - Mysql 5 Like indicate i the joomloc demo/shop website : - Joomla 1.6 for Joomloc-LITE and Joomloc-LITE-FREE - PHP 5.2.5 or higher - Apache - Mysql 5.0 or higher |
Laubro
![]()
Dernière édition: il y a 11 ans, 9 mois par admin.
|
Re: Mesage Error il y a 11 ans, 9 mois #42
|
for information of system configuration:
in joomla back-end, go to the tab "help" (far right) and you'll see just inside the tab, system info: view version of php and make sure it is the one required by Laubro bye |
|
Re: Mesage Error il y a 11 ans, 9 mois #45
|
|
Dernière édition: il y a 11 ans, 9 mois par .
|
Re: Mesage Error il y a 11 ans, 9 mois #47
|
ok, la configuration serveur semble bonne, c'est étrange cette erreur, tu n'en as pas d'autres du même genre en back-end et/ou en front-end ? car cette fonction est présente à plusieur endroits
il s'agit de la fonction : function GetBookings() // ligne 136 est ce que tu pourrais éditer le fichier concerné et trouver cette fonction puis au tout début vérifier qu'il y a bien cette ligne global $mainframe; ou me mettre une capture de cette fontion.. merci |
Laubro
![]() |
Re: Mesage Error il y a 11 ans, 9 mois #49
|
Merci pour la rapidite de vos reponses
Voici un autre error qui se trouve sur la page de site fr.villaprussiana.fr/index.php/menu-types le fichier en question c'est loc.php ? Merci |
Dernière édition: il y a 11 ans, 9 mois par .
|
Re: Mesage Error il y a 11 ans, 9 mois #50
|
oui c'est étonnant... il faudrait que je vois le code de la fonction comme demandé juste avant
|
Laubro
![]() |
Re: Mesage Error il y a 11 ans, 9 mois #51
|
Quelle cod ? de fichier top.php ?
Aves vous visite la page fr.villaprussiana.fr/index.php/menu-types Voici le cod loc.php ================================== <?php /** * @version $Id: header.php 756 2008-12-08 14:24:02Z elkuku $ * @package joomloc * @subpackage * @author EasyJoomla {@link www.easy-joomla.org Easy-Joomla.org * @author Nikolai Plath {@link www.easy-joomla.org} * @author Created on 12-Mar-09 */ // no direct access defined( '_JEXEC' ) or die( '= ![]() jimport('joomla.application.component.controller'); class joomlocControllerloc extends JController { function __construct() { parent::__construct(); }// function function edit() { JRequest::setVar( 'view', 'loc' ); JRequest::setVar( 'layout', 'loc' ); parent::display(); }// function function send() { $configsite =& JFactory::getConfig(); $sitename = htmlspecialchars_decode($configsite->getValue( 'config.sitename' )); $copie = JRequest::getVar( 'copie'); $nom = addslashes(JRequest::getVar( 'nom')); $prenom = addslashes(JRequest::getVar( 'prenom')); $adresse = addslashes(JRequest::getVar( 'adresse')); $adresse2 = addslashes(JRequest::getVar( 'adresse2')); $itid = JRequest::getVar( 'Itemid'); $brooms= JRequest::getVar( 'broom'); if($adresse2) { $adresse = $adresse.", ".$adresse2; } $cp = JRequest::getVar( 'cp'); $ville= addslashes(JRequest::getVar( 'ville')); $pays = addslashes(JRequest::getVar( 'pays')); $tel = JRequest::getVar( 'tel'); $email = JRequest::getVar( 'email'); $arrivee = JHTML::_('date', JRequest::getVar( 'arrivee'), 'Y-m-d'); $depart = JHTML::_('date', JRequest::getVar( 'depart'), 'Y-m-d'); $-_-es = JRequest::getVar( 'pax'); $enf = JRequest::getVar( 'enf'); $nbchb = JRequest::getVar( 'nbchb'); $message = addslashes(JRequest::getVar( 'message')); $id = JRequest::getVar( 'id'); $single= JRequest::getVar( 'single'); $db =& JFactory::getDBO(); $query = "SELECT * FROM --#__lbresa_config"; $db->setQuery( $query ); $config = $db->loadObject(); $query = "SELECT * FROM --#__lbresa_sites where id='$id'"; $db->setQuery( $query ); $site = $db->loadObject(); $query = "SELECT * FROM --#__users where id='$site->user_id'"; $db->setQuery( $query ); $renter = $db->loadObject(); $hemail = $renter->email; $msg = "$sitename \n "; $msg .= JText::_( 'COM_JOOMLOC_DEMAND_DE_RESERVATION_:' )."\n"; $msg .= "---------------------------------------------------------\n"; $msg .= JText::_( 'COM_JOOMLOC_LOCATION_:' ); $msg .= "$site->s_nom\n "; $msg .= JText::_( 'COM_JOOMLOC_TELEPHONE_:' ); $msg .= "$site->s_tel\n "; $msg .= JText::_( 'COM_JOOMLOC_ADRESSE_:' ); $msg .= "\t".stripslashes($site->s_adresse)."\n "; $msg .= JText::_( 'COM_JOOMLOC_VILLE_:' ); $msg .= "\t".$site->s_cp." ".stripslashes($site->s_ville)."\n "; $msg .= "---------------------------------------------------------\n"; $msg .= "\n "; $msg .= "---------------------------------------------------------\n"; $msg .= JText::_( 'COM_JOOMLOC_NOM_:' ); $msg .= "\t".stripslashes($nom)."\n"; $msg .= JText::_( 'COM_JOOMLOC_PRENOM_:' ); $msg .= "\t".stripslashes($prenom)."\n"; $msg .= JText::_( 'COM_JOOMLOC_ADRESSE_:' ); $msg .= "\t".stripslashes($adresse)."\n "; $msg .= JText::_( 'COM_JOOMLOC_ADRESSE_2_:' ); $msg .= "\t".stripslashes($adresse2)."\n "; $msg .= JText::_( 'COM_JOOMLOC_VILLE_:' ); $msg .= "\t".$cp." ".stripslashes($ville)."\n "; $msg .= JText::_( 'COM_JOOMLOC_PAYS_:' ); $msg .= "\t".stripslashes($pays)."\n "; $msg .= JText::_( 'COM_JOOMLOC_TELEPHONE_:' ); $msg .= "\t ".$tel." \n "; $msg .= JText::_( 'COM_JOOMLOC_E-MAIL_:' ); $msg .= "\t ".$email." \n "; $msg .= "---------------------------------------------------------\n"; $msg .= JText::_( 'COM_JOOMLOC_ARRIVEE_SOUHAITEE_:' ); $msg .= "\t".$arrivee."\n"; $msg .= JText::_( 'COM_JOOMLOC_DEPART_SOUHAITE_:' ); $msg .= "\t".$depart."\n"; $msg .= JText::_( 'COM_JOOMLOC_-_-ES_:' ); $msg .= "\t".$-_-es."\n"; $msg .= JText::_( 'COM_JOOMLOC_ENFANTS:' ); $msg .= "\t".$enf."\n"; $msg .= JText::_( 'COM_JOOMLOC_NOMBRE_DE_CHAMBRES_:' ); $msg .= "\t".$nbchb."\n"; $msg .= JText::_( 'COM_JOOMLOC_ROOM_PREFERNCE:' )."\n"; $pref= "<br><br>".JText::_( 'COM_JOOMLOC_ROOM_PREFERNCE:' )."<br>"; foreach($brooms as $broom) { $msg .= "- ".$broom."\n"; $pref .= "- ".$broom."<br>"; } $msg .= JText::_( 'COM_JOOMLOC_ENFANTS:' ); $msg .= "\t".$enf."\n"; $msg .= JText::_( 'COM_JOOMLOC_MESSAGE_:' ); $msg .= "\t ".stripslashes($message)."\n "; $msg .= "---------------------------------------------------------\n"; $msg .= JText::_( 'COM_JOOMLOC_CORDIALEMENT' ); $recipient = "$hemail"; $subject = JText::_( 'COM_JOOMLOC_DEMANDE_DE_RESERVATION' ); $mailheaders = "From: $email<$email> \n"; $mailheaders .= "Reply-To: $email\n\n"; $mail =& JFactory::getMailer(); $mail->addRecipient( $recipient ); $mail->setSubject( $subject ); $mail->setBody( $msg ); if($mail->Send()) { $confmsg = JText::_( 'COM_JOOMLOC_MESSAGE_CORRECTEMENT_ENVOYE' ); $today = date('Y-m-d H:i');; $r = date('YmdHis'); $ref = $id."_".$r; $query = "INSERT INTO --#__lbresa_resas(id, ref, id_site, owner_id, date_resa, date_debut, date_fin, pax, enf, qtte, nom, prenom, adresse, cp, ville, pays,tel, mail, message) VALUES('', '$ref','$id', '$site->user_id', '$today', '$arrivee', '$depart', '$-_-es', '$enf', '$nbchb', '".addslashes($nom)."', '".addslashes($prenom)."', '".addslashes($adresse)."', '$cp', '".addslashes($ville)."', '".addslashes($pays)."', '$tel', '$email', '".addslashes($message).addslashes($pref)."')"; $db->setQuery( $query ); $db->Query(); } else { $confmsg = JText::_( 'COM_JOOMLOC_ERREUR_ENVOI_DU_MESSAGE' ); } if($copie==1) { $recipientc = "$email"; $mailheaders = "From: $hemail<$hemail> \n"; $mailc =& JFactory::getMailer(); $mailc->addRecipient( $recipientc ); $mailc->setSubject( $subject ); $mailc->setBody( $msg ); $mailc->Send(); } $link = "index.php?option=com_joomloc&view=loc&layout=singleloc&site_id=".$id."&Itemid=".$itid; $this->setRedirect($link, $confmsg); } function moove_cal() { global $mainframe; $updown = JRequest::getVar( 'updown'); $startmonth = JRequest::getVar( 'startmonth'); $room_id = JRequest::getVar( 'room_id'); $month1 = JHTML::_('date', $startmonth, 'm'); $year1 = JHTML::_('date', $startmonth, 'Y'); $db =& JFactory::getDBO(); $query = "SELECT * FROM --#__lbresa_config"; $db->setQuery( $query ); $config = $db->loadObject(); $monaie = $config->monaie; echo "<a href='javascript:closedivcal($room_id)'>".JText::_( 'COM_JOOMLOC_FERMER_LE_CALENDRIER')."</a><br/><br/>"; echo "<table id='infos_dispo'><tr><td class='nofree'>".JText::_( 'COM_JOOMLOC_NON_DISPONIBLE' )."</td><td class='free'>".JText::_( 'COM_JOOMLOC_DISPONIBLE' )."</td><td class='sold'>".JText::_( 'COM_JOOMLOC_PROMOTION' )."</td></tr></table><bR>"; //va contenir trois tableau html 1 mois de l'annÈe //pour trois mois a partir de today $table_cal= array(); $base1 =$startmonth; $base2 = $startmonth+3; //pour trois mois ‡ partir d'aujourd'hui for($r=0 ;$r<3 ;$r++) { //2 764 800 sec sur d'aller au mois suivant (32 (31 +1) jours) $newdate = date("Y-m-d", mktime(0, 0, 0, $month1+$r, 2, $year1)); //$this_month_letter=date('F',($r*2764800+time())); $this_month = JHTML::_('date', $newdate, 'F'); // annee de type aaaa $this_year_letter= JHTML::_('date', $newdate, 'Y'); $table='<table border="1" id="joomloc_cal_month" >'."\n"; $table.='<tr><td colspan="7"><b>'.$this_month." ".$this_year_letter.' </b></td></tr>'; $table.='<tr class="jcalday"><td>'.JText::_( 'COM_JOOMLOC_MON').'</td> <td>'.JText::_( 'COM_JOOMLOC_TUE').'</td> <td>'.JText::_( 'COM_JOOMLOC_WED').'</td> <td>'.JText::_( 'COM_JOOMLOC_THU').'</td> <td>'.JText::_( 'COM_JOOMLOC_FRI').'</td> <td>'.JText::_( 'COM_JOOMLOC_SAT').'</td> <td>'.JText::_( 'COM_JOOMLOC_SUN').'</td></tr>'; $today_date= JHTML::_('date', $newdate, 'd-m-Y'); $today_num= JHTML::_('date', $newdate, 'd'); $today_letters= JHTML::_('date', $newdate, 'D'); $this_year=JHTML::_('date', $newdate, 'Y'); $this_month=JHTML::_('date', $newdate, 'm'); // $this_month+=$r; //$fev= is_bis-_-tile($this_year) ? 29 : 28 ; //annÈe bi-_-tile if( (is_int($this_year/4) && !is_int($this_year/100)) || is_int($this_year/400)) { // AnnÈe bis-_-tile // vous remplacez le retour par ce que vou voulez $fev=29; } else { $fev=28; } $max_day_month_array= array("31",$fev,"31","30","31","30","31","31","30","31","30","31") ; $last_day_this_month= $max_day_month_array[$this_month-1]; $nb_weeks_before_today=ceil($today_num/7); //nb semaine dans le mois arrondi a l'entier superieur $nb_weeks_in_month= ceil($last_day_this_month/7); //remontons les dispos pour chaque mois // depuis lbresa_cal avec un between // 1 jour du mois au dernier $first_day_sql=$this_year."-".$this_month."-01"; $last_day_sql=$this_year."-".$this_month."-".$last_day_this_month; $query="select * from --#__lbresa_cal where id_room=$room_id and date between '$first_day_sql' and '$last_day_sql' order by date asc "; $db->setQuery($query); $cal_liste=$db->loadObjectList(); //les jours de la semaine $week= array("Mon","Tue","Wed","Thu","Fri","Sat","Sun"); //remplir la premiere semaine //connaitre le nom du premier jour du mois $first_day_month_letter=date('D',strtotime($this_year."-".$this_month."-01")); //cherchons l'index de ce premier jour dans notre tableau week $index=0; for($i=0;$i<count($week);$i++) { if($week[$i]==$first_day_month_letter) { $index=$i; } } //remplissons maintenant la premiere semaine de notre calendar //les jour qui ne font pas parti du mois seront des cases blanches $table.='<tr>'; for($i=0; $i<$index ; $i++) { $vide_space=" "; $table.='<td class="noday">'.$vide_space.'</td>'; } //les premiers jour du mois ‡ remplir $day_number=0; for($i=$index; $i<count($week) ;$i++) { $day_number++; //couleur des dispos //$font_color=($cal_liste[$day_number-1]->dispo > 0) ? "green;" : "red;" ; $cdate = date("Y-m-d",time()); if($cal_liste[$day_number-1]->dispo > 0 and $cal_liste[$day_number-1]->date >= $cdate) { $free=1; $classday = "free"; } else { $free=0; $classday = "nofree"; } //couleur des prix reduits if($cal_liste[$day_number-1]->prixred>0 and $cal_liste[$day_number-1]->date >= $cdate) { $classday = $classday." sold"; } elseif($cal_liste[$day_number-1]->date < $cdate) { $classday = $classday." past"; } if($cal_liste[$day_number-1]->prixred>0) { $day_price = $cal_liste[$day_number-1]->prixred." ".$monaie; } else { $day_price = $cal_liste[$day_number-1]->prix." ".$monaie; } //italique et gras pour le today $date=$day_number."-".$this_month."-".$this_year; $font_style= ($date==date("d-m-Y",time())) ? "italic;" : "normal;"; $font_weight= ($date==date("d-m-Y",time())) ? "bold;" : "normal;"; $add = JHTML::_('date', $cal_liste[$day_number-1]->date, 'd-m-Y'); $add2 = JHTML::_('date', $cal_liste[$day_number-1]->date, 'Y-m-d'); if($free==1) { $table.='<td class="'.$classday.'" style="font-style:'.$font_style.' font-weight:'.$font_weight.'"><span title="$day_price"'.$day_number.'</span></td>'; } else { $table.='<td class="'.$classday.'" ><strike style="color:'.$font_color.' font-style:'.$font_style.' font-weight:'.$font_weight.'">'.$day_number.'</strike></td>'; } } $table.='</tr>'."\n"; //on commence a compter le nombre de lignes ecrite pour corriger sir fevrier insuffisant $nb_lines=1; //remplissons les semaines restantes //on part de 1 car nous avons deja rempli la premiere semaine for($i=1;$i<=($nb_weeks_in_month);$i++) { $table.="<tr>"; for($j=0;$j<count($week);$j++) { $day_number++; // day number ne doit pas depasser 30 ou 31 // au del‡ on y met un vide_space dans la case if($day_number<=$last_day_this_month) { //couleur des dispos //$font_color=($cal_liste[$day_number-1]->dispo > 0) ? "green;" : "red;" ; $cdate = date("Y-m-d",time()); if($cal_liste[$day_number-1]->dispo > 0 and $cal_liste[$day_number-1]->date >= $cdate) { $free=1; $classday = "free"; } else { $free=0; $classday = "nofree"; } //couleur des prix reduits //$bg_color=($cal_liste[$day_number-1]->prixred>0) ? "#FFFF00;" :"#DCDCDC;"; if($cal_liste[$day_number-1]->prixred>0 and $cal_liste[$day_number-1]->date >= $cdate) { $classday = $classday." sold"; } elseif($cal_liste[$day_number-1]->date < $cdate) { $classday = $classday." past"; } if($cal_liste[$day_number-1]->prixred>0) { $day_price = $cal_liste[$day_number-1]->prixred." ".$monaie; } else { $day_price = $cal_liste[$day_number-1]->prix." ".$monaie; } //italique et gras pour le today $date=$day_number."-".$this_month."-".$this_year; $font_style= (date("d-m-Y",strtotime($date))==date("d-m-Y",time())) ? "italic;" : "normal;"; $font_weight= (date("d-m-Y",strtotime($date))==date("d-m-Y",time())) ? "bold;" : "normal;"; $add = JHTML::_('date', $cal_liste[$day_number-1]->date, 'd-m-Y'); $add2 = JHTML::_('date', $cal_liste[$day_number-1]->date, 'Y-m-d'); if($free==1) { $table.="<td class='$classday' style='font-style:".$font_style." font-weight:".$font_weight."'><span title='$day_price'>".$day_number."</span></td>"; } else { $table.="<td class='$classday'><strike style='color:".$font_color." font-style:".$font_style." font-weight:".$font_weight." '>".$day_number."</strike></td>"; } } else { $table.="<td style='background-color:#708090; color:#708090;'>".$vide_space."0</td>"; } } $table.="</tr>\n"; $nb_lines++; } // on verifie que le nombre de ligne est suffisant sinon on l'ajoute if($nb_lines==5) { $table.="<tr>"; for($l=0;$l<count($week);$l++) { $table.="<td style='background-color:#708090; color:#708090;'>".$vide_space."0</td>"; } $table.="</tr>\n"; } $table.='</table>'; $table_cal[]=$table; }// end for $r // print_r($table_cal); $topdate = date("Y-m-d", mktime(0, 0, 0, $month1+3, 2, $year1)); $backdate = date("Y-m-d", mktime(0, 0, 0, $month1-3, 2, $year1)); $nowlimitdate = date("Y-m-d", mktime(0, 0, 0, date('m'), 2, date('Y'))); //on range les tab dans du dom_html $dom_html= "<table width='100%' id='joomloc_cal' >\n"; if($backdate>=$nowlimitdate) { $dom_html.= "<tr><td width='5%'><a href='javascript:moove_cal(1, \"".$backdate."\", $room_id)'><img src='".JURI::base()."components/com_joomloc/images/fleche-G.gif' border='0' /></a></td>\n"; } else { $dom_html.= "<tr><td width='5%'><img src='".JURI::base()."components/com_joomloc/images/fleche-G.gif' /></td>\n"; } foreach($table_cal as $table) { $dom_html.="<td>".$table."</td>"; } $dom_html.= "<td width='5%'><a href='javascript:moove_cal(2,\"".$topdate."\", $room_id)'><img src='".JURI::base()."components/com_joomloc/images/fleche-D.gif' border='0' /></a></td></tr></table>"; //on affiche le dom echo $dom_html ; $mainframe->close(); }//function moove_cal }//class |
Dernière édition: il y a 11 ans, 9 mois par .
|
Temps de génération de la page: 0.75 secondes