As if all I fight with the vote from this lesson . Actually there was an assumption that maybe something is not working due to the fact that the lesson is for one version of php, and I have another one. Is it possible?
Actually, if in brief, now just by choosing the option and pressing the vote button, the container contents change, the voting results are shown, but most importantly the voting does not occur (that is, the result and the IP address are not recorded in special files). Description of what is now.
In one of the places I need, I call the function:
myPoll_v_1(); Description of the function (in one of the template files):
function myPoll_v_1(){ global $user_ID; if ($user_ID) {//если залогинен, то выполняем ?> <script type="text/javascript"> $(document).ready(function () { //как только все загружено $('#pollc').load('p/my_poll/xxx.html'); //подгружаем форму(это не обходимо так как php файлу надо знать куда возвращать результат) }); </script> <div id="pollc"> <!--куда подгружать форму--> </div> <? }else{//если не залогинен выводим пробел echo ' '; } } form file (xxx.html):
<script src="/p/my_poll/poll.js" type="text/javascript" charset="utf-8"><!-- засунул подключение сюда, так как в хедере скрипт не срабатывает--></script> <div id="poll-container"> <div class="trace22"><!--трассировка--></div> <h3>Poll</h3> <form id='poll' action="/p/my_poll/poll.php" method="post" accept-charset="utf-8"> <p>Pick your favorite Javascript framework:</p><p> <input type="radio" name="poll" value="opt1" id="opt1" /><label for='opt1'> jQuery</label><br /> <input type="radio" name="poll" value="opt2" id="opt2" /><label for='opt2'> Ext JS</label><br /> <input type="radio" name="poll" value="opt3" id="opt3" /><label for='opt3'> Dojo</label><br /> <input type="radio" name="poll" value="opt4" id="opt4" /><label for='opt4'> Prototype</label><br /> <input type="radio" name="poll" value="opt5" id="opt5" /><label for='opt5'> YUI</label><br /> <input type="radio" name="poll" value="opt6" id="opt6" /><label for='opt6'> mootools</label><br /><br /> <a onclick="return false;">Voooote →</a><br><!-- это за место поля input type submit который не работает вообще--> </p> </form> </div> Is there such a file flatfile.php for working with files as with a database (if I understood correctly) and there is a strange piece that leads me to certain thoughts about the incompatibility of this file with my version of php, it is with a comment in a foreign language (and I don't know Russian well, lol). Excerpt flatfile.php:
function resolveJoins(&$tables) { foreach ($tables as $tablename => $discard) { // PHP4 compatible: can't do : foreach ($tables as $tablename => &$tabledef) // and strangely, if we do // foreach ($tables as $tablename => &$tabledef) // $tabledef =& $tables[$tablename]; // then we get bugs $tabledef =& $tables[$tablename]; foreach ($tabledef as $colname => $discard) { $coldef =& $tabledef[$colname]; // PHP4 compatible if (is_a($coldef, 'JoinColumn') or is_subclass_of($coldef, 'JoinColumn')){ TableUtils::resolveColumnJoin($coldef, $tables); } } } } Here I also asked about this issue.
Please help me figure it out, I’m weak about it because I’m a designer, and I’ve been fighting for 3 days already. And there is no time to study all these technologies. I will give all my points, who will help especially well. )