Posted: 2008-04-13 08:02:08
ça ressemble a un problème de connexion a la base sql
est ce que tes paramètres son correct ?
est ce que tes paramètres son correct ?
Official Forum
https://forum.antp.be/phpbb3/
sandmanweb wrote:Ok, j'ai trouvé la solution. Je n'écrivais pas le bon nom pour la database.
sandmanweb wrote:Nevermind, I found my problem.
I was using the name of the generated file for database.
But the database names can be found with PHPmy admin.
You can also see the databases here:
C:\Program Files\MySQL\MySQL Server 4.1\data
thats the names of the folders here.
You will also need MySQL administrator to manage your server.
Don't use a password when you install MySQL or it won't work... at least here.
Bye !
Mais je n'y connais pas grand chose, et j'ai déjà fait énormément de tests... tout ce que j'arrive à faire, c'est déplacer la searchbox horizontalement vers la gauche, mais je n'arrive pas à la descendre en dessous du logo.#mdb .searchbox { position: relative; float: right; text-align: right; width: 200px; }
#mdb .searchbox FORM { display: inline; }
#mdb .searchbox A { position: absolute; right: 0; }
#mdb .searchbox IMG { position: absolute; right: 0; margin: 0; padding: 0; }
#mdb .searchbox .searchbox { position: absolute; right: 20px; width: 100%; height: 18px; border: 0; padding: 6px 0 0 26px; font-size: 12px; font-weight: 700; color: #555555; background-image: url('images/search-bg.gif'); background-repeat: no-repeat; text-align: left; }
Code: Select all
#mdb .searchbox .searchbox { position: absolute; right: 20px; top: 100px; width: 100%; height: 18px; border: 0; padding: 6px 0 0 26px; font-size: 12px; font-weight: 700; color: #555555; background-image: url('images/search-bg.gif'); background-repeat: no-repeat; text-align: left; }
Code: Select all
# SECOND RUN: Recount all values based on _OTHERS
foreach($this->panels as $panel) {
$panel->recount_categories();
}
}
Code: Select all
/** -----------------------------------------------------------------------
* Returns an array of 0 to 5 random films from the whole catalogue.
* Based on version from kazgor
* See http://forum.antp.be/phpbb3/viewtopic.php?p=23084#23084
* @access private
* ----------------------------------------------------------------------*/
function _random_films() {
$tpls = array();
$nummovies = array();
$ii = 0;
$movieinfo = "";
# Get NUM for every movie in database and store it in array
$query = "SELECT NUM FROM $this->mysql_table";
$result = $this->db->query($query);
while ($row = $result->fetch_assoc()) {
array_push($nummovies, $row[NUM]);
}
# The size of the array gives us the max number of movies
$max_films = count($nummovies);
# Set upper limit to $max_films if we have less then 5 movies
$limit = ($max_films < $this->config['options']['random_movies']) ? $max_films : $this->config['options']['random_movies'];
while ($ii < $limit) {
# Pick a random number
# We use the random number as the index of the $nummovies array
$rndfilm = mt_rand(0, $max_films - 1);
$query = "SELECT ORIGINALTITLE, PICTURENAME FROM $this->mysql_table WHERE NUM=$nummovies[$rndfilm]";
$res = $this->db->query($query);
$movieinfo = $res->fetch_assoc();
$HREF = $this->HTTPPATH;
if (strpos($HREF, "?") > 0) {
$HREF .= "&num=".$nummovies[$rndfilm];
} else {
$HREF .= "?num=".$nummovies[$rndfilm];
}
$tpl = new Template($this);
$tpl->add_var("\$RNDFILM[HREF]", $HREF);
$tpl->add_var("\$RNDFILM[PICTURENAME]", $movieinfo['PICTURENAME']);
$tpl->add_var("\$RNDFILM[ORIGINALTITLE]", $movieinfo['ORIGINALTITLE']);
array_push($tpls, $tpl);
# Drop the currently used item from the array so that we
# don't pick it again and decrease max_films
array_splice($nummovies, $rndfilm, 1);
$max_films--;
$ii++;
}
return $tpls;
}
Code: Select all
$tpl->add_subtpl("NPPS", $this->_npp_templates());
Code: Select all
$tpl->add_subtpl("RNDFILMS", $this->_random_films());
Code: Select all
# --- RESULTS MOVIES --------------------------
Code: Select all
# --- RANDOM MOVIES COVERS --------------------
<div class='movies IMGVIEW curvy2'>
<div class="bl"><div class="br"><div class="tl"><div class="tr">
<div class="header">$LANG[RANDOMMOVIES]</div>
<table class='TABLErnd'><tr>
{RNDFILMS}
<td><a class='cover' href='$RNDFILM[HREF]'>
<img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$RNDFILM[PICTURENAME]&w=75' alt='$RNDFILM[ORIGINALTITLE]' title='$RNDFILM[ORIGINALTITLE]'/>
</a></td>
{/RNDFILMS}
</tr></table>
<div class='footer'></div>
</div></div></div></div>
<div class="iefix"> </div>
</div>
Code: Select all
# RANDOM MOVIES
$this->lang['RANDOMMOVIES'] = " 5 films au hasard";
Je précise que j'ai bien apporté les modifs dans le mdb_config.inc... ma table est bien présente dans ma base (quand j'y accèdes depuis le phpadmin)Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 Server at sebast.l.perso.sfr.fr Port 80