function IsExist($table, $col, $val, $attr = '') { $where = "where `{$col}`='" . Encode($val) . "' "; if (!empty($attr)) { $where .= " and {$attr}"; } $sql = "select `{$col}` from `{$table}` {$where} "; $rp = Query($sql); if (Num($rp) > 0) { return true; } return false; }
<p>This box plot shows <em>how many times slower</em>, the fastest benchmark programs for programming language implementations were, compared to the fastest programs written in <em>any of the programming languages</em>.</p> <p><img src="<?php echo $chart; ?> ?<?php echo 's=' . Encode($stats1); ?> &<?php echo 'm=' . Encode($Mark); ?> &<?php echo 'w=' . Encode($labels1); ?> " alt="" title="" width="480" height="300" /></p> <p>Please don't obsess about which programming language implementation is shown 10<sup>th</sup> and which is shown 11<sup>th</sup>. You can see that the order would be different if it was based on the median scores instead of <a href="http://portal.acm.org/citation.cfm?id=5666.5673" title="How not to lie with statistics: the correct way to summarize benchmark results">the geometric mean</a> scores.</p> <h3><a href="<?php echo $pageUrl; ?> #about" name="about"> </a></h3> <?php
function greaterthanRows($from, $where = '', $select = '*', $sort_order = '', $join = '', $group_by = '', $do_paging = "N", $record_per_page = '20', $rewrite_url = false) { $order_by = ""; $sqlWhere = ""; $joinSql = ""; if (is_array($select)) { $select = implode(",", $select); } $sqlWhere2 = array(); if (is_array($where) && count($where) > 0) { foreach ($where as $col => $val) { $sqlWhere2[] = $col . " >= '" . Encode($val) . "'"; } } else { if (!empty($where)) { $sqlWhere = $where; } } if ($sort_order != "") { $order_by = "ORDER BY {$sort_order}"; } if ($group_by != "") { $group_by = "GROUP BY {$group_by}"; } if (count($sqlWhere2)) { $sqlWhere = " WHERE " . implode(' AND ', $sqlWhere2); } if (is_array($join) && !empty($join)) { foreach ($join as $tbl => $con) { $tmp = explode("|", $tbl); if (isset($tmp[1])) { $joinSql .= ' ' . strtoupper($tmp[0]) . ' JOIN ' . $tmp[1] . ' ON ' . $con; } else { $joinSql .= ' JOIN ' . $tbl . ' ON ' . $con; } } } else { if (!empty($join)) { $joinSql = $join; } } $sql = "SELECT " . $select . " FROM `" . $from . '` ' . $joinSql . " {$sqlWhere} {$group_by} {$order_by}"; //echo $sql; //exit; if ($do_paging == "Y") { return customPaging($sql, $record_per_page, $rewrite_url); } else { $r = Query($sql); $num_rows = Num($r); $data = array(); if ($num_rows > 0) { while ($o = GetArr($r)) { array_push($data, $o); } } mysql_data_seek($r, 0); return array('data' => $data, 'result' => $r, 'total_recs' => $num_rows); } }
</b></a> program used, compared to the benchmark program that used least Time or the program that used least Memory or the program that used least Code.</p> <p><img src="chart.php?<?php echo 'r=' . Encode($Ratios); ?> &<?php echo 'm=' . Encode($Mark); ?> &<?php echo 'w=' . Encode($Labels); ?> &<?php echo 'ww=' . Encode($TestLink); ?> &<?php echo 'so=' . Encode($Sort); ?> " alt="" title="" width="480" height="300" /></p> <h2><a href="#table" name="table"> <?php echo $TestName; ?> <strong>benchmark</strong></a> <a href="<?php echo CORE_SITE; ?> help.php#inputvalue"><?php
?> program.</p> <p>(Memory use is only compared <a href="<?php echo CORE_SITE; ?> play.php#whymemory" title="">for tasks that require memory to be allocated</a>.)</p> <p><br/><img src="chartvs.php?<?php echo 'r=' . Encode($ratios); ?> &<?php echo 'm=' . Encode($Mark . ' n'); ?> &<?php echo 'w=' . Encode($SelectedLang . 'O' . $SelectedLang2); ?> " alt="" title="" width="480" height="300" /></p> <p>These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. <a href="<?php echo CORE_SITE; ?> dont-jump-to-conclusions.php"><strong>These are just 10 tiny examples.</strong></a></p> <h2><a href="#faster-programs-approximately" name="faster-programs-approximately"> 2 : Are the <strong><?php echo $LangName; ?> programs faster</strong>?</a> <i>Approximately.</i></h2>
<?php include_once '../inc/config.inc.php'; require_once '../inc/admin_secure.inc.php'; $msg = deQueueMsg(); $var_clear = true; if (!empty($_POST)) { extract($_POST); $slugWhere = array(); $slugWhere[] = "is_deleted = 'N'"; $slugWhere[] = "slug = '" . Encode($slug) . "'"; if ($id == 0) { $dated = ',dated'; $_POST['dated'] = date("Y-m-d H:i:s"); } else { $slugWhere[] = "id != '" . Encode($id) . "'"; $dated = ',last_updated'; $_POST['last_updated'] = date("Y-m-d H:i:s"); } if (isset($_POST['is_active'])) { $_POST['is_active'] = 'Y'; } else { $_POST['is_active'] = 'N'; } if (isset($_POST['is_feature'])) { $_POST['is_feature'] = 'Y'; } else { $_POST['is_feature'] = 'N'; } $_POST['Language'] = implode(',', $Language); // if ($id == 0) {
} if ($type == 'w') { return str_replace($conv['utf'], $conv['win'], $str); } elseif ($type == 'u') { return str_replace($conv['win'], $conv['utf'], $str); } else { return $str; } } if (isset($_POST["act"])) { require_once 'excel_reader2.php'; $data = new Spreadsheet_Excel_Reader($_FILES['fname']["tmp_name"]); if ($_POST["clearall"] == 'clearall') { print "<script>importexcelDialog.clear()</script>"; } print "<script>importexcelDialog.insert('<p>" . str_replace("\\'", "\\\\'", str_replace("\n", "", Encode($data->dump(false, false, 0, 'price'), 'w'))) . "</p>')</script>"; } ?> Загрузите файл для вставки в код: <input type="file" name="fname"> <input type="hidden" name="act" value="send"><br> <input type="checkbox" name="clearall" checked=checked value="clearall" id="clearall"><label for="clearall">Очистить содержимое перед вставкой</label> </br> <div class="mceActionPanel"> <div style="float: left"> <input type="submit" id="insert" name="insert" value="Вставить" onclick="" /> </div> <div style="float: right">
$index_middle = array(17, -1, 18, 19, -1, 20, -1, 21, 22, -1, 23, 24, 25, 26, 27); } if ($IsFirstLast) { foreach ($index_firstlast as $i) { $l[] = $i > -1 ? $labels[$i] : $marker_label; $s[] = $i > -1 ? $stats[$i] : $marker; } } else { foreach ($index_middle as $i) { $l[] = $i > -1 ? $labels[$i] : $marker_label; $s[] = $i > -1 ? $stats[$i] : $marker; } } unset($labels); unset($stats); $chart = 'chartboxSVG.php'; ?> <img src="<?php echo $chart; ?> ?<?php echo 's=' . Encode($s); ?> &<?php echo 'm=' . Encode($Mark); ?> &<?php echo 'w=' . Encode($l); ?> ">
} unset($url); $url = parse_url($tmp_url); $page = geturl($url['host'], 80, $url['path'] . "?" . $url["query"], "http://ifolder.ru/", 0, 0, 0, ""); is_page($page); if (preg_match('/sys_msg/', $page)) { $error = cut_str($page, 'sys_msg>', '<'); $error = Encode($error, "w"); html_error("Error Upload, vozmozhno na vash ip ban!<br>" . $error); } //print_r($page); $desc_id = "descr_" . cut_str($page, "descr_", '"'); $pass_id = "password_" . cut_str($page, "password_", ' '); $img_link = "/random/images/" . cut_str($page, "/random/images/", '"'); $session_id = cut_str($page, 'session" value=', '>'); $page = Encode($page, "w"); ?> <form action="<?php echo $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']; ?> " method="POST"> <input type="hidden" name="desc_id" value=<?php echo $desc_id; ?> > <input type="hidden" name="pass_id" value=<?php echo $pass_id; ?> > <input type="hidden" name="session_id" value=<?php
function getVideoSrc($obj, $data, $type, $fileId, $user_sid, $user_token) { $hd = array('flv' => '0', 'flvhd' => '0', 'mp4' => '1', 'hd2' => '2', '3gphd' => '1', '3gp' => '0', 'hd3' => '3'); $hd = $hd[$type]; $stremtype = array('flv' => 'flv', 'mp4' => 'mp4', 'hd2' => 'flv', '3gphd' => 'mp4', '3gp' => 'flv', 'hd3' => 'flv'); $stremtype = $stremtype[$type]; $show = ''; if (@$data->show) { $show = $data->show->show_paid ? "&ypremium=1" : "&ymovie=1"; } $c = "http://k.youku.com/player/getFlvPath/sid/" . $user_sid . "_" . $obj->no . "/st/" . $stremtype . "/fileid/" . $fileId . "?K=" . $obj->k . "&hd=" . $hd . "&myp=0&ts=" . $obj->seconds . "&ypp=0" . $show . "&ep="; $c .= urlencode(Decode(Encode('bf7e5f01', $user_sid . "_" . $fileId . "_" . $user_token))); $c .= "&ctype=12&ev=1&token=" . $user_token; $c .= "&oip=" . $data->ip; return $c; }
for ($row = 0; $row < $n; $row++) { printf('<tr>'); for ($col = 0; $col < NCOLS; $col++) { printf('<td> '); if (isset($cols[$col][$row])) { $k = $cols[$col][$row]; // hard-code a shortest programs example if ($k == 'shortest') { printf('<a href="#shortest" name="shortest"><img src="chartshape.php?w=%s&s=%s&c=%s" alt="Shortest C++ programs" title="Shortest C++ programs" width="150" height="120" /></a>', Encode($k), Encode($Shapes[$k]), Encode($Centers[$k])); } else { if (isset($Langs[$k][LANG_SPECIALURL]) && !empty($Langs[$k][LANG_SPECIALURL])) { printf('<a href="%s.php" title="Is %s the fastest programming language?">', $Langs[$k][LANG_SPECIALURL], $Langs[$k][LANG_FULL]); } else { printf('<a href="compare.php?lang=%s" title="Is %s the fastest programming language?">', $k, $Langs[$k][LANG_FULL]); } printf('<img src="chartshape.php?w=%s&s=%s&c=%s" alt="source code size versus speed of %s benchmark programs" title="Compare %s program size and speed against other programs" width="150" height="120" />', Encode($k), Encode($Shapes[$k]), Encode($Centers[$k]), $Langs[$k][LANG_FULL], $Langs[$k][LANG_FULL]); printf('</a>'); } } else { printf(' '); } printf('</td>'); } printf('</tr>'); } printf('</table>'); ?> <h3><a href="#about" name="about"> about <?php echo $Title; ?>
} else { if (empty($name)) { enqueueMsg("Enter your name"); } else { Query("UPDATE admin_user SET full_name = '" . Encode($name) . "', email = '" . Encode($email) . "' WHERE id = '" . Encode($_SESSION['S_ID']) . "'"); enqueueMsg("Profile has been updated successfully!", "success"); } } } else { if (isset($new_password) && isset($password_confirm)) { $r = Query("SELECT * FROM admin_user WHERE id = '" . Encode($_SESSION['S_ID']) . "' AND password = '******'"); if (Num($r) > 0) { if ($new_password != $password_confirm) { enqueueMsg("Password and confirm password does not match!"); } else { Query("UPDATE admin_user SET password = '******' WHERE id = '" . Encode($_SESSION['S_ID']) . "'"); enqueueMsg("Your password has been updated successfully!", "success"); } } else { enqueueMsg("Invalid old Password!"); } } } } include 'header.php'; ?> <div> <ul class="breadcrumb"> <li><a href="dashboard.php">Home</a> <span class="divider">/</span></li> <li>Profile</li> </ul>
function BackupDatabaseFileSize($t, $s, $p, $mypath, $alltotal, $thenof, $fnum, $stime = 0) { global $db, $bakpath, $limittype, $fun_r, $db_config, $config, $adminDir; header('Content-Type: text/html; charset=' . $db_config['charset']); //设定编码 ob_start(); if (empty($mypath)) { } $b_dbname = $db_config['dbname']; $path = PLUS_PATH . '/bdata/' . $mypath; @(include $path . "/config.php"); if (empty($b_table)) { } $waitbaktime = (int) $_GET['waitbaktime']; if (empty($stime)) { $stime = time(); } $header = "<?php\r\nrequire(dirname(dirname(dirname(dirname(dirname(__FILE__))))).\"/app/include/dbbackup/inc/header.php\");\r\n"; $footer = "\r\nrequire(dirname(dirname(dirname(dirname(dirname(__FILE__))))).\"/app/include/dbbackup/inc/footer.php\");\r\n?>"; $btb = explode(",", $b_table); $count = count($btb); $t = (int) $t; $s = (int) $s; $p = (int) $p; if ($t >= $count) { echo Encode("<script>alert('备份成功!\\n\\n整个过程耗时:" . ToChangeUseTime($stime) . "');self.location.href='index.php?m=database';</script>", 'gbk'); die; } $u = $db->query("use `{$b_dbname}`"); SetCharset($b_dbchar); if ($s == 0) { if ($limittype) { $num = -1; } else { $status_r = GetTableRows($b_dbname, $btb[$t]); $num = $status_r['Rows']; } } else { $num = (int) $alltotal; } $dumpsql .= GetTableStructSql($btb[$t], $b_strufour); $sql = $db->select_only($btb[$t], '1 limit ' . $s . ',' . $num); if (empty($fnum)) { $return_fr = GetTableFields($b_dbname, $btb[$t], $b_autofield); $fieldnum = $return_fr['num']; $noautof = $return_fr['autof']; } else { $fieldnum = $fnum; $noautof = $thenof; } $inf = ''; if ($b_beover == 1) { $inf = '(' . GetTableInsertFields($b_dbname, $btb[$t]) . ')'; } $hexf = ''; if ($b_bakdatatype == 1) { $hexf = GetTableStringFields($b_dbname, $btb[$t]); } $b = 0; foreach ($sql as $k => $r) { echo Encode('<script>document.write("正在备份' . $btb[$t] . '的第' . ($k + 1) . '条记录<br/>");if(document.documentElement.scrollTop){document.documentElement.scrollTop=' . $k * 30 . ';}else{document.body.scrollTop=' . $k * 30 . ';}</script>', 'gbk'); ob_flush(); flush(); $b = 1; $s++; $dumpsql .= "ExcuteSQL(\"insert into `" . $btb[$t] . "`" . $inf . " values("; $first = 1; for ($i = 0; $i < $fieldnum; $i++) { if (empty($first)) { $dumpsql .= ','; } else { $first = 0; } $myi = $i + 1; if (!isset($r[$i]) || strstr($noautof, ',' . $myi . ',')) { $dumpsql .= 'NULL'; } else { $dumpsql .= GetFieldContent($r[$i], $b_bakdatatype, $myi, $hexf); } } $dumpsql .= ");\");\r\n"; if (strlen($dumpsql) >= $b_filesize * 1024) { $p++; $sfile = $path . "/" . $btb[$t] . "_" . $p . ".php"; $dumpsql = $header . $dumpsql . $footer; WriteString2File($sfile, $dumpsql); $db->free($sql); echo Encode("<meta http-equiv=\"refresh\" content=\"" . $waitbaktime . ";url=" . $config['sy_weburl'] . "/" . $adminDir . "/index.php?m=database&c=BackupDatabaseFileSize&phome=BakExe&s={$s}&p={$p}&t={$t}&mypath={$mypath}&alltotal={$num}&thenof={$noautof}&fieldnum={$fieldnum}&stime={$stime}&waitbaktime={$waitbaktime}&collation={$collation}\">" . $fun_r['BakOneDataSuccess'], 'gbk') . EchoBackupProcesser($btb[$t], $count, $t, $num, $s); exit; } } if (empty($p) || $b == 1) { $p++; $sfile = $path . "/" . $btb[$t] . "_" . $p . ".php"; $dumpsql = $header . $dumpsql . $footer; WriteString2File($sfile, $dumpsql); } FetchFileNumber($p, $btb[$t], $path); $t++; $db->free($sql); echo "<meta http-equiv=\"refresh\" content=\"" . $waitbaktime . ";url=" . $config['sy_weburl'] . "/" . $adminDir . "/index.php?m=database&c=BackupDatabaseFileSize&phome=BakExe&s=0&p=0&t={$t}&mypath={$mypath}&stime={$stime}&waitbaktime={$waitbaktime}\">" . $fun_r['OneTableBakSuccOne'] . $btb[$t - 1] . $fun_r['OneTableBakSuccTwo']; exit; }
<?php include_once '../inc/config.inc.php'; $page_title = 'Login'; $msg = deQueueMsg(); if (!empty($_POST)) { extract($_POST); if (empty($username)) { enqueueMsg("Enter Username", "error"); } else { $res = Query("SELECT * FROM admin_user WHERE user_name = '" . Encode($username) . "' AND password = '******' AND is_deleted = 'N'"); if (Num($res) > 0) { $o = GetObj($res); if ($o->is_active == 'N') { enqueueMsg("This is not an active user, please contact system administrator to activate!", "error"); } else { $_SESSION["S_login"] = "******"; $_SESSION["S_ID"] = $o->id; $_SESSION["S_username"] = $o->user_name; $_SESSION["S_full_name"] = $o->full_name; $_SESSION["S_email"] = $o->email; header("location:dashboard.php"); exit; } } else { enqueueMsg("Invalid User Name/Password!", "error"); } } } if ($msg == '') { //$msg = displayMsg('Please login with your Username and Password.');
echo CORE_SITE; ?> dont-jump-to-conclusions.html"><strong>These are just 10 tiny examples.</strong></a></p> <p>Please don't obsess over tiny differences in median values from such a small number of examples.</p> <p><img src="<?php echo $chart; ?> ?<?php echo 's=' . Encode($stats2); ?> &<?php echo 'm=' . Encode($Mark); ?> &<?php echo 'w=' . Encode($labels2); ?> " alt="" title="" width="480" height="300" /></p> <p>Please don't obsess about which programming language implementation is shown 10<sup>th</sup> and which is shown 11<sup>th</sup>. You can see that the order would be different if it was based on the median scores instead of <a href="http://portal.acm.org/citation.cfm?id=5666.5673" title="How not to lie with statistics: the correct way to summarize benchmark results">the geometric mean</a> scores.</p> <h3><a href="<?php echo $pageUrl; ?> #about" name="about"> </a></h3>