Author: rostomsahakian
示例#1
0
文件: 005.php 项目: it114/witness
function f2($a, $b)
{
    echo $a * $b . "\n";
    return json_encode(c1::a($a, $b));
}
示例#2
0
文件: 001.php 项目: it114/witness
<?php

class c1
{
    public static function a()
    {
        return new c1();
    }
}
function f1($a, $b)
{
    echo f2($a + $b, $a * $b) . "\n";
}
function f2($a, $b)
{
    echo $a * $b . "\n";
    return json_encode(array($a, $b));
}
function ff()
{
    witness_start('abc');
    return 1;
}
echo "abc\n";
ff();
//echo f1(5, 6) . "\n";
echo "123\n";
f1(5, 10);
echo f2(1, 3) . "\n";
$o = c1::a();
示例#3
0
<?php

a(2, 3, ...__FILE__);
\b(2, 3, ...0);
c1::c(2, 3, ...B);
$d2->d(2, 3, ...null);
\e\ee(2, 3, ...C);
$f(2, 3, ...$g->D);
$h(2, 3, ...$i->E());
$j(2, 3, ...F::$k);
$l(2, 3, ...G::H);
$m(2, 3, ...I::J);
示例#4
0
 public function ConfirmUpdate(array $content)
 {
     if (!empty($content['pg_id']) && !empty($content['type'])) {
         $c1 = new c1();
         $c1->GetContentForEditing($content['pg_id'], $content['type']);
         $c1->ShowContent();
         switch ($content['type']) {
             case "c1_page":
                 if ($c1->_contents != $content['page_content'] || !empty($c1->_title) && $c1->_title != $content['page_title']) {
                     $sql = "UPDATE `page_content` SET `page_title`='" . mysql_escape_string($content['page_title']) . "', `page_content`='" . mysql_escape_string($content['page_content']) . "' WHERE `page_id` ='" . $content['pg_id'] . "'";
                     $result = $this->mysqli->query($sql);
                     if ($result == true) {
                         $this->SuccessMessages("Data was updated.");
                     } else {
                         $this->ErrorMessages("Uable to update data check again.");
                     }
                 } else {
                     $this->ErrorMessages("Nothing to update");
                 }
                 break;
             case "c2_page":
                 break;
             case "c3_page":
                 break;
             case "c4_page":
                 break;
             case "c5_page":
                 break;
             case "c6_page":
                 break;
             case "c7_page":
                 break;
             case "c8_page":
                 break;
             case "c9_page":
                 break;
             case "c10_page":
                 break;
             case "c11_page":
                 break;
             case "c12_page":
                 break;
             case "c13_page":
                 break;
             case "c14_page":
                 break;
             case "c15_page":
                 break;
             case "c16_page":
                 break;
             case "c17_page":
                 break;
             case "c18_page":
                 break;
             case "c19_page":
                 break;
             case "c20_page":
                 break;
         }
     }
 }
示例#5
0
文件: 006.php 项目: it114/witness
function f2($a, $b)
{
    $o = c1::a();
    echo $a * $b . "\n";
    return json_encode(array($a, $b));
}
示例#6
0
}
?>
</span></form></li>
                <li><form action="profile.php" method="get"><input type="submit" value="Add New user" name="command" class="alert-info"/></form></li>
                <li><form action="profile.php" method="get"><input type="submit" value="Edit Header" name="command" class="alert-info"/></form></li>
                <li><form action="profile.php" method="get"><input type="submit" value="Edit Footer" name="command" class="alert-info"/></form></li>
                <li><form action="profile.php" method="get"><input type="submit" value="Contact Manager" name="command" class="alert-info"/></form></li>
                <li><form action="profile.php" method="get"><input type="submit" value="Costum Forms" name="command" class="alert-info"/></form></li>                
                <li><form action="profile.php" method="get"><input type="submit" value="Google Analytics" name="command" class="alert-info"/></form></li>
            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">


            <?php 
$build = new c1();
$cmd = isset($_GET['command']) ? $_GET['command'] : $_POST['command'];
$contents = array();
$contents['page_title'] = $_GET['page_title'];
$contents['page_content'] = htmlspecialchars($_GET['page_content'], ENT_COMPAT, 'UTF-8');
$contents['div1'] = $_GET['div1'];
$contents['div2'] = $_GET['div2'];
$contents['div3'] = $_GET['div3'];
$contents['div4'] = $_GET['div4'];
$contents['div5'] = $_GET['div5'];
$contents['div6'] = $_GET['div6'];
$contents['div7'] = $_GET['div7'];
$contents['div8'] = $_GET['div8'];
$contents['type'] = $_GET['type'];
$contents['pg_id'] = $_GET['pg_id'];
switch ($cmd) {