[ Cracker @ 02.05.2006. 16:11 ] @
Planiram da drzim voting skriptu na svom sajtu ispod menija. Ovakvu http://www.yugioh.co.yu/test.html Ali problem je sto nema dovoljno mesta u tom delu sajta za otvaranja rezultata. E sad, hteo bih da se ti rezultati otvaraju u novom malom prozorcicu sa fiksiranom ili dinamicki dodeljivanom visinom i sirinom, jer to je jedini nacin. Dakle treba uraditi jednu redirekciju i setovati odgovarajuce sirine te male stranice. Ovo su kodovi index.php i template-a. Pa ko se razume u php ili css molio bih da mi pomogne. index.php: Code: <?php /***************************************************** ** Title........: Configuration File ** Filename.....: config.php ** Author.......: Ralf Stadtaus ** Homepage.....: http://www.stadtaus.com/ ** Contact......: http://www.stadtaus.com/forum/ ** Notes........: This file contains the configuration *****************************************************/ /***************************************************** ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY ** OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT ** LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES ** OR OTHER LIABILITY, WHETHER IN AN ACTION OF ** CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF ** OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ** OTHER DEALINGS IN THE SOFTWARE. ** *****************************************************/ /***************************************************** ** Script configuration - for the documentation of ** following variables please take a look at the ** documentation file in folder 'docu'. *****************************************************/ $vote_text = 'Koji tip deka koristite?'; $vote_option[] = 'Spellcaster'; $vote_option[] = 'Dragon'; $vote_option[] = 'Zombije'; $vote_option[] = 'Warriore'; $vote_option[] = 'Neki drugi'; $intern_vote_name = 'operating_system'; $form_field_type = 'radio'; // (radio, select, readio_image) $bar_image_name = 'blue.gif'; $max_bar_width = '200'; // (pixel) $check_ip_address = 'no'; // (yes/no) $check_cookie = 'no'; $language = 'en'; // See folder "languages" $path['templates'] = './templates/'; $path['logfiles'] = './logfiles/'; $tmpl['layout'] = 'voting.tpl.html'; $log['logfile'] = 'log.txt'; $show_error_messages = 'yes'; /***************************************************** ** Add here further words, text, variables and stuff ** that you want to appear in the template. *****************************************************/ $add_text = array( 'txt_additional' => 'Additional', // {txt_additional} 'txt_more' => 'More', // {txt_more} 'txt_script_name' => 'Voting Script' ); /***************************************************** ** Send safety signal to included files *****************************************************/ define('IN_SCRIPT', 'true'); /***************************************************** ** Include script code *****************************************************/ $script_root = './'; include($script_root . 'inc/core.inc.php'); ?> template: Code: <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{vote_title} - {txt_script_name} {txt_script_version}</title> <meta http-equiv="Content-Type" content="text/html; charset={txt_charset}" /> <style type="text/css"> <!-- h3, p, body, td { font-family:Helvetica, Sans-serif; font-size:8pt; } #poweredby { text-align:center; } --> </style> </head> <body> <h3>{vote_title}</h3> <p> {vote_text} <IF NAME="display_link"> (<a href="{document_self}">{txt_display_form}</a>) </IF NAME="display_link"> </p> <IF NAME="display_results"> <table border="0" cellspacing="3" cellpadding="1"> <LOOP NAME="vote_result"> <tr> <td>{vote_option}</td> <td><img src="./templates/images_voting/{bar_image_name}" height="15" width="{bar_width}" alt="" border="0"></td> <td> {vote_number}</td> <td> {relation} %</td> </tr> </LOOP NAME="vote_result"> </table> <p>{txt_total_votes}: {total_votes}</p> </IF NAME="display_results"> <p> <LOOP NAME="message"> <strong>{message}</strong><br /> </LOOP NAME="message"> </p> <IF NAME="display_form"> <form name="vote" action="{script_self}" method="post"> {vote_form_fields} <p><input type="submit" name="send" value="{txt_submit}"> (<a href="{document_self}?result=true">{txt_display_results}</a>)</p> </form> </IF NAME="display_form"> </body> </html> |