예제 #1
0
 $cs_link = make_link('http://git.php.net/?p=php-src.git;a=blob_plain;f=CODING_STANDARDS;hb=HEAD', 'PHP Coding Standards');
 $lic_link_pecl = make_link('http://www.php.net/license/3_01.txt', 'PHP License 3.01');
 $lic_link_doc = make_link('http://www.php.net/manual/en/cc.license.php', 'Creative Commons Attribution License');
 $doc_howto_pecl = make_link('http://wiki.php.net/doc/howto/pecldocs', 'PECL Docs Howto');
 print "<h1>Publishing in PECL</h1>\n\n<p>\n A few reasons why you might apply for a PECL account:\n</p>\n<ul>\n <li>You have written a PHP extension and would like it listed within the PECL directory</li>\n <li>You would like to use php.net for version control and hosting</li>\n <li>You would like to help maintain a current PECL extension</li>\n</ul>\n<p>\n\n<p>\n You do <b>not</b> need an account if you want to download, install and/or use PECL packages.\n</p>\n\n<p>\n Before filling out this form, you must write the public <i>pecl-dev@lists.php.net</i> mailing list and:\n</p>\n<ul>\n <li>Introduce yourself</li>\n <li>Introduce your new extension or the extension you would like to help maintain</li>\n <li>Link to the code, if applicable</li>\n</ul>\n\n<p>\n Also, here is a list of suggestions:\n</p>\n<ul>\n <li>\n  We strongly encourage contributors to choose the {$lic_link_pecl} for their extensions,\n  in order to avoid possible troubles for end-users of the extension. Other solid\n  options are BSD and Apache type licenses.\n </li>\n <li>\n  We strongly encourage you to use the {$cs_link} for your code, as it will help\n  the QA team (and others) help maintain the extension.\n </li>\n <li>\n  We strongly encourage you to commit documentation for the extension, as it will\n  make the extension more visible (in the official PHP manual) and also teach\n  users how to use it. See the {$doc_howto_pecl} for more information.\n  Submitted documentation will always be under the {$lic_link_doc}.\n </li>\n <li>\n  Note: wrappers for GPL (all versions) or LGPLv3 libraries will not be accepted.\n  Wrappers for libraries licensed under LGPLv2 are however allowed while being discouraged.\n </li>\n <li>\n  Note: Wrappers for libraries with license fees or closed sources libraries without licenses fees\n  are allowed.\n </li>\n\n</ul>\n\n<p>\n And after submitting the form:\n</p>\n<ul>\n <li>\n  If approved, you will also need to <a href='http://php.net/git-php.php'>apply for a php.net account</a>\n  in order to commit the code to the php.net SVN repository. Select 'PECL Group' within that form when applying.\n </li>\n</ul>\n\n<p>\n <strong>Please confirm the reason for this PECL account request:</strong>\n</p>\n\n<script language=\"JavaScript\" type=\"text/javascript\" defer=\"defer\">\n<!--\n\tfunction reasonClick(option)\n\t{\n\t\tif (option == 'pkg') {\n\t\t\tenableForm(true);\n\n\t\t\t// Lose border\n\t\t\tif (document.getElementById) {\n\t\t\t\tdocument.getElementById('reason_table').style.border = '2px dashed green';\n\t\t\t}\n\t\t} else {\n\t\t\t// Gain border\n\t\t\tif (document.getElementById) {\n\t\t\t\tdocument.getElementById('reason_table').style.border = '2px dashed red';\n\t\t\t}\n\n\t\t\talert('Reminder: please only request a PECL account if you will maintain a PECL extension, and have followed the guidelines above.');\n\t\t\tenableForm(false);\n\t\t}\n\t}\n\n\tfunction enableForm(disabled)\n\t{\n\t\tfor (var i=0; i<document.forms['request_form'].elements.length; i++) {\n\t\t\tdocument.forms['request_form'].elements[i].disabled = !disabled;\n\t\t\t//document.forms['request_form'].elements[i].style.backgroundColor = '#c0c0c0';\n\t\t}\n\t}\n\n\tenableForm(false);\n//-->\n</script>\n\n<table border=\"0\" style=\"border: 2px #ff0000 dashed; padding: 0px\" id=\"reason_table\">\n\t<tr>\n\t\t<td valign=\"top\"><input type=\"radio\" name=\"reason\" value=\"pkg\" id=\"reason_pkg\" onclick=\"reasonClick('pkg')\" /></td>\n\t\t<td>\n\t\t\t<label for=\"reason_pkg\">\n\t\t\t\tI have already discussed the topic of maintaining and/or adding a PECL extension on the\n\t\t\t\tpecl-dev@lists.php.net mailing list, and we determined it's time for me to have a PECL account.\n\t\t\t</label>\n\t\t</td>\n\t</tr>\n\n\t<tr>\n\t\t<td valign=\"top\"><input type=\"radio\" name=\"reason\" value=\"other\" id=\"reason_other\" onclick=\"reasonClick('other')\" /></td>\n\t\t<td>\n\t\t\t<label for=\"reason_other\">I desire this PECL account for another reason.</label>\n\t\t</td>\n\t</tr>\n</table>\n";
 if (isset($errorMsg)) {
     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) {
예제 #2
0
            if (empty($r['state'])) {
                $r['state'] = 'devel';
            }
            $r['releasedate'] = substr($r['releasedate'], 0, 10);
            $dl = $downloads[$r_version];
            $downloads_html = '';
            foreach ($downloads[$r_version] as $dl) {
                $downloads_html .= "<a href=\"/get/{$dl['basename']}\">" . "{$dl['basename']}</a> (" . sprintf("%.1fkB", @filesize($dl['fullpath']) / 1024.0) . ")";
                $urls = package_dll::getDllDownloadUrls($pkg['name'], $r_version, $pkg['releases'][$r_version]['releasedate']);
                if ($urls) {
                    $downloads_html .= "&nbsp;&nbsp;<a href=\"/package/{$pkg['name']}/{$r_version}/windows\">" . "<img src=\"/gifs/windows-icon.png\" />DLL</a>";
                }
            }
            $link_changelog = "<small>[" . make_link("/package-changelog.php?package=" . $pkg['name'] . "&release=" . $r_version, "Changelog") . "]</small>";
            $href_release = "/package/" . $pkg['name'] . "/" . $r_version;
            $bb->horizHeadRow(make_link($href_release, $r_version), $r['state'], $r['releasedate'], $downloads_html, $link_changelog);
        }
    }
    $bb->end();
    print "<br /><br />\n";
}
// }}}
// {{{ "Dependencies"
$title = "Dependencies";
if ($relid) {
    $title .= " for release {$version}";
}
$bb = new Borderbox($title, "90%", "", 2, true);
$rels =& $pkg['releases'];
// Check if there are too much things to show
$too_much = false;
예제 #3
0
if (empty($handle)) {
    localRedirect("/accounts.php");
}
$dbh->setFetchmode(DB_FETCHMODE_ASSOC);
$row = $dbh->getRow("SELECT * FROM users WHERE registered = 1 " . "AND handle = ?", array($handle));
if ($row === null) {
    // XXX: make_404();
    PEAR::raiseError("No account information found!");
}
$access = $dbh->getCol("SELECT path FROM cvs_acl WHERE username = ?", 0, array($handle));
response_header($row['name']);
print "<h1>" . $row['name'] . "</h1>\n";
print "<table border=\"0\" cellspacing=\"4\" cellpadding=\"0\">\n";
print "<tr><td valign=\"top\">\n";
$bb = new BorderBox("Account Details", "100%", "", 2, true);
$bb->horizHeadRow("Handle:", $handle);
$bb->horizHeadRow("Name:", $row['name']);
if ($row['showemail'] != 0) {
    $bb->horizHeadRow("Email:", "<a href=\"/account-mail.php?handle=" . $handle . "\">" . str_replace(array("@", "."), array(" at ", " dot "), $row['email']) . "</a>");
}
if ($row['homepage'] != "") {
    $url = parse_url($row['homepage']);
    if (empty($url['scheme'])) {
        $row['homepage'] = 'http://' . $row['homepage'];
    }
    $bb->horizHeadRow("Homepage:", "<a href=\"{$row['homepage']}\" target=\"_blank\">" . "{$row['homepage']}</a></td>\n");
}
//XXX: Remove entirely?
//$bb->horizHeadRow("Registered since:", $row['created']);
$bb->horizHeadRow("Additional information:", empty($row['userinfo']) ? "&nbsp;" : $row['userinfo']);
$bb->horizHeadRow("VCS Access:", implode("<br />", $access));
예제 #4
0
 $title = "New Package";
 response_header($title);
 print "<h1>{$title}</h1>\n\n<p>Use this form to register a new package.</p>\n\n\n<p>\n<b>Before proceeding</b>, make sure you pick the right name for your\npackage.  This is usually done through \"community consensus\", which\nmeans posting a suggestion to the pecl-dev mailing list and have\npeople agree with you.\n</p>\n\n\n";
 if (isset($errorMsg)) {
     print "<table>\n";
     print " <tr>\n";
     print "  <td>&nbsp;</td>\n";
     print "  <td><b>{$errorMsg}</b></td>\n";
     print " </tr>\n";
     print "</table>\n";
 }
 $categories = $dbh->getAssoc("SELECT id,name FROM categories ORDER BY name");
 $form =& new HTML_Form(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES), "POST");
 print "<form method=\"post\" action=\"" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES) . "\">\n";
 $bb = new BorderBox("Register package", "100%", "", 2, true);
 $bb->horizHeadRow("Package Name", $form->returnText("name", get("name"), 20, 80));
 $bb->horizHeadRow("License", $form->returnText("license", get("license"), 20, 50));
 $cats = $form->returnSelect("category", $categories, get("category"), 1, "--Select Category--");
 $bb->horizHeadRow("Category", $cats);
 $bb->horizHeadRow("Summary", $form->returnText("summary", get("summary"), $width));
 $bb->horizHeadRow("Full description", $form->returnTextarea("desc", get("desc"), $width, 3));
 $bb->horizHeadRow("Additional project homepage", $form->returnText("homepage", get("homepage"), 40, 255));
 $bb->horizHeadRow("Browse Source URL", $form->returnText("cvs_link", get("cvs_link"), 40, 255) . '<br /><small>For example: http://cvs.php.net/cvs.php/pecl/PDO</small>');
 $bb->fullRow($form->returnSubmit("Submit Request", "submit"));
 $bb->end();
 if ($jumpto) {
     print "\n<script language=\"JavaScript\">\n<!--\n";
     print "document.forms[1].{$jumpto}.focus();\n";
     print "// -->\n</script>\n";
 }
 print "</form>\n";
예제 #5
0
파일: index.php 프로젝트: stof/pearweb
</script>
<?php 
// }}}
$self = htmlspecialchars($_SERVER['PHP_SELF']);
$acreq = isset($_GET['acreq']) ? strip_tags(htmlspecialchars($_GET['acreq'])) : '';
do {
    // {{{ "approve account request" form
    if (!empty($acreq)) {
        include_once 'pear-database-user.php';
        $requser = user::info($acreq, null, false);
        if (empty($requser['name']) || $requser['from_site'] == 'pecl') {
            break;
        }
        list($purpose, $moreinfo) = @unserialize($requser['userinfo']);
        $bb = new BorderBox('Account request from ' . $requser['name'] . ' &lt;' . $requser['email'] . '&gt;', "100%", '', 2, true);
        $bb->horizHeadRow("Requested username:"******"Realname:", $requser['name']);
        $bb->horizHeadRow("Email address:", '<a href="mailto:' . $requser['email'] . '">' . $requser['email'] . "</a>");
        $bb->horizHeadRow("Purpose of account:", $purpose);
        $bb->horizHeadRow("More information:", $moreinfo);
        $bb->end();
        $i = "      ";
        print "<br />\n";
        print "{$i}<form action=\"{$self}\" method=\"POST\">\n";
        print $i . '   <input type="hidden" name="id" value="' . $requser['handle'] . "\" />\n";
        print "{$i}   <input type=\"hidden\" name=\"acreq\" value=\"{$acreq}\" />\n";
        print $i . ' <select name="from_site"> ' . "\n";
        print $i . '  <option value="pear">PEAR</option>' . "\n";
        print $i . '  <option value="pecl">PECL</option>' . "\n";
        print $i . ' </select> ' . "\n";
        print "{$i}   <input type=\"submit\" value=\"Move\" name=\"cmd\" />\n";
예제 #6
0
    selectObj.selectedIndex = 0;
}
// -->
</script>
<?php 
// }}}
do {
    // {{{ "approve account request" form
    if (!empty($acreq)) {
        $requser =& new PEAR_User($dbh, $acreq);
        if (empty($requser->name)) {
            break;
        }
        list($purpose, $moreinfo) = @unserialize($requser->userinfo);
        $bb = new BorderBox("Account request from " . htmlspecialchars($requser->name, ENT_QUOTES) . "&lt;" . htmlspecialchars($requser->email, ENT_QUOTES) . "&gt;", "100%", "", 2, true);
        $bb->horizHeadRow("Requested username:"******"Realname:", htmlspecialchars($requser->name, ENT_QUOTES));
        $bb->horizHeadRow("Email address:", "<a href=\"mailto:" . htmlspecialchars($requser->email, ENT_QUOTES) . "\">" . htmlspecialchars($requser->email, ENT_QUOTES) . "</a>");
        $bb->horizHeadRow("Purpose of account:", nl2br(htmlspecialchars($purpose, ENT_QUOTES)));
        $bb->horizHeadRow("More information:", htmlspecialchars($moreinfo, ENT_QUOTES));
        $bb->end();
        print "<br />\n";
        $bb = new BorderBox("Notes for user " . htmlspecialchars($requser->handle, ENT_QUOTES));
        $notes = $dbh->getAssoc("SELECT id,nby,UNIX_TIMESTAMP(ntime) AS ntime,note FROM notes " . "WHERE uid = ? ORDER BY ntime", true, array($requser->handle));
        $i = "      ";
        if (is_array($notes) && sizeof($notes) > 0) {
            print "{$i}<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\">\n";
            foreach ($notes as $nid => $data) {
                list($nby, $ntime, $note) = $data;
                print "{$i} <tr>\n";
                print "{$i}  <td>\n";