-
- 3 Posts
Добрый день,
Есть проблемка..
1. Создал таблицу в базе данных modx для помещения голосов из плеера с главной страницы
2. Написал класс на php в сниппетах
3. Разместил это все на главной странице
Все отображается, но как буд то один раз только, данные а базе меняются после нажатия iLike но на странице они не обновляются.
Прошу помочь
Hello, I need your help
1. I have created the table in the database in modx base
2. I have created the snippet which create player with iLike button(like poll)
3. I have published it to live
All content is correctly showed, but when I try to click iLike button, data in the database update, but data in the page in left hand of iLike button not update
Could you please help me as soon as possible!
Ниже приведу сниппет
<?php
class Coor
{
var $songname;
var $songid;
var $songaddr;
var $songstatus;
var $songcounter;
var $query;
function Coor($songname,$songid,$songaddr)
{
$this->songname = $songname;
$this->songid = $songid;
$this->songaddr = $songaddr;
$this->getCounter();
$this->mp3Player();
}
function mp3Player()
{
echo '
<div id="player_body">
<div style="margin-left:30px;color:#91bbc3;">'.$this->songname.'</div>
<div style="width:200px;float:left;">
<object type="application/x-shockwave-flash" data="assets/components/player_mp3_maxi.swf" width="200" height="15">
<param name="movie" value="assets/components/player_mp3_maxi.swf" />
<param name="bgcolor" value="#141b37" />
<param name="FlashVars" value="mp3=/assets/audio/'.$this->songaddr.'&showstop=1&showvolume=1&bgcolor1=141b37&bgcolor2=141b37" />
</object>
</div>
<div><a id="links" href="#" onClick="checkip('.$this->songid.');">+iLike ('.$this->songcounter.')</a></div>
</div>';
}
function getCounter()
{
$this->query = mysql_query("SELECT * FROM `modx_ilike` WHERE idtr=".$this->songid."");
$counter_array = mysql_fetch_row($this->query);
$this->songcounter = $counter_array['2'];
}
}
$karimb = new Coor('Karim & Markus - Путь к Вершине','1','karim_markus_put_k_vershine.mp3');
$karimb->Coor('Karim & Dasty - The Best','2','karim_the_best.mp3');
$karimb->Coor('Karim & Markus - Стоп Дым','3','Karim_ft.Markus_stop_dym.mp3');
-
- 3 Posts
короче, сам разобрался, нужно было убрать кэширование страницы