Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Pear
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-27-2007, 7:46 PM   #1
 
's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default cvs: pear /PEAR_Frontend_Web pearfrontendweb.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/data style.css /PEAR_Frontend_Web/data/templates top.inc.tpl.html /PEAR_Frontend_Web/docs example.php index.php.txt

tias Sun May 20 20:14:43 2007 UTC

Modified files:
/pear/PEAR_Frontend_Web pearfrontendweb.php
/pear/PEAR_Frontend_Web/Frontend Web.php
/pear/PEAR_Frontend_Web/data style.css
/pear/PEAR_Frontend_Web/data/templates top.inc.tpl.html
/pear/PEAR_Frontend_Web/docs example.php index.php.txt
Log:
Not Protected warning for non-htaccess'd webfrontends


http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/pearfrontendweb.php
diff -u pear/PEAR_Frontend_Web/pearfrontendweb.php:1.58 pear/PEAR_Frontend_Web/pearfrontendweb.php:1.59
--- pear/PEAR_Frontend_Web/pearfrontendweb.php:1.58 Sat May 19 16:02:17 2007
+++ pear/PEAR_Frontend_Web/pearfrontendweb.php Sun May 20 20:14:42 2007
@@ -29,7 +29,7 @@
* @author Tias Guns <tias@ulyssis.org>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
- * @version CVS: $Id: pearfrontendweb.php,v 1.58 2007/05/19 16:02:17 tias Exp $
+ * @version CVS: $Id: pearfrontendweb.php,v 1.59 2007/05/20 20:14:42 tias Exp $
* @link http://pear.php.net/package/PEAR_Frontend_Web
* @since File available since Release 0.1
*/
@@ -183,6 +183,11 @@
die();
}

+// Check _isProtected() override (disables the 'not protected' warning)
+if (isset($pear_frontweb_protected) && $pear_frontweb_protected === true) {
+ $GLOBALS['_PEAR_Frontend_Web_protected'] = true;
+}
+
$cache_dir = $config->get('cache_dir');
if (!is_dir($cache_dir)) {
include_once 'System.php';
http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/Frontend/Web.php
diff -u pear/PEAR_Frontend_Web/Frontend/Web.php:1.74 pear/PEAR_Frontend_Web/Frontend/Web.php:1.75
--- pear/PEAR_Frontend_Web/Frontend/Web.php:1.74 Sat May 19 16:02:18 2007
+++ pear/PEAR_Frontend_Web/Frontend/Web.php Sun May 20 20:14:42 2007
@@ -23,7 +23,7 @@
* @author Tias Guns <tias@ulyssis.org>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
- * @version CVS: $Id: Web.php,v 1.74 2007/05/19 16:02:18 tias Exp $
+ * @version CVS: $Id: Web.php,v 1.75 2007/05/20 20:14:42 tias Exp $
* @link http://pear.php.net/package/PEAR_Frontend_Web
* @since File available since Release 0.1
*/
@@ -50,7 +50,7 @@
* @author Tias Guns <tias@ulyssis.org>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
- * @version CVS: $Id: Web.php,v 1.74 2007/05/19 16:02:18 tias Exp $
+ * @version CVS: $Id: Web.php,v 1.75 2007/05/20 20:14:42 tias Exp $
* @link http://pear.php.net/package/PEAR_Frontend_Web
* @since File available since Release 0.1
*/
@@ -2106,6 +2106,12 @@
$tpl = $this->_initTemplate('top.inc.tpl.html');
$tpl->setCurrentBlock('Search');
$tpl->parseCurrentBlock();
+
+ if (!$this->_isProtected()) {
+ $tpl->setCurrentBlock('NotProtected');
+ $tpl->setVariable('Filler', ' ');
+ $tpl->parseCurrentBlock();
+ }
}

// Initialise begin vars
@@ -2188,6 +2194,30 @@
// }}}

/**
+ * Checks if this webfrontend is protected:
+ * - when the client sais so
+ * - when having .htaccess authentication
+ *
+ * @return boolean
+ */
+ function _isProtected()
+ {
+ if ($GLOBALS['_PEAR_Frontend_Web_protected'] === true) {
+ return true;
+ }
+
+ if (isset($_SERVER['PHP_AUTH_USER'])) {
+ return true;
+ }
+
+ if (!empty($_SERVER['PHP_AUTH_DIGEST'])) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* Prepare packagename for HTML output:
* make it a link
*
http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/data/style.css
diff -u pear/PEAR_Frontend_Web/data/style.css:1.2 pear/PEAR_Frontend_Web/data/style.css:1.3
--- pear/PEAR_Frontend_Web/data/style.css:1.2 Sat May 19 15:36:40 2007
+++ pear/PEAR_Frontend_Web/data/style.css Sun May 20 20:14:42 2007
@@ -33,19 +33,19 @@
}

a.blue {
- color:#3163ce;
+ color:#0022cc;
text-decoration: none;
}
a.blue:visited {
- color:#3163ce;
+ color:#0022cc;
text-decoration: none;
}
a.blue:active {
- color:#3163ce;
+ color:#0022cc;
text-decoration: none;
}
a.blue:hover {
- color:#3163ce;
+ color:#0022cc;
text-decoration: underline;
}

@@ -216,3 +216,11 @@
padding: 0.5em 0.5em 0.5em 0.5em;
border-style: double;
}
+
+#warning {
+ padding: 0.5em 0em 0.5em 0.5em;
+ margin: 1em 2em 1em 2em;
+ border-style: solid;
+ border-color: #ff0000;
+ background-color: #ffbaba;
+}
http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/data/templates/top.inc.tpl.html
diff -u pear/PEAR_Frontend_Web/data/templates/top.inc.tpl.html:1.1 pear/PEAR_Frontend_Web/data/templates/top.inc.tpl.html:1.2
--- pear/PEAR_Frontend_Web/data/templates/top.inc.tpl.html:1.1 Wed May 16 13:14:38 2007
+++ pear/PEAR_Frontend_Web/data/templates/top.inc.tpl.html Sun May 20 20:14:42 2007
@@ -52,3 +52,10 @@
</table>
<br>
<!-- END TitleBlock -->
+
+ <!-- BEGIN NotProtected -->
+ <div id="warning">{Filler}
+ <b>Warning:</b> This package management website is <b>not protected</b> with a password, this is a MAJOR security risk. Please read the <a href="{_InstallerURL}?command=doc-show&pkg=pear.php.net/PEAR_Frontend_Web&file=README" class="green">README</a>.
+ </div>
+ <!-- END NotProtected -->
+
http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/docs/example.php
diff -u pear/PEAR_Frontend_Web/docs/example.php:1.18 pear/PEAR_Frontend_Web/docs/example.php:1.19
--- pear/PEAR_Frontend_Web/docs/example.php:1.18 Sat May 19 14:50:54 2007
+++ pear/PEAR_Frontend_Web/docs/example.php Sun May 20 20:14:43 2007
@@ -16,6 +16,10 @@
// uncomment and supply it here:
//$pear_user_config = '';

+// OPTIONAL: If you have protected this webfrontend with a password in a
+// custom way, then uncomment to disable the 'not protected' warning:
+//$pear_frontweb_protected = true;
+

/************************************************** *********
* Following code tests $pear_dir and loads the webfrontend:
http://cvs.php.net/viewvc.cgi/pear/P...&diff_format=u
Index: pear/PEAR_Frontend_Web/docs/index.php.txt
diff -u pear/PEAR_Frontend_Web/docs/index.php.txt:1.3 pear/PEAR_Frontend_Web/docs/index.php.txt:1.4
--- pear/PEAR_Frontend_Web/docs/index.php.txt:1.3 Sat May 19 14:50:54 2007
+++ pear/PEAR_Frontend_Web/docs/index.php.txt Sun May 20 20:14:43 2007
@@ -11,6 +11,10 @@
// uncomment and supply it here:
//$pear_user_config = '';

+// OPTIONAL: If you have protected this webfrontend with a password in a
+// custom way, then uncomment to disable the 'not protected' warning:
+//$pear_frontweb_protected = true;
+

/************************************************** *********
* Following code tests $pear_dir and loads the webfrontend:
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , , , , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
cvs: pear /PEAR_Frontend_Web package.xml pearfrontendweb.php pearweb.php /PEAR_Frontend_Web/docs example.php index.php.txt Pear 0 05-20-2007 7:42 PM
cvs: pear /PEAR_Frontend_Web pearfrontendweb.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/Frontend/Web Docviewer.php /PEAR_Frontend_Web/data style.css Pear 0 05-20-2007 7:42 PM
cvs: pear /PEAR_Frontend_Web pearfrontendweb.php /PEAR_Frontend_Web/Frontend Web.php Pear 0 05-20-2007 7:42 PM
cvs: pear /PEAR_Frontend_Web/Frontend/Web/data package.js style.css /PEAR_Frontend_Web/Frontend/Web/data/images category.jpg config.gif download.gif error.gif info.gif infoplus.gif install.gif install_fail.gif install_ok.gif install_wait.gif login.g Pear 0 05-20-2007 7:42 PM
cvs: pear /PEAR_Frontend_Web package.xml pearweb.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/docs example.php index.php.txt Pear 0 05-20-2007 7:42 PM


Featured Websites




All times are GMT +1. The time now is 7:43 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98