Example #1
0
 public static function init()
 {
     switch ($GLOBALS['dbRunAt']) {
         case DB_RUNAT_FILE:
             self::$cert = new cert_fileDAL();
             self::$shell = new shell_fileDAL();
             self::$activeLink = new activeLink_fileDAL();
             self::$activeServer = new activeServer_fileDAL();
             break;
         case DB_RUNAT_MSSQL:
             self::$cert = new cert_mssqlDAL();
             self::$shell = new shell_mssqlDAL();
             self::$activeLink = new activeLink_mssqlDAL();
             self::$activeServer = new activeServer_mssqlDAL();
             break;
         case DB_RUNAT_MYSQL:
             self::$cert = new cert_mysqlDAL();
             self::$shell = new shell_mysqlDAL();
             self::$activeLink = new activeLink_mysqlDAL();
             self::$activeServer = new activeServer_mysqlDAL();
             self::$tempPassword = new tempPassword_mysqlDAL();
             break;
         case DB_RUNAT_SQLITE:
             self::$cert = new cert_sqliteDAL();
             self::$shell = new shell_sqliteDAL();
             self::$activeLink = new activeLink_sqliteDAL();
             self::$activeServer = new activeServer_sqliteDAL();
             break;
     }
 }
Example #2
0
function updateShell($data)
{
    $dataArray = preg_split("/,{1,1}/", $data);
    //loginToken+","+url+","+pass+","+type+","+extraConfig+","+notes
    $reciveToken = $dataArray[0];
    $url = $dataArray[1];
    $pass = $dataArray[2];
    $type = $dataArray[3];
    $extraConfig = $dataArray[4];
    $notes = $dataArray[5];
    if ($reciveToken === $_SESSION['loginToken']) {
        SQLAdopt::update(new shellModel($url, $pass, $extraConfig, $notes, $type));
    }
    echo 'completed';
}
Example #3
0
    <div id="signCertList" name="list">
<?php 
}
?>



<div class="twelve columns">
    <i class="fa fa-check fa-2x" style="color: rgb(29, 204, 93);"></i>  已签发并在有效期内的证书(共<span id='signActiveCount'><?php 
echo $certRowsCount;
?>
</span>个):
    <div class="accordion">

        <?php 
$rs = SQLAdopt::getPageList($certmodelnull, ($nowPage - 1) * $perPageCount, $perPageCount);
if (is_array($rs)) {
    foreach ($rs as $model) {
        if ($model instanceof baseModel) {
            ?>

                <div class="accordion-item" id="<?php 
            echo $model->GUID;
            ?>
">
                    <div class="accordion-head">
                        <div class="accordion-toggler background-color"></div>
                        <div class="accordion-title" style="">

                            <div style="width: 400px;float: left;">
                                <?php 
Example #4
0
/**
 * Created by PhpStorm.
 * User: abcdlzy
 * Date: 15/2/4
 * Time: 下午5:56
 */
include_once dirname(__FILE__) . '/../DBAdopt/_class/BLL/operator.php';
include_once dirname(__FILE__) . '/../common.php';
$nowPage = 1;
@($jumpPage = $_POST["page"]);
if (isset($jumpPage)) {
    $nowPage = $jumpPage;
}
$activeLinkmodelnull = new activeLinkModel('', '', '');
$ALRowsCount = SQLAdopt::GetPageCount($activeLinkmodelnull);
if (!isset($jumpPage)) {
    ?>
<div class="row" style="margin: 30px 0px 0px 0px;">
    <div class="eight columns">
        <h1>活动链路状态管理</h1>
    </div>
</div>

<div class="twelve columns"><hr></div>

<div id="activeLinkList" name="list">
    <?php 
}
?>
Example #5
0
<?php

/**
 * Created by PhpStorm.
 * User: abcdlzy
 * Date: 15/2/14
 * Time: 下午12:09
 */
include_once dirname(__FILE__) . '/../common.php';
include_once dirname(__FILE__) . '/../DBAdopt/_class/BLL/operator.php';
@($getUrl = $_POST["data"]);
@($getGUID = $_POST["GUID"]);
if (!empty($getUrl)) {
    $getModel = SQLAdopt::getOne(new shellModel($getUrl, '', '', '', ''));
}
if (empty($getModel)) {
    $getModel = new shellModel('', '', '', '', '');
}
?>

<input id="inputShellURL" <?php 
echo 'value="' . $getModel->url . '"';
?>
  <?php 
if (!empty($getModel->url)) {
    echo 'readOnly style="background-color: #F0F0F0;"';
}
?>
 type="text" name="name" class="text-short-input comment-text contact-long" placeholder="URL" required="">
<div class="row">
Example #6
0
function set_ActiveServerByJson($json)
{
    $all = json_decode($json);
    $rtn = array();
    if (is_array($all)) {
        foreach ($all as $row => $rowValue) {
            $model = new activeServerModel('', '', '');
            foreach ($rowValue as $key => $value) {
                $model->{$key} = $value;
            }
            $rtn[] = $model;
        }
    }
    SQLAdopt::delete(new activeServerModel('', '', ''));
    foreach ($rtn as $o) {
        SQLAdopt::insert($o);
    }
}
 * Date: 15/2/4
 * Time: 下午5:56
 */
include_once dirname(__FILE__) . '/../common.php';
include_once dirname(__FILE__) . '/../DBAdopt/_class/BLL/operator.php';
header('Content-type: text/html; charset=utf8');
@($jumpPage = $_POST["page"]);
$perPage = 5;
$nowPage = 1;
if (isset($jumpPage)) {
    $nowPage = $jumpPage;
}
$shellModeNull = new shellModel('', '', '', '', '');
$shellCount = SQLAdopt::getPageCount($shellModeNull);
$maxPage = ceil($shellCount / $perPage);
$shellModelList = SQLAdopt::getPageList(new shellModel('', '', '', '', ''), ($nowPage - 1) * $perPage, $perPage);
if (!isset($jumpPage)) {
    ?>
<div class="row">

    <div class="nine columns">

        <h1>WebShell管理</h1>

    </div>


</div><!-- Site Heading Title ENDS -->

<div class="row">