| [ Index ] |
|
Code source de PHProxy 0.5b2 |
1 <?php 2 3 if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) 4 { 5 exit(0); 6 } 7 8 echo '<?xml version="1.0" encoding="utf-8"?>'; 9 10 ?> 11 12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 13 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> 14 <head> 15 <title>PHProxy</title> 16 <link rel="stylesheet" type="text/css" href="style.css" title="Default Theme" media="all" /> 17 </head> 18 <body onload="document.getElementById('address_box').focus()"> 19 <div id="container"> 20 <h1 id="title">PHProxy</h1> 21 <ul id="navigation"> 22 <li><a href="<?php echo $GLOBALS['_script_base'] ?>">URL Form</a></li> 23 <li><a href="javascript:alert('cookie managment has not been implemented yet')">Manage Cookies</a></li> 24 </ul> 25 <?php 26 27 switch ($data['category']) 28 { 29 case 'auth': 30 ?> 31 <div id="auth"><p> 32 <b>Enter your username and password for "<?php echo htmlspecialchars($data['realm']) ?>" on <?php echo $GLOBALS['_url_parts']['host'] ?></b> 33 <form method="post" action=""> 34 <input type="hidden" name="<?php echo $GLOBALS['_config']['basic_auth_var_name'] ?>" value="<?php echo base64_encode($data['realm']) ?>" /> 35 <label>Username <input type="text" name="username" value="" /></label> <label>Password <input type="password" name="password" value="" /></label> <input type="submit" value="Login" /> 36 </form></p></div> 37 <?php 38 break; 39 case 'error': 40 echo '<div id="error"><p>'; 41 42 switch ($data['group']) 43 { 44 case 'url': 45 echo '<b>URL Error (' . $data['error'] . ')</b>: '; 46 switch ($data['type']) 47 { 48 case 'internal': 49 $message = 'Failed to connect to the specified host. ' 50 . 'Possible problems are that the server was not found, the connection timed out, or the connection refused by the host. ' 51 . 'Try connecting again and check if the address is correct.'; 52 break; 53 case 'external': 54 switch ($data['error']) 55 { 56 case 1: 57 $message = 'The URL you\'re attempting to access is blacklisted by this server. Please select another URL.'; 58 break; 59 case 2: 60 $message = 'The URL you entered is malformed. Please check whether you entered the correct URL or not.'; 61 break; 62 } 63 break; 64 } 65 break; 66 case 'resource': 67 echo '<b>Resource Error:</b> '; 68 switch ($data['type']) 69 { 70 case 'file_size': 71 $message = 'The file your are attempting to download is too large.<br />' 72 . 'Maxiumum permissible file size is <b>' . number_format($GLOBALS['_config']['max_file_size']/1048576, 2) . ' MB</b><br />' 73 . 'Requested file size is <b>' . number_format($GLOBALS['_content_length']/1048576, 2) . ' MB</b>'; 74 break; 75 case 'hotlinking': 76 $message = 'It appears that you are trying to access a resource through this proxy from a remote Website.<br />' 77 . 'For security reasons, please use the form below to do so.'; 78 break; 79 } 80 break; 81 } 82 83 echo 'An error has occured while trying to browse through the proxy. <br />' . $message . '</p></div>'; 84 break; 85 } 86 ?> 87 <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> 88 <ul id="form"> 89 <li id="address_bar"><label>Web Address <input id="address_box" type="text" name="<?php echo $GLOBALS['_config']['url_var_name'] ?>" value="<?php echo isset($GLOBALS['_url']) ? htmlspecialchars($GLOBALS['_url']) : '' ?>" onfocus="this.select()" /></label> <input id="go" type="submit" value="Go" /></li> 90 <?php 91 92 foreach ($GLOBALS['_flags'] as $flag_name => $flag_value) 93 { 94 if (!$GLOBALS['_frozen_flags'][$flag_name]) 95 { 96 echo '<li class="option"><label><input type="checkbox" name="' . $GLOBALS['_config']['flags_var_name'] . '[' . $flag_name . ']"' . ($flag_value ? ' checked="checked"' : '') . ' />' . $GLOBALS['_labels'][$flag_name][1] . '</label></li>' . "\n"; 97 } 98 } 99 ?> 100 </ul> 101 </form> 102 <!-- The least you could do is leave this link back as it is. This software is provided for free and I ask nothing in return except that you leave this link intact 103 You're more likely to recieve support should you require some if I see a link back in your installation than if not --> 104 <div id="footer"><a href="http://whitefyre.com/poxy/">PHProxy</a> <?php echo $GLOBALS['_version'] ?></div> 105 </div> 106 </body> 107 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Tue Nov 20 19:39:29 2007 | par Balluche grâce à PHPXref 0.7 |
|