Пример #1
0
 /**
  * Produce a string containing a checkbox input inside a table row
  *
  * @param string $name      the string used in the 'name' attribute
  * @param string $title     the string used as the label
  * @param bool   $default   a bool indicating if item should be checked
  * @param string $attr      a string of additional attributes to be put
  *                           in the element (example: 'id="foo"')
  * @param string $thattr    a string of additional attributes to be put
  *                           in the <th> element (example: 'class="foo"')
  * @param string $tdattr    a string of additional attributes to be put
  *                           in the <td> element (example: 'class="foo"')
  * @return string
  *
  * @access public
  * @static
  * @see HTML_Form::displayCheckbox(), HTML_Form::displayCheckboxRow(),
  *      HTML_Form::returnCheckbox(), HTML_Form::addCheckbox()
  */
 function returnCheckboxRow($name, $title, $default = false, $attr = '', $thattr = HTML_FORM_TH_ATTR, $tdattr = HTML_FORM_TD_ATTR)
 {
     $str = " <tr>\n";
     $str .= '  <th ' . $thattr . '>' . $title . "</th>\n";
     $str .= '  <td ' . $tdattr . ">\n   ";
     $str .= HTML_Form::returnCheckbox($name, $default, $attr);
     $str .= "  </td>\n";
     $str .= " </tr>\n";
     return $str;
 }
Пример #2
0
        print "<table>\n";
        print " <tr>\n";
        print "  <td>&nbsp;</td>\n";
        print "  <td><b>{$errorMsg}</b></td>\n";
        print " </tr>\n";
        print "</table>\n";
    }
    print "<form action=\"" . htmlspecialchars($_SERVER['PHP_SELF']) . "\" method=\"post\" name=\"request_form\">\n";
    $bb = new BorderBox("Request a PECL account", "90%", "", 2, true);
    $bb->horizHeadRow("Username:"******"handle", $handle, 12));
    $bb->horizHeadRow("First Name:", HTML_Form::returnText("firstname", $firstname));
    $bb->horizHeadRow("Last Name:", HTML_Form::returnText("lastname", $lastname));
    $bb->horizHeadRow("Password:"******"password", null, 10) . "   Again: " . HTML_Form::returnPassword("password2", null, 10));
    $bb->horizHeadRow("Need a php.net account?", HTML_Form::returnCheckbox("needsvn", $needsvn));
    $bb->horizHeadRow("Email address:", HTML_Form::returnText("email", $email));
    $bb->horizHeadRow("Show email address?", HTML_Form::returnCheckbox("showemail", $showemail));
    $bb->horizHeadRow("Homepage", HTML_Form::returnText("homepage", $homepage));
    $bb->horizHeadRow("Purpose of your PECL account<br />(No account is needed for using PECL or PECL packages):", HTML_Form::returnTextarea("purpose", stripslashes($purpose)));
    $bb->horizHeadRow("Sponsoring users<br />(Current php.net users who suggested you request an account and reviewed your extension/patch):", HTML_Form::returnTextarea("sponsor", stripslashes($sponsor)));
    $bb->horizHeadRow("More relevant information<br />about you (optional):", HTML_Form::returnTextarea("moreinfo", stripslashes($moreinfo)));
    $bb->horizHeadRow("Requested from IP address:", $_SERVER['REMOTE_ADDR']);
    $bb->horizHeadRow("<input type=\"submit\" name=\"submit\" value=\"Submit\" />");
    $bb->end();
    print "</form>";
    if ($jumpto) {
        print "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\n";
        print "if (!document.forms[1].{$jumpto}.disabled) document.forms[1].{$jumpto}.focus();\n";
        print "\n// -->\n</script>\n";
    }
}
response_footer();