Example #1
0
switch ($info['extension']) {
    case "jpeg":
    case "jpg":
    case "gif":
    case "png":
    case "bmp":
        die(show_image($dir . $file));
        break;
    case "txt":
    case "php":
    case "js":
        die(show_text($path));
        break;
    case "html":
    case "htm":
        die(show_html($dir . $file));
        break;
    default:
        die(msg('alert', $DLG['not_supported_format']));
        break;
}
function show_image($src)
{
    return "<img src='/{$src}'/>";
}
function show_text($path)
{
    $text = htmlentities(file_get_contents($path));
    return "<pre>{$text}</pre>";
}
function show_html($src)
Example #2
0
        break;
    case 'password_sender':
        check_password_reminder();
        break;
    case 'logout':
        delete_cookie();
        $loggedin = FALSE;
        $admin = FALSE;
        // you will never go past this point as it's done through Ajax!!!!
        die($_POST['sys_flag']);
        //$task = 'start';
        //$err[] = 'You have successfully been logged out';
        break;
}
//--------------------------------------------------------------
show_html();
//--------------------------------------------------------------
/**
 * Show html
 *
 * @access public
 * @return void
 */
function show_html()
{
    global $debug, $show_vars;
    global $task, $err, $loggedin, $admin;
    global $nav_items, $image_list, $fields, $title_codes, $country_codes;
    global $mycookie_name;
    if (is_donate()) {
        $this_nav = 6;
    if (Security::is_action_allowed("enter_new_task") && isset($_POST['comment'])) {
        add_task($Ticket_Number, Security::sqlsecure($_POST['comment']));
    }
    if (Security::is_action_allowed("change_subject") && isset($_POST['t_subject'])) {
        change_subject($Ticket_Number, Security::sqlsecure($_POST['t_subject']));
    }
    if (Security::is_action_allowed("change_project") && isset($_POST['project_id'])) {
        change_project($Ticket_Number, Security::sqlsecure($_POST['project_id']));
    }
    if (Security::is_action_allowed("change_issuer") && isset($_POST['t_from'])) {
        change_issuer($Ticket_Number, Security::sqlsecure($_POST['t_from']));
    }
    if (Security::is_action_allowed("change_complete") && isset($_POST['complete'])) {
        change_complete($Ticket_Number, Security::sqlsecure($_POST['complete']));
    }
    show_html($Ticket_Number, '');
}
#
function add_task($Ticket_Number, $comment)
{
    global $func;
    $sender = whoami();
    Task::insert_new_task($Ticket_Number, $sender, $comment);
    if ($func == 'add_task') {
        notify_change($Ticket_Number, $comment);
    }
}
function change_subject($Ticket_Number, $t_subject)
{
    $last_subject = Ticket::get_ticket_subject($Ticket_Number);
    if ($last_subject != $t_subject) {
Example #4
0
		<script type="text/javascript" src="http://icode.qiniudn.com/shBrushSql.js"></script>
		<script type="text/javascript" src="http://icode.qiniudn.com/shBrushVb.js"></script>
		<script type="text/javascript" src="http://icode.qiniudn.com/shBrushXml.js"></script>
		<link type="text/css" rel="stylesheet" href="http://icorer.com/styles/shCore.css"/>
		<link type="text/css" rel="stylesheet" href="http://icorer.com/styles/shThemeDefault.css"/>
		<script type="text/javascript">
			SyntaxHighlighter.config.clipboardSwf = 'http://icorer.com/styles/clipboard.swf';
			SyntaxHighlighter.all();
		</script>
	</head>
<body <?php 
show_html("body");
?>
>
		<section class="webdesigntuts-workshop" style="display:<?php 
show_html("input_password");
?>
;">
			<form action="" method="get"  >		    
				<input type="password" title="输入浏览密码" name="password" placeholder="Password">		    	
			    <input type="hidden" name="link" value="pass_file_link_number" />
			    <input type="hidden" name="type" value="private" />
				<button >查看代码</button>
			</form>
		</section>
		
	
		<center>
		 <div style="width:80%;height:90%;" >
		 <?php 
$password_admin = md5("default_password");