Example #1
0
                    <th>QAS Geo</th>
                    <th>QAS Queue</th>
                    <th>type of errors</th>
                    <th>error name</th>
                    <th>qty</th>
                </tr>
            </thead>
            <tbody class="highlight-row"></tbody>
        </table>
    </div>
    </fieldset>
    </body>
</html>
<?php 
} else {
    echo Main::run();
}
class Main
{
    public static function run()
    {
        // DataBase Connection
        $connection = mysql_connect("localhost", "stgq6", "bluehost");
        if (!$connection) {
            die("DataBase connection failed: " . mysql_error());
        }
        // Selects data base
        $db_select = mysql_select_db("stgq6", $connection);
        if (!$db_select) {
            die("DataBase selection failed: " . mysql_error());
        }
Example #2
0
        $this->Template->request = ampersand($this->Environment->request);
        $this->Template->top = $GLOBALS['TL_LANG']['MSC']['backToTop'];
        $this->Template->modules = $this->User->navigation();
        $this->Template->home = $GLOBALS['TL_LANG']['MSC']['home'];
        $this->Template->backToTop = $GLOBALS['TL_LANG']['MSC']['backToTop'];
        $this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode'];
        $this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode'];
        $this->Template->loadingData = $GLOBALS['TL_LANG']['MSC']['loadingData'];
        $this->Template->coreOnlyMode = $GLOBALS['TL_LANG']['MSC']['coreOnlyMode'];
        $this->Template->isCoreOnlyMode = $GLOBALS['TL_CONFIG']['coreOnlyMode'];
        // Front end preview links
        if (CURRENT_ID != '') {
            // Pages
            if ($this->Input->get('do') == 'page') {
                $this->Template->frontendFile = '?page=' . CURRENT_ID;
            } elseif ($this->Input->get('do') == 'article') {
                $objArticle = $this->Database->prepare("SELECT id, pid, alias, inColumn FROM tl_article WHERE id=?")->limit(1)->execute(CURRENT_ID);
                if ($objArticle->numRows) {
                    $this->Template->frontendFile = '?page=' . $objArticle->pid . '&amp;article=' . ($objArticle->inColumn != 'main' ? $objArticle->inColumn . ':' : '') . ($objArticle->alias != '' && !$GLOBALS['TL_CONFIG']['disableAlias'] ? $objArticle->alias : $objArticle->id);
                }
            }
        }
        $this->Template->output();
    }
}
/**
 * Instantiate the controller
 */
$objMain = new Main();
$objMain->run();
Example #3
0
        }
    }
    public static function params_worker($opt)
    {
        if (isset($opt["worker"])) {
            Crontab::$worker = true;
        }
    }
    public static function params_tasktype($opt)
    {
        if (isset($opt["tasktype"])) {
            Crontab::$taskType = $opt["tasktype"];
        }
    }
    /**
     * 记录日志
     * @param $message
     */
    public static function log_write($message)
    {
        $now = date("H:i:s");
        if (Crontab::$daemon) {
            $destination = Crontab::$log_path . "log_" . date("Y-m-d") . ".log";
            error_log("{$now} : {$message}\r\n", 3, $destination, '');
        }
        echo "{$now} : {$message}\r\n";
    }
}
//运行
Main::run();
Example #4
0
        $this->spots[] = new Spot(42);
        $this->spots[] = new Spot(48);
        $this->spots[] = new Scanner(300);
        $this->spots[] = new Scanner(305);
        $this->spots[] = new Scanner(310);
        $this->spots[] = new Scanner(314);
        $this->dmx->addDevice(new Spot(6));
        $this->dmx->addDevice(new Spot(12));
        $this->dmx->addDevice(new Spot(18));
        $this->dmx->addDevice(new Spot(24));
        $this->dmx->addDevice(new Spot(30));
        $this->dmx->addDevice(new Spot(36));
        $this->dmx->addDevice(new Spot(42));
        $this->dmx->addDevice(new Spot(48));
        $this->dmx->addDevice(new Scanner(300));
        $this->dmx->addDevice(new Scanner(305));
        $this->dmx->addDevice(new Scanner(310));
        $this->dmx->addDevice(new Scanner(314));
        //$prog=new ProgMorse($this->dmx,"tardis__");
        $prog = new DmxHttp\Prog\Rand($this->dmx);
        //$prog=new DmxHttp\Prog\RunLight($this->dmx);
        //$prog=new ProgCounter($this->dmx);
        //$prog=new ProgRamp($this->dmx);
        //$prog=new DmxHttp\Prog\Advanced($this->dmx);
        $prog->run();
    }
}
require __DIR__ . '/vendor/autoload.php';
$main = new Main();
$main->run();
Example #5
0
    public function pushObserver(ObserverInterface $observer)
    {
        $this->observers[] = $observer;
    }
    public function updateObservers()
    {
        array_walk($this->observers, function (ObserverInterface $observer) {
            $observer->update();
        });
    }
}
class Main
{
    use ObserverTrait;
    public function run()
    {
        new \TestComponents\Component1();
    }
}
class Observer1 implements ObserverInterface
{
    public function update()
    {
        echo '<p>' . __CLASS__ . '</p>';
    }
}
$app = new Main();
$app->pushObserver(new Observer1());
$app->updateObservers();
$app->run();