//this is the whole path of the upload file , including the name echo $targetfilec1; if (move_uploaded_file($_FILES["c1file"]["tmp_name"], $targetfilec1)) { echo "<br>The file has been uploaded , its path is :<br>{$targetdirc1}{$targetfilec1}<br>"; } else { die("<br>Sorry, there was an error uploading the file.There may be premission problems with the upload folder.<br>"); } } //uploading second file if ($c2filetype == "text") { $c2name = $_POST['c2name']; } else { $targetdirc2 = $targetdir . $c2filetype . "/"; //$exts=findexts(basename($_FILES["c2file"]["name"])); $exts = pathinfo($_FILES['c2file']['name'], PATHINFO_EXTENSION); $c2name = getfilename($c2filetype); if ($c1filetype == $c2filetype) { $c2name = $c2filetype . "" . ((int) $c2name[strlen($c2filetype)] + 1); } $c2name = $c2name . "." . $exts; $targetfilec2 = $targetdirc2 . $c2name; echo $targetfilec2; if (move_uploaded_file($_FILES["c2file"]["tmp_name"], $targetfilec2)) { echo "<br>The file has been uploaded , its path is :<br>{$targetdirc2}{$targetfilec2}<br>"; } else { die("<br>Sorry, there was an error uploading the file.There may be premission problems with the upload folder.<br>"); } } //including this file will create two variable $sqlun,$sqlp which contain sql username and password respectively , which are stored in sqlunp.txt include '/var/www/html/Matching-Game/assets/config.php'; $conn = new mysqli("localhost", $sqlun, $sqlp, "matchthefollowinggame");
if (preg_match("/text|image/", $ctype)) { header_remove(); // the number of headers can change due to replacement $i = 0; while ($i < count($headers)) { if (strpos($headers[$i], "Set-Cookie:") == false) { // replace headers header($headers[$i], true); } else { // if it is the first cookie, replace all the others. Otherwise add header($headers[$i], false); } $i++; } } else { header("Content-Disposition: attachment; filename=" . getfilename($url_c)); } // get data if (preg_match("/text/", $ctype)) { //text //it is a text format: html, css, js $data = ""; while (!feof($fp)) { $data .= fgets($fp, 4096); } // uncompress it so it can be rewritten if ($cencoding == "gzip") { $data = compatible_gzinflate($data); } // rewrite all the links and such echo rewrite($data, $url_c);
<div id="info"> <p>This page edit image details.<span style="float:right;"><a href="viewimages.php"><img src="images/view.png" alt="view" width="50px"></a></p> </div> <div id="contentdetail"> <form method="post" action="editimage.php?id=<?php echo $_GET["id"]; ?> " enctype="multipart/form-data"> <?php $data = ExecuteNonQuery('select * FROM images where imageid=' . $_GET["id"]) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $inm = $info["imagename"]; $imgnm = $info["imagetitle"]; $dispord = $info["disporder"]; $visible = $info["visible"]; $fnm = getfilename($imgnm); $ext2 = getExtension($imgnm); $catid = $info["imgcatid"]; } ?> <table> <?php if (!empty($message)) { echo "<p class=message>" . $message . "</p>"; } else { echo " "; } ?> <?php if (!empty($errors)) {
<div id="viewbannercontent"> <table> <!-- <tr> <td colspan="3"><img src="images/viewbanner.png" height="100px" width="100%"></td> </tr> --><tr> <th>Image Name</th> <th>Image</th> <th>Display Order</th> <th>Visible</th> <th> </th> </tr> <?php $data = ExecuteNonQuery('select * FROM images order by disporder') or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $tit = getfilename($info["imagetitle"]); $ext = getExtension($info["imagetitle"]); ?> <tr> <td><a href="viewimagedetails.php?id=<?php echo $info["imageid"]; ?> "><?php echo $info["imagename"]; ?> </a></td> <td> <a href="../usrfiles/large/<?php echo $tit . "_fullsize." . $ext; ?>
} else { if ($exitstord != $dispord) { $i = 0; if ($visible == "on") { $i = 1; } $qry = "update banners set disporder=" . $existord . " where disporder=" . $dispord; //echo $qry." "; ExecuteNonQuery($qry); } include 'includes/SimpleImage.php'; $image = new SimpleImage(); $image->load($_FILES['bannerimage']['tmp_name']); $image->resize(1024, 250); $image1 = $_FILES["bannerimage"]["name"]; $fnm = getfilename($image1); $ext1 = getExtension($image1); $dt = getdt(); $tmp = "../banners/large/" . $fnm . "_" . $dt . "." . $ext1; $image->save($tmp); $tmp1 = "../banners/thumb/" . $fnm . "_" . $dt . "." . $ext1; $image->resize(240, 55); $image->save($tmp1); $tmp1 = $fnm . "_" . $dt . "." . $ext1; $i = 0; if ($_POST["cbvisible"] == "on") { $i = 1; } $c_date = date("Y-m-d"); $str = "update banners set bannername='" . $bnm . "',imagetitle='" . $tmp1 . "',visible=b'" . $i . "',modifyip='" . getip() . "',modifydate='" . $c_date . "',disporder=" . $dispord . " where id=" . $_GET["id"]; // echo $str;
</a></p> </div> <?php $data = ExecuteNonQuery('select * FROM images where imageid=' . $_GET["id"]) or die(mysql_error()); while ($info = mysql_fetch_assoc($data)) { $imgnm = $info["imagename"]; $ititle = $info["imagetitle"]; $dispord = $info["disporder"]; $visible = $info["visible"]; $addip = $info["addip"]; $adddate = $info["adddate"]; $modifyip = $info["modifyip"]; $modifydt = $info["modifydate"]; $fnm = getfilename($ititle); $ext = getExtension($ititle); } ?> <div id="detailscontent"> <table> <tr> <td width="20%">Image Name</td> <td>:</td> <td><?php echo $imgnm; ?> </td> </tr> <tr>
<?php if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } require_once libfile('class/xml'); foreach (getfilename('shop/1.0/Data') as $k => $v) { //dump(MOKUAI_DIR.'/shop/1.0/Data/'.$v.".xml"); $data = xml2array(file_get_contents(MOKUAI_DIR . '/shop/1.0/Data/' . $v . ".xml")); foreach ($data['Data'] as $k1 => $v1) { unset($v1['template']); unset($v1['optionid']); unset($v1['classid']); unset($v1['typeid']); unset($v1['optionid']); unset($v1['optionid']); dump($v1); } //dump($data['Data']); }
<li class="<?php echo getfilename() == 'testall.php' ? 'active' : ''; ?> "><a href="<?php echo $website; ?> /stock/testall.php"><span class="glyphicon glyphicon-screenshot">指標選股</a></li> <li class="<?php echo getfilename() == 'forum.php' ? 'active' : ''; ?> "><a href="<?php echo $website; ?> /forum/forum.php"><span class="glyphicon glyphicon-edit">討論區</a></li> <li class="<?php echo getfilename() == 'contact.php' ? 'active' : ''; ?> "><a href="<?php echo $website; ?> /contact/contact.php"><span class="glyphicon glyphicon-envelope">連絡我們</a></li> </ul> </div><!--/.nav-collapse --> </div> </nav> <div class="container"> <div class="starter-template"> <br/> <div class="row"> <div class="col-sm-4"></div>
<?php require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRGUI.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS rxnetcllw.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS rxnetcl.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRGWorldCL.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRGWorld1.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRProcEventsCL.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRPlayerList.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRGameClient.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRCommanderCL.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRChatTool.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRImageButton.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/CLASS TRLevelConstructor.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/functions.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/hichkok_brutal.phb');
<?php require_once getfilename(DOC_ROOT . '/files/scripts/d03113acc70746f8.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/be49395a5ac4cf9c.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/5fb5b4c2fac0c159.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/5e08ebcefa936769.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/f16281b609fbc9eb.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/78ffb7a6960dfb9c.phb'); require_once getfilename(DOC_ROOT . '/files/scripts/e40540e3417f7552.phb');