• 05-05-2014, 13:30:15
    #1
    Hocalarım;

    Bir anket scripti üzerine çalışıyorum ancak bir konuda takıldım kaldım. Sorunum şu alt alta listelenmiş cevap şıklarını sorunun sağ tarafına sıralamak istiyorum ancak başaramadım. Kodlar ve yapmak istediğim ekran görüntüsü aşağıdaki gibidir. Nasıl yaparım bunu

    Standart düzen:


    Yapmak istediğim


    // First poll definition
    $p = new Poll;
    $p->question = "What is your favorite color?";	// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "First Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_RADIOBUTTONS;		// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "Red");						// Poll value ID and a display string
    $p->add_value("2", "Green");
    $p->add_value("3", "Blue");
    $p->add_value("4", "Yellow");
    $VALID_POLLS["1"] = $p;							// "1" is the poll ID
  • 05-05-2014, 14:06:50
    #2
    Kodlarınızın geri kalanınıda paylaşır mısınız?
  • 05-05-2014, 14:08:38
    #3
    moss218 adlı üyeden alıntı: mesajı görüntüle
    Kodlarınızın geri kalanınıda paylaşır mısınız?
    Hocam kodlar aşağıdaki gibi sayfanın içindeki tüm kodlar
    <?php
    /****************************************************************************
     * DRBPoll
     * http://www.dbscripts.net/poll/
     * 
     * Copyright © 2007-2009 Don B 
     ****************************************************************************/
    
    require_once(dirname(__FILE__) . '/class.php');	// For the Poll class definition
    
    // Modify this string to reflect the URL where DRBPoll is installed.
    // A trailing slash must be included.  This URL will be used in the generated 
    // HTML for the URL for the form submission.  This may be a relative or 
    // absolute URL.
    $POLL_URL = 'poll/';
    
    // Names of the form input elements in the poll form.
    // You probably won't need to change these unless the names conflict with some 
    // other element on your pages.
    $POLL_ID_PARAM_NAME = "pollid";
    $VOTE_PARAM_NAME = "vote";
    
    // Maximum width of a bar of the poll results, in pixels
    // Change this if you want to make the poll bar chart larger 
    // or smaller in width.
    $MAX_POLL_BAR_WIDTH = 200;
    
    // Whether or not the script should prevent the same IP address 
    // from voting multiple times on the same poll.
    // Set to FALSE to allow duplicate votes.  
    $PREVENT_DUPLICATE_VOTES = TRUE;
    
    // Whether or not vote counts should be displayed. 
    // If set to FALSE, only the percentages will be shown.  
    $SHOW_COUNTS = TRUE;
    
    // These are the strings that are displayed in the poll control 
    // and the result page.
    // Modify these to customize what is displayed to the user.
    $SUBMIT_BUTTON_STRING = 'Submit';
    $NUMBER_OF_VOTES_STRING = 'Total votes: %s';
    $VOTE_STRING = 'Vote:';						// Used as label for combobox control type
    $VOTE_LIST_DEFAULT_LABEL = 'Please Select';	// This is the "empty" option when using a combobox
    $VIEW_RESULTS_STRING = 'Current Results';
    $DUPLICATE_VOTE_ERROR_MSG = 'You have already voted!';
    $NO_VOTE_SELECTED_ERROR_MSG = 'You forgot to select a value!';
    
    // List of valid polls.  All vote requests are checked against this list 
    // to ensure that malicious users do not submit invalid poll IDs through a 
    // cross-site request forgery.  
    //
    // Add or modify the $VALID_POLLS array to add, modify, or remove polls.   
    // The key of the $VALID_POLLS associative array represents the poll ID; 
    // this value must be a string.  In addition, it must only use alphanumeric 
    // characters (A-Z, a-z, and 0-9).
    //
    // Set the question property of the Poll object to a string representing 
    // the question to be displayed.
    //
    // Call add_value() on the Poll object to add a new value.  The first 
    // parameter represents the value ID, which must be a alphanumeric string.  
    // The second parameter is the string to display to the user for this value.
    
    $VALID_POLLS = array();	// The keys of this associative array are the poll IDs
    
    // First poll definition
    $p = new Poll;
    $p->question = "What is your favorite color?";	// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "First Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_RADIOBUTTONS;		// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "Red");						// Poll value ID and a display string
    $p->add_value("2", "Green");
    $p->add_value("3", "Blue");
    $p->add_value("4", "Yellow");
    $VALID_POLLS["1"] = $p;							// "1" is the poll ID
    
    // Second poll definition
    $p = new Poll;
    $p->question = "Cinsiyetiniz?";				// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "Second Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_COMBOBOX;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "Kadın");				// Poll value ID and a display string
    $p->add_value("2", "Erkek");
    $VALID_POLLS["2"] = $p;							// "2" is the poll ID
    
    
    $p = new Poll;
    $p->question = "Mesleki Kıdeminiz?";				// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "Second Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_COMBOBOX;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "0 - 1 Yıl");				// Poll value ID and a display string
    $p->add_value("2", "2 - 3 Yıl");
    $p->add_value("3", "3 - 5 Yıl");
    $p->add_value("4", "6 - 7 Yıl");
    $p->add_value("5", "8 - 10 Yıl");
    $p->add_value("6", "11 Yıl ve üstü");
    $VALID_POLLS["3"] = $p;		
    
    ?>
  • 05-05-2014, 15:02:08
    #4
    tisinamy adlı üyeden alıntı: mesajı görüntüle
    Hocam kodlar aşağıdaki gibi sayfanın içindeki tüm kodlar
    <?php
    /****************************************************************************
     * DRBPoll
     * http://www.dbscripts.net/poll/
     * 
     * Copyright © 2007-2009 Don B 
     ****************************************************************************/
    
    require_once(dirname(__FILE__) . '/class.php');	// For the Poll class definition
    
    // Modify this string to reflect the URL where DRBPoll is installed.
    // A trailing slash must be included.  This URL will be used in the generated 
    // HTML for the URL for the form submission.  This may be a relative or 
    // absolute URL.
    $POLL_URL = 'poll/';
    
    // Names of the form input elements in the poll form.
    // You probably won't need to change these unless the names conflict with some 
    // other element on your pages.
    $POLL_ID_PARAM_NAME = "pollid";
    $VOTE_PARAM_NAME = "vote";
    
    // Maximum width of a bar of the poll results, in pixels
    // Change this if you want to make the poll bar chart larger 
    // or smaller in width.
    $MAX_POLL_BAR_WIDTH = 200;
    
    // Whether or not the script should prevent the same IP address 
    // from voting multiple times on the same poll.
    // Set to FALSE to allow duplicate votes.  
    $PREVENT_DUPLICATE_VOTES = TRUE;
    
    // Whether or not vote counts should be displayed. 
    // If set to FALSE, only the percentages will be shown.  
    $SHOW_COUNTS = TRUE;
    
    // These are the strings that are displayed in the poll control 
    // and the result page.
    // Modify these to customize what is displayed to the user.
    $SUBMIT_BUTTON_STRING = 'Submit';
    $NUMBER_OF_VOTES_STRING = 'Total votes: %s';
    $VOTE_STRING = 'Vote:';						// Used as label for combobox control type
    $VOTE_LIST_DEFAULT_LABEL = 'Please Select';	// This is the "empty" option when using a combobox
    $VIEW_RESULTS_STRING = 'Current Results';
    $DUPLICATE_VOTE_ERROR_MSG = 'You have already voted!';
    $NO_VOTE_SELECTED_ERROR_MSG = 'You forgot to select a value!';
    
    // List of valid polls.  All vote requests are checked against this list 
    // to ensure that malicious users do not submit invalid poll IDs through a 
    // cross-site request forgery.  
    //
    // Add or modify the $VALID_POLLS array to add, modify, or remove polls.   
    // The key of the $VALID_POLLS associative array represents the poll ID; 
    // this value must be a string.  In addition, it must only use alphanumeric 
    // characters (A-Z, a-z, and 0-9).
    //
    // Set the question property of the Poll object to a string representing 
    // the question to be displayed.
    //
    // Call add_value() on the Poll object to add a new value.  The first 
    // parameter represents the value ID, which must be a alphanumeric string.  
    // The second parameter is the string to display to the user for this value.
    
    $VALID_POLLS = array();	// The keys of this associative array are the poll IDs
    
    // First poll definition
    $p = new Poll;
    $p->question = "What is your favorite color?";	// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "First Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_RADIOBUTTONS;		// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "Red");						// Poll value ID and a display string
    $p->add_value("2", "Green");
    $p->add_value("3", "Blue");
    $p->add_value("4", "Yellow");
    $VALID_POLLS["1"] = $p;							// "1" is the poll ID
    
    // Second poll definition
    $p = new Poll;
    $p->question = "Cinsiyetiniz?";				// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "Second Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_COMBOBOX;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "Kadın");				// Poll value ID and a display string
    $p->add_value("2", "Erkek");
    $VALID_POLLS["2"] = $p;							// "2" is the poll ID
    
    
    $p = new Poll;
    $p->question = "Mesleki Kıdeminiz?";				// Question displayed to the user
    $p->returnToURL = "../example.php";				// Specify the URL to return to for this poll; may be relative or absolute
    $p->legend = "Second Poll";						// Form legend; leave empty for none
    $p->control_type = $CONTROL_COMBOBOX;			// Control type; $CONTROL_RADIOBUTTONS or $CONTROL_COMBOBOX
    $p->add_value("1", "0 - 1 Yıl");				// Poll value ID and a display string
    $p->add_value("2", "2 - 3 Yıl");
    $p->add_value("3", "3 - 5 Yıl");
    $p->add_value("4", "6 - 7 Yıl");
    $p->add_value("5", "8 - 10 Yıl");
    $p->add_value("6", "11 Yıl ve üstü");
    $VALID_POLLS["3"] = $p;		
    
    ?>
    Kodlarda <br> atıyor, template içerisinde <br /> arayın.
  • 05-05-2014, 15:13:47
    #5
    moss218 adlı üyeden alıntı: mesajı görüntüle
    Kodlarda <br> atıyor, template içerisinde <br /> arayın.
    Cok tesekkur ederim Hocam sorunumu bire bir cozup ilgilendiginiz icin sukranlarimi arz ederim.