text
stringlengths 2
1.03M
|
|---|
<?php
class PublicEventPings {
/** @var array<string, PublicPing> */
private array $pingedUsers;
public function __construct() {
$this->pingedUsers = [];
}
public function fromMainComment(PhabricatorUser $target, EmailCommentMessage $message) {
$ping = $this->pingedUsers[$target->getPHID()] ?? new PublicPing($target);
$ping->setMainComment($message);
$this->pingedUsers[$target->getPHID()] = $ping;
}
public function fromInlineComment(PhabricatorUser $target, EmailInlineComment $inlineComment) {
$ping = $this->pingedUsers[$target->getPHID()] ?? new PublicPing($target);
$ping->appendInlineComment($inlineComment);
$this->pingedUsers[$target->getPHID()] = $ping;
}
/**
* @return EmailRevisionCommentPinged[]
*/
public function intoBodies(string $actorEmail, string $transactionLink): array {
$associative = array_filter(array_map(function(PublicPing $ping) use ($actorEmail, $transactionLink) {
return $ping->intoPublicBody($actorEmail, $transactionLink);
}, $this->pingedUsers));
return array_values($associative);
}
}
|
<?php
/*
* This file is part of Laravel Core.
*
* (c) Graham Campbell <graham@alt-three.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace GrahamCampbell\Core\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
/**
* This is the app install command class.
*
* @author Graham Campbell <graham@alt-three.com>
*/
class AppInstall extends Command
{
/**
* The command name.
*
* @var string
*/
protected $name = 'app:install';
/**
* The command description.
*
* @var string
*/
protected $description = 'Installs the application';
/**
* The events instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* Create a new instance.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
*
* @return void
*/
public function __construct(Dispatcher $events)
{
$this->events = $events;
parent::__construct();
}
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->events->fire('command.installing', $this);
$this->events->fire('command.generatekey', $this);
$this->events->fire('command.cacheconfig', $this);
$this->events->fire('command.cacheroutes', $this);
$this->events->fire('command.publishvendors', $this);
$this->events->fire('command.runmigrations', $this);
$this->events->fire('command.runseeding', $this);
$this->events->fire('command.updatecache', $this);
$this->events->fire('command.linkstorage', $this);
$this->events->fire('command.extrastuff', $this);
$this->events->fire('command.installed', $this);
}
/**
* Get the events instance.
*
* @return \Illuminate\Contracts\Events\Dispatcher
*/
public function getEvents()
{
return $this->events;
}
}
|
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\CatalogSearch\Test\Block\Advanced;
use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
use Magento\Mtf\Block\Form as ParentForm;
use Magento\Mtf\Client\Element;
use Magento\Mtf\Client\Locator;
use Magento\Mtf\Fixture\FixtureInterface;
use Magento\Mtf\Client\Element\SimpleElement;
/**
* Advanced search form.
*/
class Form extends ParentForm
{
/**
* Search button selector.
*
* @var string
*/
protected $searchButtonSelector = '.action.search';
/**
* Field selector select tax class.
*
* @var string
*/
protected $taxClassSelector = '#tax_class_id';
/**
* Field selector.
*
* @var string
*/
protected $fieldSelector = './/div[label and div]';
/**
* Label element selector.
*
* @var string
*/
protected $labelSelector = 'label';
/**
* Selector for custom attribute.
*
* @var string
*/
protected $customAttributeSelector = 'div[class*="%s"]';
/**
* Submit search form.
*
* @return void
*/
public function submit()
{
$this->_rootElement->find($this->searchButtonSelector)->click();
}
/**
* Fill the root form.
*
* @param FixtureInterface $fixture
* @param SimpleElement|null $element
* @return $this
*/
public function fill(FixtureInterface $fixture, SimpleElement $element = null)
{
// Prepare price data
$data = $fixture->getData();
if (isset($data['price'])) {
$data = array_merge($data, $data['price']);
unset($data['price']);
}
// Mapping
$mapping = $this->dataMapping($data);
$attributeType = $attributeCode = '';
if ($fixture->hasData('custom_attribute')) {
/** @var CatalogProductAttribute $attribute */
$attribute = $fixture->getDataFieldConfig('custom_attribute')['source']->getAttribute();
$attributeType = $attribute->getFrontendInput();
$attributeCode = $attribute->getAttributeCode();
}
if ($this->hasRender($attributeType)) {
$element = $this->_rootElement->find(sprintf($this->customAttributeSelector, $attributeCode));
$arguments = ['fixture' => $fixture, 'element' => $element, 'mapping' => $mapping];
$this->callRender($attributeType, 'fill', $arguments);
} else {
$this->_fill($mapping, $element);
}
return $this;
}
/**
* Get form fields.
*
* @return array
*/
public function getFormLabels()
{
$labels = [];
$elements = $this->_rootElement->getElements($this->fieldSelector, Locator::SELECTOR_XPATH);
foreach ($elements as $element) {
$labels[] = $element->find($this->labelSelector)->getText();
}
return $labels;
}
}
|
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model as EloquentModel;
class BaseModel extends EloquentModel
{
public function scopeRecent($query)
{
return $query->orderBy('created_at', 'desc');
}
}
|
<div id="bnavtrunk">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-plus"> </i><?php echo _("Add Trunk")?> <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<?php
foreach($trunk_types as $type => $label) {
echo '<li><a href="config.php?display=trunks&tech='.$type.'" ><i class="fa fa-plus"></i> <strong>'.sprintf(_("Add %s Trunk"),$label).'</strong></a></li>';
}
?>
</ul>
</div>
<a href="?display=trunks" class="btn btn-default"><i class="fa fa-list"></i> <?php echo _("List Trunks")?></a>
</div>
<table data-url="ajax.php?module=core&command=getJSON&jdata=allTrunks" data-cache="false" data-toggle="table" data-search="true" data-toolbar="#bnavtrunk" class="table" id="table-all-side">
<thead>
<tr>
<th data-formatter="rtrunk" data-sortable="true" data-field="name"><?php echo _('Trunks')?></th>
</tr>
</thead>
</table>
<script>
function rtrunk(v,r){
return r['name']+' ('+r['tech']+')';
}
$("#table-all-side").on('click-row.bs.table',function(e,row,elem){
window.location = '?display=trunks&tech='+row['tech']+'&extdisplay=OUT_'+row['trunkid'];
})
</script>
|
<?php
// Application middleware
// e.g: app()->add(new \Slim\Csrf\Guard);
//
// Trailing slash
\Zank\Application::add(Zank\Middleware\TrailingSlash::class);
|
<?php
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
use App\Model\DateDiff;
if (count($argv) <= 2) {
echo "Usage: php App.php [date1] [date2]\n";
exit;
}
try {
$dateDiff = new DateDiff($argv[1], $argv[2]);
$days = $dateDiff->computeDiff();
} catch (Exception $e) {
echo $e->getMessage() . "\n";
exit;
}
if ($days > 1) {
echo "$days days\n";
} else {
echo "$days day\n";
}
|
<?php
declare(strict_types=1);
namespace App\Service;
use Hyperf\Di\Annotation\Inject;
use App\Model\AdminRule;
use App\Kernel\Category;
use App\Kernel\Tree;
class RuleService extends Service
{
/**
* @Inject
* @var AdminRule
*/
protected $model;
/**
* @Inject
* @var Tree
*/
protected $tree;
/**
* 获取列表
*
* @param string $type 类型:tree为树结构
* @return array
*/
public function getDataList($type = '')
{
$cat = new Category($this->model, ['id', 'pid', 'title', 'title']);
$data = $cat->getList([], 0, 'id');
if ($type == 'tree') {
foreach ($data as $k => $v) {
$data[$k]['check'] = false;
}
$data = $this->tree->list_to_tree($data, 'id', 'pid', 'child', 0, true, ['pid']);
}
return $data;
}
}
|
<?php
//grabs the parameters of the url ?user=
$_GET['user'];
$streamer = $_GET['user'];
$url = "https://api.hypixel.net/player?key=APIKEY&name=$streamer";
$content = file_get_contents($url);
$json = json_decode($content, true);
$name = $json['player']['playername'];
$exp = $json['player']['stats']['Bedwars']['Experience'];
$coins = $json['player']['stats']['Bedwars']['coins'];
$deaths = $json['player']['stats']['Bedwars']['deaths_bedwars'];
$lost = $json['player']['stats']['Bedwars']['losses_bedwars'];
$wins = $json['player']['stats']['Bedwars']['wins_bedwars'];
$kills = $json['player']['stats']['Bedwars']['kills_bedwars'];
$bedwarscrates = $json['player']['stats']['Bedwars']['bedwars_boxes'];
$winstreak = $json['player']['stats']['Bedwars']['winstreak'];
$played = $json['player']['stats']['Bedwars']['games_played_bedwars'];
$bedsbroken = $json['player']['stats']['Bedwars']['beds_broken_bedwars'];
$oneteamlost = $json['player']['stats']['Bedwars']['eight_one_losses_bedwars'];
$twoteamlost = $json['player']['stats']['Bedwars']['eight_two_losses_bedwars'];
$twoteamwins = $json['player']['stats']['Bedwars']['eight_two_wins_bedwars'];
$threeteamlost = $json['player']['stats']['Bedwars']['four_three_losses_bedwars'];
$threeteamwins = $json['player']['stats']['Bedwars']['four_three_wins_bedwars'];
$fourteamlost = $json['player']['stats']['Bedwars']['four_four_losses_bedwars'];
$fourteamwins = $json['player']['stats']['Bedwars']['four_four_wins_bedwars'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hypixel API - Statics Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.min.css">
<link rel="icon" type="image/png" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" href="assets/images/favicon-16x16.png">
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/portfolio-item.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
window.setInterval("reloadIFrame();", 600000);
function reloadIFrame() {
document.frames["Refresh"].location.reload();
}
</script>
</head>
<body>
<div class="container">
<div class="center">
<div style="margin-top: 5em">
<img src="assets/images/logo.png">
<h2>Hypixel API</h2>
<span>
<h1>Hypixel - Bedwars Status</h1>
<h1>Name:</h1>
<p><?php echo "$name";?></p>
<h1>Experience:</h1>
<p><?php echo "$exp";?></p>
<h1>Coins:</h1>
<p><?php echo "$coins";?></p>
<h1>Total</h1>
<h1>Total Deaths:</h1>
<p><?php echo "$deaths";?></p>
<h1>Total Win:</h1>
<p><?php echo "$wins";?></p>
<h1>Total Lost:</h1>
<p><?php echo "$lost";?></p>
<h1>Total Kills:</h1>
<p><?php echo "$kills";?></p>
<h1>Total Bedwars Crates:</h1>
<p><?php echo "$bedwarscrates";?></p>
<h1>Total Win Streaks:</h1>
<p><?php echo "$winstreak";?></p>
<h1>Total Bedwars Played:</h1>
<p><?php echo "$played";?></p>
<h1>Total Beds Broken:</h1>
<p><?php echo "$bedsbroken";?></p>
<h1>Match Thy Played:</h1>
<h1>One Player Match Lost:</h1>
<p><?php echo "$oneteamlost";?></p>
<h1>Two Player Match Lost:</h1>
<p><?php echo "$twoteamlost";?></p>
<h1>Two Player Match Wins:</h1>
<p><?php echo "$twoteamwins";?></p>
<h1>Three Player Match Lost:</h1>
<p><?php echo "$threeteamlost";?></p>
<h1>Three Player Match Wins:</h1>
<p><?php echo "$threeteamwins";?></p>
<h1>Four Player Match Lost:</h1>
<p><?php echo "$fourteamlost";?></p>
<h1>Four Player Match Wins:</h1>
<p><?php echo "$fourteamwins";?></p>
</span>
</div>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
|
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="../../index3.html" class="brand-link">
<img src="<?=base_url(); ?>/assets/dist/img/AdminLTELogo.png"
alt="AdminLTE Logo"
class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">AdminLTE 3</span>
</a>
<!-- Sidebar -->
<div class="sidebar">
<!-- Sidebar user (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image">
<img src="<?=base_url(); ?>/assets/dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
</div>
<div class="info">
<a href="#" class="d-block">
<?= $this->session->userdata("name");?>
<?= $this->session->userdata("last_name");?>
</a>
</div>
</div>
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>
Dashboard
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../../index.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v1</p>
</a>
</li>
<li class="nav-item">
<a href="../../index2.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v2</p>
</a>
</li>
<li class="nav-item">
<a href="../../index3.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v3</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="../widgets.html" class="nav-link">
<i class="nav-icon fas fa-th"></i>
<p>
Widgets
<span class="right badge badge-danger">New</span>
</p>
</a>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-copy"></i>
<p>
Layout Options
<i class="fas fa-angle-left right"></i>
<span class="badge badge-info right">6</span>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../layout/top-nav.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Top Navigation</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/top-nav-sidebar.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Top Navigation + Sidebar</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/boxed.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Boxed</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/fixed-sidebar.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Fixed Sidebar</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/fixed-topnav.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Fixed Navbar</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/fixed-footer.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Fixed Footer</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/collapsed-sidebar.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Collapsed Sidebar</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-chart-pie"></i>
<p>
Charts
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../charts/chartjs.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>ChartJS</p>
</a>
</li>
<li class="nav-item">
<a href="../charts/flot.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Flot</p>
</a>
</li>
<li class="nav-item">
<a href="../charts/inline.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Inline</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-tree"></i>
<p>
Gerenciamento
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="<?= base_url();?>management/category" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Categorias</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/icons.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Icons</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/buttons.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Buttons</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/sliders.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Sliders</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/modals.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Modals & Alerts</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/navbar.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Navbar & Tabs</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/timeline.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Timeline</p>
</a>
</li>
<li class="nav-item">
<a href="../UI/ribbons.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Ribbons</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-edit"></i>
<p>
Forms
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../forms/general.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>General Elements</p>
</a>
</li>
<li class="nav-item">
<a href="../forms/advanced.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Advanced Elements</p>
</a>
</li>
<li class="nav-item">
<a href="../forms/editors.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Editors</p>
</a>
</li>
<li class="nav-item">
<a href="../forms/validation.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Validation</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-table"></i>
<p>
Tables
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../tables/simple.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Simple Tables</p>
</a>
</li>
<li class="nav-item">
<a href="../tables/data.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>DataTables</p>
</a>
</li>
<li class="nav-item">
<a href="../tables/jsgrid.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>jsGrid</p>
</a>
</li>
</ul>
</li>
<li class="nav-header">EXAMPLES</li>
<li class="nav-item">
<a href="../calendar.html" class="nav-link">
<i class="nav-icon far fa-calendar-alt"></i>
<p>
Calendar
<span class="badge badge-info right">2</span>
</p>
</a>
</li>
<li class="nav-item">
<a href="../gallery.html" class="nav-link">
<i class="nav-icon far fa-image"></i>
<p>
Gallery
</p>
</a>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon far fa-envelope"></i>
<p>
Mailbox
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../mailbox/mailbox.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Inbox</p>
</a>
</li>
<li class="nav-item">
<a href="../mailbox/compose.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Compose</p>
</a>
</li>
<li class="nav-item">
<a href="../mailbox/read-mail.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Read</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-book"></i>
<p>
Pages
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../examples/invoice.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Invoice</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/profile.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Profile</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/e-commerce.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>E-commerce</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/projects.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Projects</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/project-add.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Project Add</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/project-edit.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Project Edit</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/project-detail.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Project Detail</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/contacts.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Contacts</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview menu-open">
<a href="#" class="nav-link active">
<i class="nav-icon far fa-plus-square"></i>
<p>
Extras
<i class="fas fa-angle-left right"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../examples/login.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Login</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/register.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Register</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/forgot-password.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Forgot Password</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/recover-password.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Recover Password</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/lockscreen.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Lockscreen</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/legacy-user-menu.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Legacy User Menu</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/language-menu.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Language Menu</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/404.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Error 404</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/500.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Error 500</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/pace.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Pace</p>
</a>
</li>
<li class="nav-item">
<a href="../examples/blank.html" class="nav-link active">
<i class="far fa-circle nav-icon"></i>
<p>Blank Page</p>
</a>
</li>
<li class="nav-item">
<a href="../../starter.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Starter Page</p>
</a>
</li>
</ul>
</li>
<li class="nav-header">MISCELLANEOUS</li>
<li class="nav-item">
<a href="https://adminlte.io/docs/3.0" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Documentation</p>
</a>
</li>
<li class="nav-header">MULTI LEVEL EXAMPLE</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="fas fa-circle nav-icon"></i>
<p>Level 1</p>
</a>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-circle"></i>
<p>
Level 1
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="#" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Level 2</p>
</a>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>
Level 2
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="#" class="nav-link">
<i class="far fa-dot-circle nav-icon"></i>
<p>Level 3</p>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="far fa-dot-circle nav-icon"></i>
<p>Level 3</p>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="far fa-dot-circle nav-icon"></i>
<p>Level 3</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Level 2</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="fas fa-circle nav-icon"></i>
<p>Level 1</p>
</a>
</li>
<li class="nav-header">LABELS</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nav-icon far fa-circle text-danger"></i>
<p class="text">Important</p>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nav-icon far fa-circle text-warning"></i>
<p>Warning</p>
</a>
</li>
<li class="nav-item">
<a href="<?= base_url(); ?>/auth/logout" class="nav-link">
<i class="nav-icon far fa-circle text-info"></i>
<p>Sair</p>
</a>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
|
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title')</title>
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="icon" href="{{ asset('img/logo/logo_main.png') }}">
</head>
<body>
@include('layout.header')
<div class="page">
@yield('body')
</div>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/app.js"></script>
</body>
</html>
|
<?php
/* Smarty version 3.1.38, created on 2021-05-04 11:46:21
from 'C:\xampp\htdocs\shop\templates\NOVA\basket\cart_dropdown.tpl' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.38',
'unifunc' => 'content_609117ed5acb48_16734661',
'has_nocache_code' => false,
'file_dependency' =>
array (
'aa1d0cead85a5485933e4945c8354e20061b13c8' =>
array (
0 => 'C:\\xampp\\htdocs\\shop\\templates\\NOVA\\basket\\cart_dropdown.tpl',
1 => 1612177967,
2 => 'file',
),
),
'includes' =>
array (
'file:snippets/image.tpl' => 1,
),
),false)) {
function content_609117ed5acb48_16734661 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, false);
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1976870382609117ed5406f1_80937336', 'basket-cart-dropdown');
?>
<?php }
/* {block 'basket-cart-dropdown-cart-item-item-image'} */
class Block_1113577111609117ed54a321_79309944 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php $_block_plugin40 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin40, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('class'=>"col-auto"));
$_block_repeat=true;
echo $_block_plugin40->render(array('class'=>"col-auto"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php $_block_plugin41 = isset($_smarty_tpl->smarty->registered_plugins['block']['link'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['link'][0][0] : null;
if (!is_callable(array($_block_plugin41, 'render'))) {
throw new SmartyException('block tag \'link\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('link', array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)));
$_block_repeat=true;
echo $_block_plugin41->render(array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php $_smarty_tpl->_subTemplateRender('file:snippets/image.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('fluid'=>false,'item'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel,'square'=>false,'srcSize'=>'xs','sizes'=>'45px','class'=>'img-sm'), 0, true);
?>
<?php $_block_repeat=false;
echo $_block_plugin41->render(array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin40->render(array('class'=>"col-auto"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-item-image'} */
/* {block 'basket-cart-dropdown-cart-item-item-link'} */
class Block_504041349609117ed5517d7_55552526 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php $_block_plugin42 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin42, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('class'=>"col-auto"));
$_block_repeat=true;
echo $_block_plugin42->render(array('class'=>"col-auto"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'replace_delim' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->nAnzahl ));?>
x
<?php $_block_repeat=false;
echo $_block_plugin42->render(array('class'=>"col-auto"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_plugin43 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin43, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array());
$_block_repeat=true;
echo $_block_plugin43->render(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php $_block_plugin44 = isset($_smarty_tpl->smarty->registered_plugins['block']['link'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['link'][0][0] : null;
if (!is_callable(array($_block_plugin44, 'render'))) {
throw new SmartyException('block tag \'link\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('link', array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)));
$_block_repeat=true;
echo $_block_plugin44->render(array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName ));?>
<?php $_block_repeat=false;
echo $_block_plugin44->render(array('href'=>$_smarty_tpl->tpl_vars['oPosition']->value->Artikel->cURLFull,'title'=>htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true)), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin43->render(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-item-link'} */
/* {block 'basket-cart-dropdown-cart-item-item-price'} */
class Block_1759790325609117ed55d6d7_98984652 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<td class="text-right-util text-nowrap-util">
<?php if ($_smarty_tpl->tpl_vars['oPosition']->value->istKonfigVater()) {?>
<?php echo $_smarty_tpl->tpl_vars['oPosition']->value->cKonfigpreisLocalized[$_smarty_tpl->tpl_vars['NettoPreise']->value][$_SESSION['cWaehrungName']];?>
<?php } else { ?>
<?php echo $_smarty_tpl->tpl_vars['oPosition']->value->cEinzelpreisLocalized[$_smarty_tpl->tpl_vars['NettoPreise']->value][$_SESSION['cWaehrungName']];?>
<?php }?>
</td>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-item-price'} */
/* {block 'basket-cart-dropdown-cart-item-no-item-count'} */
class Block_1090169392609117ed563ef7_35356739 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<td>
<?php $_block_plugin45 = isset($_smarty_tpl->smarty->registered_plugins['block']['formrow'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['formrow'][0][0] : null;
if (!is_callable(array($_block_plugin45, 'render'))) {
throw new SmartyException('block tag \'formrow\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('formrow', array());
$_block_repeat=true;
echo $_block_plugin45->render(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php $_block_plugin46 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin46, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('class'=>"col-auto"));
$_block_repeat=true;
echo $_block_plugin46->render(array('class'=>"col-auto"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_block_repeat=false;
echo $_block_plugin46->render(array('class'=>"col-auto"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_plugin47 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin47, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('class'=>"col-auto"));
$_block_repeat=true;
echo $_block_plugin47->render(array('class'=>"col-auto"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'replace_delim' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->nAnzahl ));?>
x
<?php $_block_repeat=false;
echo $_block_plugin47->render(array('class'=>"col-auto"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_plugin48 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin48, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array());
$_block_repeat=true;
echo $_block_plugin48->render(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo mb_convert_encoding(htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'trans' ][ 0 ], array( $_smarty_tpl->tpl_vars['oPosition']->value->cName )), ENT_QUOTES, 'utf-8', true), "HTML-ENTITIES", 'utf-8');?>
<?php $_block_repeat=false;
echo $_block_plugin48->render(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin45->render(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</td>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-no-item-count'} */
/* {block 'basket-cart-dropdown-cart-item-noitem-price'} */
class Block_836298089609117ed56c3d2_11259082 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<td class="text-right-util text-nowrap-util">
<?php echo $_smarty_tpl->tpl_vars['oPosition']->value->cEinzelpreisLocalized[$_smarty_tpl->tpl_vars['NettoPreise']->value][$_SESSION['cWaehrungName']];?>
</td>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-noitem-price'} */
/* {block 'basket-cart-dropdown-cart-item'} */
class Block_2147285167609117ed543e09_78530022 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_SESSION['Warenkorb']->PositionenArr, 'oPosition');
$_smarty_tpl->tpl_vars['oPosition']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['oPosition']->value) {
$_smarty_tpl->tpl_vars['oPosition']->do_else = false;
?>
<?php if (!$_smarty_tpl->tpl_vars['oPosition']->value->istKonfigKind()) {?>
<?php if ($_smarty_tpl->tpl_vars['oPosition']->value->nPosTyp == C_WARENKORBPOS_TYP_ARTIKEL || $_smarty_tpl->tpl_vars['oPosition']->value->nPosTyp == C_WARENKORBPOS_TYP_GRATISGESCHENK) {?>
<tr>
<td>
<?php $_block_plugin39 = isset($_smarty_tpl->smarty->registered_plugins['block']['formrow'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['formrow'][0][0] : null;
if (!is_callable(array($_block_plugin39, 'render'))) {
throw new SmartyException('block tag \'formrow\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('formrow', array());
$_block_repeat=true;
echo $_block_plugin39->render(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1113577111609117ed54a321_79309944', 'basket-cart-dropdown-cart-item-item-image', $this->tplIndex);
?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_504041349609117ed5517d7_55552526', 'basket-cart-dropdown-cart-item-item-link', $this->tplIndex);
?>
<?php $_block_repeat=false;
echo $_block_plugin39->render(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</td>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1759790325609117ed55d6d7_98984652', 'basket-cart-dropdown-cart-item-item-price', $this->tplIndex);
?>
</tr>
<?php } else { ?>
<tr>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1090169392609117ed563ef7_35356739', 'basket-cart-dropdown-cart-item-no-item-count', $this->tplIndex);
?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_836298089609117ed56c3d2_11259082', 'basket-cart-dropdown-cart-item-noitem-price', $this->tplIndex);
?>
</tr>
<?php }?>
<?php }?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item'} */
/* {block 'basket-cart-dropdown-cart-item-net'} */
class Block_510852053609117ed571ff3_75834545 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<li class="cart-dropdown-total-item">
<?php if (empty($_SESSION['Versandart'])) {?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'subtotal','section'=>'account data'),$_smarty_tpl ) );?>
<?php } else { ?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'totalSum'),$_smarty_tpl ) );?>
<?php }?> (<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'net'),$_smarty_tpl ) );?>
) <span class="cart-dropdown-total-item-price"><?php echo $_smarty_tpl->tpl_vars['WarensummeLocalized']->value[$_smarty_tpl->tpl_vars['NettoPreise']->value];?>
</span>
</li>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-net'} */
/* {block 'basket-cart-dropdown-cart-item-tax'} */
class Block_1445585722609117ed57a903_97346430 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['Steuerpositionen']->value, 'Steuerposition');
$_smarty_tpl->tpl_vars['Steuerposition']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['Steuerposition']->value) {
$_smarty_tpl->tpl_vars['Steuerposition']->do_else = false;
?>
<li class="cart-dropdown-total-item">
<?php echo $_smarty_tpl->tpl_vars['Steuerposition']->value->cName;?>
<span class="cart-dropdown-total-item-price"><?php echo $_smarty_tpl->tpl_vars['Steuerposition']->value->cPreisLocalized;?>
</span>
</li>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-tax'} */
/* {block 'basket-cart-dropdown-cart-item-total'} */
class Block_2098080860609117ed57fa54_02802305 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<li class="font-weight-bold-util">
<?php if (empty($_SESSION['Versandart'])) {?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'subtotal','section'=>'account data'),$_smarty_tpl ) );?>
<?php } else { ?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'totalSum'),$_smarty_tpl ) );?>
<?php }?>: <span class="cart-dropdown-total-item-price"><?php echo $_smarty_tpl->tpl_vars['WarensummeLocalized']->value[0];?>
</span>
</li>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-total'} */
/* {block 'basket-cart-dropdown-cart-item-favourable-shipping'} */
class Block_1406672139609117ed584be9_65845742 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php if ($_smarty_tpl->tpl_vars['favourableShippingString']->value !== '') {?>
<li class="cart-dropdown-total-item"><?php echo $_smarty_tpl->tpl_vars['favourableShippingString']->value;?>
</li>
<?php }?>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-item-favourable-shipping'} */
/* {block 'basket-cart-dropdown-total'} */
class Block_833080856609117ed570d17_41699565 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<ul class="list-unstyled">
<?php if ($_smarty_tpl->tpl_vars['NettoPreise']->value) {?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_510852053609117ed571ff3_75834545', 'basket-cart-dropdown-cart-item-net', $this->tplIndex);
?>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['Einstellungen']->value['global']['global_steuerpos_anzeigen'] !== 'N' && (isset($_smarty_tpl->tpl_vars['Steuerpositionen']->value)) && count($_smarty_tpl->tpl_vars['Steuerpositionen']->value) > 0) {?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1445585722609117ed57a903_97346430', 'basket-cart-dropdown-cart-item-tax', $this->tplIndex);
?>
<?php }?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_2098080860609117ed57fa54_02802305', 'basket-cart-dropdown-cart-item-total', $this->tplIndex);
?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1406672139609117ed584be9_65845742', 'basket-cart-dropdown-cart-item-favourable-shipping', $this->tplIndex);
?>
</ul>
<?php
}
}
/* {/block 'basket-cart-dropdown-total'} */
/* {block 'basket-cart-dropdown-buttons'} */
class Block_1004076372609117ed587e80_54116172 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php $_block_plugin49 = isset($_smarty_tpl->smarty->registered_plugins['block']['row'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['row'][0][0] : null;
if (!is_callable(array($_block_plugin49, 'render'))) {
throw new SmartyException('block tag \'row\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('row', array('class'=>"cart-dropdown-buttons"));
$_block_repeat=true;
echo $_block_plugin49->render(array('class'=>"cart-dropdown-buttons"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php $_block_plugin50 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin50, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('cols'=>12,'lg'=>6));
$_block_repeat=true;
echo $_block_plugin50->render(array('cols'=>12,'lg'=>6), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php ob_start();
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['get_static_route'][0], array( array('id'=>'bestellvorgang.php'),$_smarty_tpl ) );
$_prefixVariable38=ob_get_clean();
$_block_plugin51 = isset($_smarty_tpl->smarty->registered_plugins['block']['button'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['button'][0][0] : null;
if (!is_callable(array($_block_plugin51, 'render'))) {
throw new SmartyException('block tag \'button\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('button', array('variant'=>"outline-primary",'type'=>"link",'block'=>true,'size'=>"sm",'href'=>$_prefixVariable38."?wk=1",'class'=>"cart-dropdown-next"));
$_block_repeat=true;
echo $_block_plugin51->render(array('variant'=>"outline-primary",'type'=>"link",'block'=>true,'size'=>"sm",'href'=>$_prefixVariable38."?wk=1",'class'=>"cart-dropdown-next"), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'nextStepCheckout','section'=>'checkout'),$_smarty_tpl ) );?>
<?php $_block_repeat=false;
echo $_block_plugin51->render(array('variant'=>"outline-primary",'type'=>"link",'block'=>true,'size'=>"sm",'href'=>$_prefixVariable38."?wk=1",'class'=>"cart-dropdown-next"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin50->render(array('cols'=>12,'lg'=>6), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_plugin52 = isset($_smarty_tpl->smarty->registered_plugins['block']['col'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['col'][0][0] : null;
if (!is_callable(array($_block_plugin52, 'render'))) {
throw new SmartyException('block tag \'col\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('col', array('cols'=>12,'lg'=>6));
$_block_repeat=true;
echo $_block_plugin52->render(array('cols'=>12,'lg'=>6), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php ob_start();
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'gotoBasket'),$_smarty_tpl ) );
$_prefixVariable39=ob_get_clean();
ob_start();
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['get_static_route'][0], array( array('id'=>'warenkorb.php'),$_smarty_tpl ) );
$_prefixVariable40=ob_get_clean();
$_block_plugin53 = isset($_smarty_tpl->smarty->registered_plugins['block']['button'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['button'][0][0] : null;
if (!is_callable(array($_block_plugin53, 'render'))) {
throw new SmartyException('block tag \'button\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('button', array('variant'=>"primary",'type'=>"link",'block'=>true,'size'=>"sm",'title'=>$_prefixVariable39,'href'=>$_prefixVariable40));
$_block_repeat=true;
echo $_block_plugin53->render(array('variant'=>"primary",'type'=>"link",'block'=>true,'size'=>"sm",'title'=>$_prefixVariable39,'href'=>$_prefixVariable40), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'gotoBasket'),$_smarty_tpl ) );?>
<?php $_block_repeat=false;
echo $_block_plugin53->render(array('variant'=>"primary",'type'=>"link",'block'=>true,'size'=>"sm",'title'=>$_prefixVariable39,'href'=>$_prefixVariable40), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin52->render(array('cols'=>12,'lg'=>6), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php $_block_repeat=false;
echo $_block_plugin49->render(array('class'=>"cart-dropdown-buttons"), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-buttons'} */
/* {block 'basket-cart-dropdown-shipping-free-hint'} */
class Block_1601600391609117ed59c301_70604629 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<hr>
<ul class="cart-dropdown-shipping-notice list-icons font-size-sm">
<li>
<a class="popup"
href="<?php if (!empty($_smarty_tpl->tpl_vars['oSpezialseiten_arr']->value) && (isset($_smarty_tpl->tpl_vars['oSpezialseiten_arr']->value[(defined('LINKTYP_VERSAND') ? constant('LINKTYP_VERSAND') : null)]))) {
echo $_smarty_tpl->tpl_vars['oSpezialseiten_arr']->value[(defined('LINKTYP_VERSAND') ? constant('LINKTYP_VERSAND') : null)]->getURL();
} else { ?>#<?php }?>"
data-toggle="tooltip"
data-placement="bottom"
title="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'shippingInfo','section'=>'login'),$_smarty_tpl ) );?>
">
<i class="fa fa-info-circle"></i>
</a>
<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'truncate' ][ 0 ], array( $_smarty_tpl->tpl_vars['WarenkorbVersandkostenfreiHinweis']->value,160,"..." ));?>
</li>
</ul>
<?php
}
}
/* {/block 'basket-cart-dropdown-shipping-free-hint'} */
/* {block 'basket-cart-dropdown-cart-items-content'} */
class Block_1603749299609117ed5434a7_18576516 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<div class="table-responsive max-h-sm lg-max-h">
<table class="table table-striped dropdown-cart-items">
<tbody>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_2147285167609117ed543e09_78530022', 'basket-cart-dropdown-cart-item', $this->tplIndex);
?>
</tbody>
</table>
</div>
<div class="dropdown-body">
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_833080856609117ed570d17_41699565', 'basket-cart-dropdown-total', $this->tplIndex);
?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1004076372609117ed587e80_54116172', 'basket-cart-dropdown-buttons', $this->tplIndex);
?>
<?php if (!empty($_smarty_tpl->tpl_vars['WarenkorbVersandkostenfreiHinweis']->value)) {?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1601600391609117ed59c301_70604629', 'basket-cart-dropdown-shipping-free-hint', $this->tplIndex);
?>
<?php }?>
</div>
<?php
}
}
/* {/block 'basket-cart-dropdown-cart-items-content'} */
/* {block 'basket-cart-dropdown-hint-empty'} */
class Block_687702537609117ed5a6d46_74821331 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<?php ob_start();
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['get_static_route'][0], array( array('id'=>'warenkorb.php'),$_smarty_tpl ) );
$_prefixVariable41 = ob_get_clean();
ob_start();
echo $_prefixVariable41;
$_prefixVariable42=ob_get_clean();
ob_start();
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('section'=>'checkout','key'=>'emptybasket'),$_smarty_tpl ) );
$_prefixVariable43=ob_get_clean();
$_block_plugin54 = isset($_smarty_tpl->smarty->registered_plugins['block']['dropdownitem'][0][0]) ? $_smarty_tpl->smarty->registered_plugins['block']['dropdownitem'][0][0] : null;
if (!is_callable(array($_block_plugin54, 'render'))) {
throw new SmartyException('block tag \'dropdownitem\' not callable or registered');
}
$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('dropdownitem', array('class'=>"cart-dropdown-empty",'href'=>$_prefixVariable42,'rel'=>"nofollow",'title'=>$_prefixVariable43));
$_block_repeat=true;
echo $_block_plugin54->render(array('class'=>"cart-dropdown-empty",'href'=>$_prefixVariable42,'rel'=>"nofollow",'title'=>$_prefixVariable43), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();?>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('section'=>'checkout','key'=>'emptybasket'),$_smarty_tpl ) );?>
<?php $_block_repeat=false;
echo $_block_plugin54->render(array('class'=>"cart-dropdown-empty",'href'=>$_prefixVariable42,'rel'=>"nofollow",'title'=>$_prefixVariable43), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
<?php
}
}
/* {/block 'basket-cart-dropdown-hint-empty'} */
/* {block 'basket-cart-dropdown'} */
class Block_1976870382609117ed5406f1_80937336 extends Smarty_Internal_Block
{
public $subBlocks = array (
'basket-cart-dropdown' =>
array (
0 => 'Block_1976870382609117ed5406f1_80937336',
),
'basket-cart-dropdown-cart-items-content' =>
array (
0 => 'Block_1603749299609117ed5434a7_18576516',
),
'basket-cart-dropdown-cart-item' =>
array (
0 => 'Block_2147285167609117ed543e09_78530022',
),
'basket-cart-dropdown-cart-item-item-image' =>
array (
0 => 'Block_1113577111609117ed54a321_79309944',
),
'basket-cart-dropdown-cart-item-item-link' =>
array (
0 => 'Block_504041349609117ed5517d7_55552526',
),
'basket-cart-dropdown-cart-item-item-price' =>
array (
0 => 'Block_1759790325609117ed55d6d7_98984652',
),
'basket-cart-dropdown-cart-item-no-item-count' =>
array (
0 => 'Block_1090169392609117ed563ef7_35356739',
),
'basket-cart-dropdown-cart-item-noitem-price' =>
array (
0 => 'Block_836298089609117ed56c3d2_11259082',
),
'basket-cart-dropdown-total' =>
array (
0 => 'Block_833080856609117ed570d17_41699565',
),
'basket-cart-dropdown-cart-item-net' =>
array (
0 => 'Block_510852053609117ed571ff3_75834545',
),
'basket-cart-dropdown-cart-item-tax' =>
array (
0 => 'Block_1445585722609117ed57a903_97346430',
),
'basket-cart-dropdown-cart-item-total' =>
array (
0 => 'Block_2098080860609117ed57fa54_02802305',
),
'basket-cart-dropdown-cart-item-favourable-shipping' =>
array (
0 => 'Block_1406672139609117ed584be9_65845742',
),
'basket-cart-dropdown-buttons' =>
array (
0 => 'Block_1004076372609117ed587e80_54116172',
),
'basket-cart-dropdown-shipping-free-hint' =>
array (
0 => 'Block_1601600391609117ed59c301_70604629',
),
'basket-cart-dropdown-hint-empty' =>
array (
0 => 'Block_687702537609117ed5a6d46_74821331',
),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>
<div class="cart-dropdown dropdown-menu dropdown-menu-right lg-min-w-lg">
<?php if (count($_SESSION['Warenkorb']->PositionenArr) > 0) {?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1603749299609117ed5434a7_18576516', 'basket-cart-dropdown-cart-items-content', $this->tplIndex);
?>
<?php } else { ?>
<?php
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_687702537609117ed5a6d46_74821331', 'basket-cart-dropdown-hint-empty', $this->tplIndex);
?>
<?php }?>
</div>
<?php
}
}
/* {/block 'basket-cart-dropdown'} */
}
|
<?php
namespace App\Repositories;
use App\State;
class StateRepository
{
public function all(){
return State::lists('name', 'id');
}
}
|
<?php
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
global $comiis_portal_lang;
$comiis_portal_lang = array(
'nav03_a' => '静态两排导航',
'nav03_b' => '文字',
);
|
<?php
define('FOO', "\n");
define('BAR', "\r");
var_dump(PHP_EOL);
var_dump(FOO);
var_dump(BAR);
|
<?php
namespace App\Http\Controllers\cms;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardController extends Controller
{
public function __construct()
{
// $this->middleware('auth:admin');
}
public function index()
{
return view('cms.dashboard.index');
}
}
|
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::group(['middleware' => 'guest'], function(){
Route::get('login/{provider}', 'App\Http\Controllers\Auth\LoginController@redirectToProvider');
Route::get('login/{provider}/callback','App\Http\Controllers\Auth\LoginController@handleProviderCallback');
});
|
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Player extends Model
{
use HasFactory;
public function team()
{
return $this->belongsTo(Team::class);
}
}
|
<?php
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
include"../includes/conecta.php";
$projeto = 4;
session_start();
if(!isset($_SESSION['user']) || !isset($_SESSION['login']) || !isset($_SESSION['senha']) || !isset($_SESSION['nome']) || !isset($_SESSION['nivel'])) {
echo "Esta área é restrita. Clique ";
echo "<a href=\"../index.html\">aqui</a>";
echo " para fazer o LOGIN.";
exit;
} else {
$sql_permissao = mysql_query("select * from TAB_MAIN_USERS_PROJECTS where ID_PROJETO = '$projeto' and ID_USER = '$_SESSION[user]'", $db);
$num_busca = mysql_num_rows($sql_permissao);
if ($num_busca == 0) {
echo "Esta área é restrita. Clique ";
echo "<a href=\"../index.html\">aqui</a>";
echo " para fazer o LOGIN.";
exit;
} else {
$tabela = '<table border=1>';
$tabela .= '<thead>';
$tabela .= '<tr>';
$tabela .= '<th align="center"><b>Código</b></th>';
$tabela .= '<th align="center"><b>Nome</b></th>';
$tabela .= '<th align="center"><b>Sigla</b></th>';
$tabela .= '</tr>';
$tabela .= '</thead>';
$tabela .= '<tbody>';
$sql = mysql_query("select * from TAB_APOIO_UF order by ID asc", $db);
while ($vetor=mysql_fetch_array($sql)) {
$tabela .= '<tr>';
$tabela .= '<td>'.$vetor['ID'].'</td>';
$tabela .= '<td>'.$vetor['DESCRICAO'].'</td>';
$tabela .= '<td>'.$vetor['SIGLA'].'</td>';
$tabela .= '</tr>';
}
$tabela .= '</tbody>';
$tabela .= '</table>';
header("Pragma: no-cache");
header("Content-Type: application/msexcel; charset=utf-8");
header("Content-Disposition: attachment; filename=excel_tp_uf.xls");
header("Content-Description: PHP Generated Data" );
header("Cache-Control: no-cache, must-revalidate");
header("Content-type: application/force-download");
echo $tabela;
}
}
?>
|
<?php
class Home extends CI_Controller
{
public function index()
{
$this->load->view('template');
}
}
|
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Pemesanan;
use App\Notifikasi;
use Mail;
class PetugasC extends Controller
{
//
public function index()
{
return view('petugas.index');
}
public function blumverifikasi()
{
$data = Pemesanan::where('status',2)->orderBy('updated_at','DESC')->get();
return view('petugas.blumverifikasi',['data'=>$data]);
}
public function sdhverifikasi()
{
$data = Pemesanan::where('status',3)->orderBy('updated_at','DESC')->get();
return view('petugas.sdhverifikasi',['data'=>$data]);
}
public function verifikasi($id)
{
$data = Pemesanan::find($id);
$jsondecode = json_decode($data->data_penumpang);
Mail::send('email',['data'=>$data,'jsondecode'=>$jsondecode], function ($message) use($jsondecode){
$message->subject('Tiket Anda telah diVERIFIKASI!!!');
$message->from('staban@staban.com','STABAN');
$message->to($jsondecode[0]->mail);
});
if (Mail::failures()) {
echo "asd";
}else{
$data->update(['status'=>3]);
Notifikasi::create([
'id_user'=>$data->id_user,
'id_pemesanan'=>$data->id_pemesanan,
'message'=>'Tiket dengan kode pemesanan '.$data->kode_pemesanan.' telah diverifikasi. anda dapat mengecheck tiketnya di email anda',
'status'=>'1',
]);
}
// dump($jsondecode[0]->mail);
// echo "<input type='checkbox' checked>";
return redirect('/petugas/sdhverifikasi')->with('success','Kode Pemesanan '.$data->kode_pemesanan.' Berhasil Diverifikasi');
}
}
|
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">
Agregar habilidades
<a href="{{ route('skills.create') }}" class="btn-sm btn-primary float-right" >Crear</a>
</div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<table class="table">
<thead>
<th>Nombre</th>
<th>Descripcion</th>
<th>Dominio</th>
<th>Experiencia</th>
<th colspan="2"> </th>
</thead>
<tbody>
@foreach($skills as $skill)
<tr>
<td>{{ $skill->name }}</td>
<td>{{ $skill->description }}</td>
<td>{{ $skill->domain }}</td>
<td>{{ $skill->expirience }}</td>
<td>
<form action="{{ route('skills.edit', $skill) }}" method="POST">
@csrf
@method('GET')
<input type="hidden" value="{{ $skill->id }}" name="id" id="id">
<input
type="submit"
value="Editar"
class="btn-sm btn-primary"
>
</form>
</td>
<td>
<form action="{{ route('skills.destroy', $skill) }}" method="POST">
@csrf
@method('DELETE')
<input
type="submit"
value="Eliminar"
class="btn-sm btn-danger"
onclick="return confirm('¿Desea eliminar?')">
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
|
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\GalleryImage;
use URL;
use Exception;
class GalleryImageController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index(){
$gallery_images = GalleryImage::orderBy('created_at', 'DESC')->get();
return view("admin.gallery")->with('gallery_images', $gallery_images);
}
public function imagepost(Request $request){
//validate
$request->validate([
'images' => 'required',
]);
$uploadPath = 'images/gallery';
foreach($request->images as $image){
$imagemodel = new GalleryImage();
// Handling uploaded image with previous image
$fileName = $imagemodel->image;
try{
$file = $image;
$fileName = md5($file->getClientOriginalName().time()).'.'.$file->getClientOriginalExtension();
$file->move($uploadPath,$fileName);
if($request->id != null){
if(file_exists($uploadPath.'/'.$imagemodel->image))
unlink($uploadPath.'/'.$imagemodel->image);
}
}catch(Exception $e){
session()->flash('message','Failed to upload image.');
}
// Saving data
try{
$imagemodel->image = $fileName;
$imagemodel->save();
if($imagemodel->id > 0)
session()->flash("message",'Image saved successfully.');
else
session()->flash("message",'Image saving failed.');
}catch(Exception $e){
session()->flash('message','Failed to save Image.');
}
}
return redirect(URL::to('/').'/admin/gallery');
}
public function delete($id){
$check = GalleryImage::find($id);
if(isset($check) == true ){
$gallery_image = GalleryImage::find($id);
if($gallery_image){
$gallery_image->delete();
session()->flash("message",'Image deleted successfully.');
}
else
session()->flash("message",'Image delete failed.');
return redirect(URL::to('/').'/admin/gallery');
}
else{
return 'Image Not Found';
}
}
}
|
<?php
return [
'@class' => 'Grav\\Common\\File\\CompiledYamlFile',
'filename' => '/var/www/html/grav/user/plugins/feed/feed.yaml',
'modified' => 1560742008,
'data' => [
'enabled' => true,
'limit' => 10,
'description' => 'My Feed Description',
'lang' => 'en-us',
'length' => 500,
'enable_json_feed' => false
]
];
|
<?php
/**
* @filesource modules/product/controllers/admin/write.php
*
* @copyright 2016 Goragod.com
* @license http://www.kotchasan.com/license/
*
* @see http://www.kotchasan.com/
*/
namespace Product\Admin\Write;
use Gcms\Gcms;
use Gcms\Login;
use Kotchasan\Html;
use Kotchasan\Http\Request;
use Kotchasan\Language;
/**
* module=product-write
*
* @author Goragod Wiriya <admin@goragod.com>
*
* @since 1.0
*/
class Controller extends \Gcms\Controller
{
/**
* ฟอร์มสร้าง/แก้ไข สินค้า
*
* @param Request $request
*
* @return string
*/
public function render(Request $request)
{
// ค่าที่ส่งมา
$id = $request->request('id')->toInt();
$module_id = $request->request('mid')->toInt();
$title = empty($id) ? '{LNG_Create}' : '{LNG_Edit}';
// ข้อความ title bar
$this->title = Language::trans($title.' {LNG_Product}');
// เลือกเมนู
$this->menu = 'modules';
// ตรวจสอบรายการที่เลือก
$index = \Product\Admin\Write\Model::get($module_id, $id, false);
// admin
$login = Login::adminAccess();
// can_write หรือ สมาชิกตัวอย่าง
if ($index && $login && (Gcms::canConfig($login, $index, 'can_write') || !Login::notDemoMode($login))) {
if (!empty($index->id)) {
$index->details = \Product\Admin\Write\Model::details((int) $index->module_id, (int) $index->id, reset(self::$cfg->languages));
}
// แสดงผล
$section = Html::create('section');
// breadcrumbs
$breadcrumbs = $section->add('div', array(
'class' => 'breadcrumbs',
));
$ul = $breadcrumbs->add('ul');
$ul->appendChild('<li><span class="icon-product">{LNG_Module}</span></li>');
$ul->appendChild('<li><a href="{BACKURL?module=product-settings&mid='.$index->module_id.'}">'.ucfirst($index->module).'</a></li>');
$ul->appendChild('<li><a href="{BACKURL?module=product-setup&mid='.$index->module_id.'}">{LNG_List of} {LNG_Product}</a></li>');
$ul->appendChild('<li><span>'.$title.'</span></li>');
$header = $section->add('header', array(
'innerHTML' => '<h2 class="icon-write">'.$this->title.'</h2>',
));
// ภาษาที่ติดตั้ง
$index->languages = Gcms::installedLanguage();
// เมนูแท็บ
$tab = new \Kotchasan\Tab('accordient_menu', 'index.php?module=product-write&id='.$index->id);
foreach ($index->languages as $item) {
$tab->add('detail_'.$item, '{LNG_Detail} <img src='.WEB_URL.'language/'.$item.'.gif alt='.$item.'>');
}
$tab->add('options', '{LNG_Other details}');
$header->appendChild($tab->render());
if (!$index) {
$section->appendChild('<aside class=error>{LNG_Can not be performed this request. Because they do not find the information you need or you are not allowed}</aside>');
} else {
$section->appendChild(\Product\Admin\Write\View::create()->render($request, $index));
}
return $section->render();
}
// 404.html
return \Index\Error\Controller::page404();
}
}
|
<nav class="topbar">
<div class="large-5 medium-5 columns">
<ul class="left-nav">
<li><a href="<?php echo esc_url(home_url('/kenal-zul')); ?>">Kenal Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/berita')); ?>">Berita Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/persatuan')); ?>">Perjuangan Zul</a></li>
</ul>
</div>
<div class="large-2 medium-2 columns">
<a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php echo get_template_directory_uri(); ?>/img/zul_logo.png" alt=""></a>
</div>
<div class="large-5 medium-5 columns">
<ul class="right-nav">
<li><a href="<?php echo esc_url(home_url('/media-zul')); ?>">Media Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/dukung')); ?>">Dukung Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/sapa-zul')); ?>">Sapa Zul</a></li>
</ul>
</div>
</nav>
<div class="topbar-mobile">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name"> </li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<ul class="dropdown">
<li><a href="<?php echo esc_url(home_url('/kenal-zul')); ?>">Kenal Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/berita')); ?>">Berita Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/persatuan')); ?>">Perjuangan Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/media-zul')); ?>">Media Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/dukung')); ?>">Dukung Zul</a></li>
<li><a href="<?php echo esc_url(home_url('/sapa-zul')); ?>">Sapa Zul</a></li>
</ul>
</nav>
</div>
|
@extends('admin.layout.master')
@section('css.section')
<style>
.li-city{
cursor:pointer;
font-size: 0.8em;
}
.li-district{
cursor:pointer;
font-size: 0.8em;
}
.li-town{
cursor:pointer;
font-size: 1em;
}
ul#list{
overflow: hidden;
}
ul#list li{
margin-bottom: 2%;
}
.li-none{
list-style-type:none;
}
.label-district{
background: #395771;
}
.label-town{
background: #a1a5a9;
}
#pn-info{
margin-bottom: 5%;
}
</style>
@stop
@section('body.content')
<section class="content" ng-app="regionApp" ng-controller="regionCtrl">
<input type="hidden" name="_token" value="{{csrf_token()}}">
<div class="container-fluid">
<div class="row">
<div class="col-sm-4">
<ul>
<li class="li-none"><button type="button" class="btn btn-success" ng-click="add()"><span class="glyphicon glyphicon-plus"></span> Thêm</button></li>
<li class="li-none"><loading></loading></li>
</ul>
<ul id="list" ng-repeat="city in cities" on-finish-render>
<li>
<span class="li-city label label-primary"> <% city.name %> </span>
<ul class="ul-district">
<li ng-repeat="district in city.districts">
<span class="li-district label label-district" data-district_id="<%district.id%>"> <% district.name %></span>
<ul class="ul-town">
<li ng-repeat="town in district.towns" class="li-town">
<span class="label label-town" ng-click="getTown(town.id)"><%town.name%></span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="col-sm-8">
<div class="row">
<div class="col-sm-12">
<div id="map" style="width:auto; height:400px"></div>
</div>
</div>
<br>
<div id="btn" class="row">
<button id="btn-update" type="button" class="btn btn-warning" ng-click="update()" ng-disabled="!myForm.town_name.$valid"><span class="glyphicon glyphicon-wrench"></span> Cập nhật</button>
<button id="btn-delete" type="button" class="btn btn-danger" ng-click="delete()"><span class="glyphicon glyphicon-trash"></span> Xóa</button>
</div>
<br>
<div id="pn-info" class="row">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Thông tin</h3>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div id="town-id" class="form-group">
<label class="col-sm-2 control-label">ID:</label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="selectedTown.id" ng-disabled="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Tên xã:</label>
<div class="col-sm-8">
<form name="myForm">
<input name="town_name" type="text" class="form-control" ng-model="selectedTown.name" required>
<span ng-show="!myForm.town_name.$valid && myForm.town_name.$dirty" style="color: red">Không được để trống tên</span>
</form>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<button id="btn-locat" type="button" class="btn btn-success pull-right" ng-click="editLngLat()">Đổi tọa độ</button>
<button id="btn-create" type="button" class="btn btn-success pull-right" ng-click="store()" ng-disabled="!myForm.town_name.$valid">Tạo</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
var mapMode;
function setMode(mode){
if(mode == null)
{
$('#btn-update').hide();
$('#btn-delete').hide();
$('#pn-info').hide()
}
else
if(mode == 'detail')
{
$('#btn-update').show();
$('#btn-delete').show();
$('#btn-locat').show();
$('#town-id').show()
$("#pn-info").slideDown("slow");
$("#btn-create").hide();
}
else
if(mode == 'create'){
$('#btn-update').hide();
$('#btn-delete').hide();
$('#btn-locat').hide();
$('#town-id').hide();
$("#pn-info").slideDown("slow");
$("#btn-create").show();
}
}
setMode(null);
/*
* Google Map
*/
var marker;
var map;
var newLocation;
var selectedDistrict ={}
var reloadRegion = false;
function placeNewMarker(map, location){
if(typeof marker !='undefined')
{
marker.setMap(null);
}
marker = new google.maps.Marker({
position: location,
map: map
});
//Set newLocation for add new
newLocation = location;
var infowindow = new google.maps.InfoWindow({
content: 'Đã chọn một địa điêm tại huyện <b>'+selectedDistrict.name+'</b>'
});
infowindow.open(map,marker);
}
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 21.03, lng: 105.84},
zoom: 7
});
if(mapMode == 'create')
google.maps.event.addListener(map, 'click', function(event) {
placeNewMarker(map, event.latLng);
});
}
function initTownMap(lat, lon) {
var myCenter = new google.maps.LatLng(lat,lon);
var mapCanvas = document.getElementById("map");
var mapOptions = {center: myCenter, zoom: 15};
map = new google.maps.Map(mapCanvas, mapOptions);
marker = new google.maps.Marker({
position:myCenter,
map: map,
draggable: true,
animation: google.maps.Animation.DROP
});
marker.addListener('click', toggleBounce);
//Event click to change LngLat
google.maps.event.addListener(map, 'click', function(event) {
if (mapMode == 'editLngLat'){
if(typeof marker != 'undefined')
marker.setMap(null);
marker = new google.maps.Marker({
position: event.latLng,
map: map,
draggable: true,
animation: google.maps.Animation.DROP
});
}
});
}
function toggleBounce() {
if (marker.getAnimation() !== null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
};
google.maps.event.addDomListener(window, 'load', initMap());
/*
* AngularJS
*/
var app = angular.module('regionApp', [], function($interpolateProvider){
$interpolateProvider.startSymbol('<%');
$interpolateProvider.endSymbol('%>');
});
//Wait Angular Render
app.directive('onFinishRender', function ($timeout) {
return {
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function () {
scope.$emit('ngRepeatFinished');
});
}
}
}
});
//Loading
app.directive('loading', function () {
return {
restrict: 'E',
replace:true,
template: '<div class="loading"><img src="/imgs/loading.gif" width="50" height="50" />Đang tải...</div>',
link: function (scope, element, attr) {
scope.$watch('loading', function (val) {
if (val)
$(element).show();
else
$(element).hide();
});
}
}
});
app.controller('regionCtrl',function($scope, $http){
$scope.loading = true;
$scope.getRegion = function(){
$http.get("/get-cities-districts")
.then(function(response) {
$scope.cities = response.data;
$scope.loading = false;
if(reloadRegion == false)
{
$scope.$on('ngRepeatFinished', function(ngRepeatFinishedEvent){
$('.ul-district').hide();
$('.ul-town').hide();
$('.li-city').click(function(){
$(this).next().toggle();
});
$('.li-district').click(function(){
$(this).next().toggle();
selectedDistrict.id = $(this).attr('data-district_id');
selectedDistrict.name = $(this).text();
});
});
}
});
}
//Fistly, get list region
$scope.getRegion();
$scope.getTown = function(town_id){
$http.get("/town/"+town_id)
.then(function(response) {
//console.log(response);
$scope.selectedTown = response.data;
google.maps.event.addDomListener(window, 'load', initTownMap($scope.selectedTown.lat, $scope.selectedTown.lon));
setMode('detail');
});
};
//Add new
$scope.add = function(){
if(typeof selectedDistrict.id == 'undefined')
{
alert('Xin chọn 1 thành phố và huyện trước khi thêm mới')
return;
}
$scope.selectedTown = {};
setMode('create');
mapMode = 'create';
google.maps.event.addDomListener(window, 'load', initMap());
};
$scope.store = function(){
//Set lat and lon for new Town
var newTown = {};
if(typeof newLocation == 'undefined' )
{
alert('Xin chọn một điểm trên bản đồ để thêm mới');
return;
}
newTown.lat = newLocation.lat;
newTown.lon = newLocation.lng;
newTown.name = $scope.selectedTown.name;
newTown.district_id = selectedDistrict.id;
//newTown._token = $("input[type='hidden']").val();
//console.log(newTown);
data=$.param(newTown);
$http({
method: 'POST',
url: '/admin/towns',
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
})
.success(function(response){
console.log(response);
newLocation = undefined;
alert('Đã thêm thành công');
//Reload
reloadRegion = true;
$scope.getRegion();
//Reset mode and map
setMode(null);
google.maps.event.addDomListener(window, 'load', initMap());
})
.error(function(response){
//console.log(response);
alert('Đã xảy ra lỗi, vui lòng thử lại');
});
};
//Change localtion
$scope.editLngLat = function(){
marker.setMap(null);
mapMode = 'editLngLat';
alert('Hãy chọn một tọa độ mới')
};
//Update
$scope.update = function(){
editedTown = {
name: $scope.selectedTown.name,
lat: marker.position.lat(),
lon: marker.position.lng()
};
data=$.param(editedTown);
$http({
method: 'POST',
url: '/admin/towns/'+$scope.selectedTown.id,
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
})
.success(function(response){
console.log(response);
newLocation = undefined;
alert('Cập nhật thành công');
//Reload
reloadRegion = true;
$scope.getRegion();
//Reset mode and map
setMode(null);
google.maps.event.addDomListener(window, 'load', initMap());
})
.error(function(response){
//console.log(response);
alert('Đã xảy ra lỗi, vui lòng thử lại');
});
}
//Delete
$scope.delete = function(){
if(confirm('Bạn có muốn xóa địa điểm này?'))
$http.delete('/admin/towns/'+$scope.selectedTown.id)
.then(function(response) {
console.log(response.data);
alert('Đã xóa thành công');
//Reload
reloadRegion = true;
$scope.getRegion();
//Reset mode and map
setMode(null);
google.maps.event.addDomListener(window, 'load', initMap());
}, function(rejection) {
console.log(rejection.data);
});
}
});
</script>
@stop
|
<?php
/**
* Plugin Name: PDP Integration
* Version: 0.1.0
* Description: Pulgin to connect with tool P+ design
* Author: PDP
* Text Domain: pdpinteg
*/
defined( 'ABSPATH' ) or exit;
if ( !class_exists( 'PDP_Integration' ) ) {
class PDP_Integration {
public static $plugin_slug;
public static $plugin_prefix;
public static $plugin_url;
public static $plugin_path;
public static $plugin_basename;
public static $version;
public $settings;
protected static $_instance = null;
/**
* Main Plugin Instance
*
* Ensures only one instance of plugin is loaded or can be loaded.
*/
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Construct.
*/
public function __construct() {
self::$plugin_slug = basename(dirname(__FILE__));
self::$plugin_prefix = 'pdpinteg_';
self::$plugin_basename = plugin_basename(__FILE__);
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
self::$plugin_path = trailingslashit(dirname(__FILE__));
self::$version = '0.1.0';
$this->define_constants();
$this->init_hooks();
}
/**
* Hook into actions and filters.
* @since 2.3
*/
private function init_hooks() {
add_action( 'wp_enqueue_scripts', array( $this, 'setup_styles' ) );
// load the localisation & classes
add_action( 'init', array( $this, 'load_classes' ) );
//add_action( 'plugins_loaded', array( $this, 'pdp_plugins_loaded' ) );
include_once( PDP_ABSPATH . 'includes/class-pdp-customer.php' );
include_once( PDP_ABSPATH . 'includes/pdp-template-functions.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-install.php' );
//add_action( 'plugins_loaded', array( 'PDP_Install', 'install' ) );
register_activation_hook( __FILE__, array( 'PDP_Install', 'install' ) );
//add_filter('woocommerce_add_cart_item_data',array($this, 'prepare_cart_item_data'),1,2);
}
public function pdp_plugins_loaded() {
add_filter('wc_get_template',array( $this, 'get_template_part'));
}
/**
* Define PDP Constants.
*/
private function define_constants() {
$this->define( 'PDP_ABSPATH', dirname( __FILE__ ) . '/' );
}
/**
* Define constant if not already set.
*
* @param string $name
* @param string|bool $value
*/
private function define( $name, $value ) {
if ( ! defined( $name ) ) {
define( $name, $value );
}
}
/**
* Load the main plugin classes and functions
*/
public function includes() {
/**
* Core classes.
*/
include_once( PDP_ABSPATH . 'includes/class-pdp-settings.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-design-json.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-helper.php' );
include_once( PDP_ABSPATH . 'includes/class-wc-product-pdpro.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-cart.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-ajax.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-order-item.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-product-type.php' );
include_once( PDP_ABSPATH . 'includes/class-pdp-guest-design.php' );
/**
* REST API.
*/
include_once( PDP_ABSPATH . 'includes/class-pdp-api.php' ); // API Class
}
/**
* Setup styles
*/
public function setup_styles() {
wp_enqueue_style( 'nb-styles', plugins_url( '/assets/frontend/css/style.css', __FILE__ ) );
}
/**
* Load lib js
*
* @return void
*/
public function load_scripts() {
wp_register_script( 'pdpinteg-pdp', plugins_url('/assets/frontend/js/pdp.js', __FILE__), array('jquery'), '0.1.0', true );
wp_enqueue_script( 'pdpinteg-pdp' );
}
/**
* Load classes
* @return void
*/
public function load_classes() {
if ( $this->is_woocommerce_activated() === false ) {
add_action( 'admin_notices', array ( $this, 'need_woocommerce' ) );
return;
}
// all systems ready - GO!
$this->includes();
add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) );
add_filter( 'product_type_selector', array( 'WC_Product_Pdpro', 'add_pdpro_product' ) );
add_action( 'product_type_options', array( 'WC_Product_Pdpro', 'custom_product_data_option' ) );
add_filter( 'woocommerce_product_data_tabs', array( 'WC_Product_Pdpro', 'add_option_product_data_tabs' ) );
add_action( 'admin_footer', array( 'WC_Product_Pdpro', 'pdpro_custom_js' ) );
add_filter( 'woocommerce_cart_item_name', array( 'PDP_Cart', 'add_custom_option_from_session_into_cart' ),1,3);
add_action( 'woocommerce_add_order_item_meta', array( 'PDP_Cart', 'pdp_add_values_to_order_item_meta' ),1,2);
add_action( 'woocommerce_before_calculate_totals', array( 'PDP_Cart', 'add_custom_price' ) );
add_action( 'woocommerce_display_item_meta', array( 'PDP_Order_Item', 'pdp_display_item_meta' ),1,2);
add_filter( 'woocommerce_before_order_itemmeta', array( 'PDP_Order_Item', 'pdp_before_add_order_itemmeta' ),1,3);
add_filter( 'woocommerce_after_order_itemmeta', array( 'PDP_Order_Item', 'pdp_after_add_order_itemmeta' ),1,3);
$this->settings = new PDP_Integration_Settings();
$this->pdp_api = new PDP_API();
}
/**
* Check if woocommerce is activated
*/
public function is_woocommerce_activated() {
$blog_plugins = get_option( 'active_plugins', array() );
$site_plugins = is_multisite() ? (array) maybe_unserialize( get_site_option('active_sitewide_plugins' ) ) : array();
if ( in_array( 'woocommerce/woocommerce.php', $blog_plugins ) || isset( $site_plugins['woocommerce/woocommerce.php'] ) ) {
return true;
} else {
return false;
}
}
/**
* WooCommerce not active notice.
*
* @return string Fallack notice.
*/
public function need_woocommerce() {
$error = sprintf( __( 'PDP Integration requires %sWooCommerce%s to be installed & activated!', 'pdpinteg' ), '<a href="http://wordpress.org/extend/plugins/woocommerce/">', '</a>' );
$message = '<div class="error"><p>' . $error . '</p></div>';
echo $message;
}
/**
* Get the plugin path.
* @return string
*/
public function plugin_path() {
return untrailingslashit( plugin_dir_path( __FILE__ ) );
}
}
}
/**
* Returns the main instance of PDP Integration to prevent the need to use globals.
*
* @return PDP_Integration
*/
function PDPINTEG() {
return PDP_Integration::instance();
}
// Global for backwards compatibility.
$GLOBALS['pdpinteg'] = PDPINTEG();
|
--TEST--
DBA magic_quotes_runtime Test
--SKIPIF--
<?php
die('skip, magic_quotes removed');
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
ini_set('magic_quotes_runtime', 0);
dba_insert("key1", '"', $db_file);
var_dump(dba_fetch("key1", $db_file));
ini_set('magic_quotes_runtime', 1);
var_dump(dba_fetch("key1", $db_file));
dba_replace("key1", '\"', $db_file);
var_dump(dba_fetch("key1", $db_file));
ini_set('magic_quotes_runtime', 0);
var_dump(dba_fetch("key1", $db_file));
dba_close($db_file);
} else {
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
string(1) """
string(2) "\""
string(2) "\""
string(1) """
|
<?php
namespace Sta\Cld2PhpLanguageDetection\Exception;
class ModuleCld2NotFound extends \RuntimeException
{
}
|
<?php
namespace App\Http\Controllers;
use App\Models\Cronjob;
use Illuminate\Http\Request;
class ApiController extends Controller
{
public function ping($uuid)
{
$job = Cronjob::findByUuid($uuid);
if (! $job) {
return response()->json(['errors' => 'Job not found', 'status' => 404], 404);
}
$job->ping(request('data', null));
}
}
|
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
protected $fillable = ['name', 'description', 'serial_number'];
}
|
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
if (!$this->__component->__parent || mb_strpos($this->__component->__parent->__name, "photogallery") === false)
{
$GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/photogallery/templates/.default/style.css');
$GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/photogallery/templates/.default/themes/gray/style.css');
}
$GLOBALS['APPLICATION']->AddHeadScript("/bitrix/components/bitrix/photogallery.section.list/templates/.default/script.js");
$res = $arResult["SECTION"];
?>
<div class="photo-album-item photo-album-<?=($res["ACTIVE"] != "Y" ? "nonactive" : "active")?> <?=(
!empty($res["PASSWORD"]) ? "photo-album-password" : "")?>" id="photo_album_info_<?=$res["ID"]?>" <?
if ($res["ACTIVE"] != "Y" || !empty($res["PASSWORD"]))
{
$sTitle = GetMessage("P_ALBUM_IS_NOT_ACTIVE");
if ($res["ACTIVE"] != "Y" && !empty($res["PASSWORD"]))
$sTitle = GetMessage("P_ALBUM_IS_NOT_ACTIVE_AND_PASSWORDED");
elseif (!empty($res["PASSWORD"]))
$sTitle = GetMessage("P_ALBUM_IS_PASSWORDED");
?> title="<?=$sTitle?>" <?
}
?>>
<div class="photo-album-info">
<?if ($arParams["DISPLAY_ALBUM_NAME"] != "N"):?>
<div class="photo-album-name" id="photo_album_name_<?=$arResult["SECTION"]["ID"]?>"><?=$arResult["SECTION"]["NAME"]?></div>
<?endif;?>
<?if ($arResult["SECTION"]["DATE"]["VALUE"] != ""):?>
<div class="photo-album-date"><span id="photo_album_date_<?=$arResult["SECTION"]["ID"]?>"><?= $arResult["SECTION"]["DATE"]["VALUE"]?></span></div>
<?endif;?>
<?if ($arResult["SECTION"]["DESCRIPTION"] != ""):?>
<div class="photo-album-description" id="photo_album_description_<?=$arResult["SECTION"]["ID"]?>"><?=$arResult["SECTION"]["DESCRIPTION"]?></div>
<?endif;?>
</div>
</div>
<?if ($arParams["PERMISSION"] >= "U"):?>
<noindex>
<div class="photo-top-controls">
<a rel="nofollow" class="photo-control-album-edit" href="<?=$arResult["SECTION"]["EDIT_LINK"]?>"><?=GetMessage("P_SECTION_EDIT")?></a>
<a rel="nofollow" href="<?=$arResult["SECTION"]["NEW_LINK"]?>" onclick="EditAlbum('<?=htmlspecialcharsbx
(CUtil::JSEscape($arResult["SECTION"]["~NEW_LINK"]))?>'); return false;"><?=GetMessage("P_ADD_ALBUM")?></a>
<a rel="nofollow" href="<?=$arResult["SECTION"]["UPLOAD_LINK"]?>" target="_self"><?=GetMessage("P_UPLOAD")?></a>
</div>
</noindex>
<?endif;?>
<div class="empty-clear"></div>
|
<?php declare(strict_types=1);
namespace XBase\Column;
use XBase\Stream\Stream;
use XBase\Stream\StreamWrapper;
class DBase7Column extends AbstractColumn
{
public static function getHeaderLength(): int
{
return 48;
}
public static function create(string $memoryChunk, int $colIndex, ?int $bytePos = null)
{
if (strlen($memoryChunk) !== self::getHeaderLength()) {
throw new \LogicException('Column data expected length: '.self::getHeaderLength());
}
$s = Stream::createFromString($memoryChunk);
return new self(
$s->read(32),
$s->read(1),//type
$s->readUChar(),//length
$s->readUChar(),//decimalCount
$s->readUShort(),//reserved1
$s->readUChar(),//mdxFlag
$s->readUShort(),//reserved2
$s->readUInt(),//nextAI
$s->read(4),//reserved3
$colIndex,
$bytePos
);
}
/** @var int */
protected $mdxFlag;
/** @var int */
protected $nextAI;
/**
* @var string field name in ASCII (zero-filled)
* @var string field type in ASCII (B, C, D, N, L, M, @, I, +, F, 0 or G)
* @var int field length in binary
* @var int field decimal count in binary
* @var mixed reserved
* @var int Production .MDX field flag; 0x01 if field has an index tag in the production .MDX file; 0x00 if the field is not indexed.
* @var mixed reserved
* @var int next Autoincrement value, if the Field type is Autoincrement, 0x00 otherwise
* @var mixed reserved
*/
public function __construct(string $name, string $type, int $length, int $decimalCount, $reserved1, int $mdxFlag, $reserved2, int $nextAI, $reserved3, int $colIndex, ?int $bytePos = null)
{
$this->rawName = $name;
$this->name = strtolower(rtrim($name, chr(0x00)));
$this->type = $type;
$this->length = $length;
$this->decimalCount = $decimalCount;
$this->mdxFlag = $mdxFlag;
$this->nextAI = $nextAI;
// not protocol
$this->colIndex = $colIndex;
$this->bytePos = $bytePos;
}
public function toBinaryString(StreamWrapper $fp): void
{
$fp->write($this->rawName);
$fp->write($this->type);
$fp->writeUChar($this->length);
$fp->writeUChar($this->decimalCount);
$fp->write(str_pad('', 2, chr(0)));
$fp->writeUChar($this->mdxFlag);
$fp->write(str_pad('', 2, chr(0)));
$fp->writeInt($this->nextAI);
$fp->write(str_pad('', 4, chr(0)));
}
}
|
<?php
class ControllerExtensionDVisualDesignerDesigner extends Controller
{
public $codename = 'd_visual_designer';
public $route = 'extension/d_visual_designer/designer';
public $extension = '';
private $d_shopunity = '';
private $scripts = array();
private $styles = array();
private $error = array();
private $store_url = '';
private $catalog_url = '';
private $store_id = '';
public function __construct($registry)
{
parent::__construct($registry);
$this->load->language($this->route);
$this->load->language('extension/module/d_visual_designer');
$this->load->model($this->route);
$this->load->model('extension/module/d_visual_designer');
$this->load->model('extension/d_opencart_patch/url');
$this->load->model('extension/d_opencart_patch/user');
$this->load->model('extension/d_opencart_patch/load');
$this->d_shopunity = (file_exists(DIR_SYSTEM.'library/d_shopunity/extension/d_shopunity.json'));
$this->extension = json_decode(file_get_contents(DIR_SYSTEM.'library/d_shopunity/extension/d_visual_designer.json'), true);
$this->store_id = (isset($this->request->get['store_id'])) ? $this->request->get['store_id'] : 0;
if ($this->request->server['HTTPS']) {
$this->store_url = HTTPS_SERVER;
$this->catalog_url = HTTPS_CATALOG;
} else {
$this->store_url = HTTP_SERVER;
$this->catalog_url = HTTP_CATALOG;
}
}
public function index($setting)
{
if ($this->{'model_extension_'.$this->codename.'_designer'}->validateEdit($setting['config'])) {
$this->styles[] = 'view/stylesheet/d_visual_designer/d_visual_designer.css?'.rand();
$this->styles[] = 'view/javascript/d_visual_designer/dist/vd-libraries.min.css';
$this->scripts[] = 'view/javascript/d_riot/riotcompiler.min.js';
$this->scripts[] = 'view/javascript/d_visual_designer/main.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/designer.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/content.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/block.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/history.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/template.js';
$this->scripts[] = 'view/javascript/d_visual_designer/model/sortable.js';
$this->scripts[] = 'view/javascript/summernote/summernote.js';
$this->styles[] = 'view/javascript/summernote/summernote.css';
if (VERSION>='2.3.0.0') {
$this->scripts[] = 'view/javascript/summernote/opencart.js';
}
$this->scripts[] = 'view/javascript/d_visual_designer/dist/vd-libraries.min.js';
$this->load->model('setting/setting');
$setting_module = $this->model_setting_setting->getSetting($this->codename);
if (!empty($setting_module[$this->codename.'_setting'])) {
$setting_module = $setting_module[$this->codename.'_setting'];
} else {
$this->load->config($this->codename);
$setting_module = $this->config->get($this->codename.'_setting');
}
$data['riot_tags'] = $this->{'model_extension_'.$this->codename.'_designer'}->getRiotTags($setting_module['compress_files']);
$data['state']['config'] = array();
$data['state']['blocks'] = array();
$data['state']['drag'] = array();
$data['state']['content'] = array();
$data['state']['history'] = array();
$data['state']['config']['notify'] = $this->{'model_extension_'.$this->codename.'_designer'}->checkCompleteVersion();
$route_info = $this->{'model_extension_'.$this->codename.'_designer'}->getRoute($setting['config']);
$data['state']['config']['independent'] = array();
$data['state']['config']['mode'] = array();
$data['state']['config']['filemanager_url'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/getFileManager');
$data['state']['config']['new_image_url'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/getImage');
$data['state']['config']['mode'] = array();
$data['state']['config']['route'] = $setting['config'];
$data['state']['config']['route_info'] = $route_info;
$data['state']['config']['id'] = $setting['id'];
$data['state']['config']['blocks'] = $this->prepareBlocksConfig();
$data['state']['config']['frontend'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/frontend', 'config='.$setting['config'].'&id='.$setting['id']);
$data['state']['config']['url_token'] = $this->model_extension_d_opencart_patch_user->getUrlToken();
$data['state']['templates'] = $this->prepareTemplate();
$data['local'] = $this->prepareLocal();
$data['options'] = $this->prepareOptions();
$this->prepareScripts();
$this->prepareStyles();
$data['base'] = $this->store_url;
if ($setting['output']) {
$output = $this->parseHeader($setting['output']);
if($output) {
$setting['output'] = $output;
}
} else {
$this->parseHeader();
}
return $this->model_extension_d_opencart_patch_load->view($this->route, $data);
} else {
return '';
}
}
public function field($field_data) {
$this->load->model('extension/d_opencart_patch/load');
$data['text_label'] = $this->language->get('text_field_label');
$data['name'] = $field_data['field'];
$data['content'] = $field_data['content'];
return $this->model_extension_d_opencart_patch_load->view('extension/'.$this->codename.'/field', $data);
}
protected function parseHeader($header = false)
{
if ($header) {
$html_dom = new d_simple_html_dom();
$html_dom->load($header, $lowercase = true, $stripRN = false, $defaultBRText = DEFAULT_BR_TEXT);
foreach ($this->scripts as $script) {
if (!$html_dom->find('head', 0)->find('script[src="' . $script . '"]')) {
$html_dom->find('head > script', -1)->outertext .= '<script src="' . $script . '" type="text/javascript"></script>';
}
}
foreach ($this->styles as $style) {
if (!$html_dom->find('head', 0)->find('link[href="' . $style . '"]')) {
$html_dom->find('head > link', -1)->outertext .= '<link href="' . $style . '" rel="stylesheet" type="text/css"></script>';
}
}
return (string)$html_dom;
} else {
foreach ($this->scripts as $script) {
$this->document->addScript($script);
}
foreach ($this->styles as $style) {
$this->document->addStyle($style);
}
}
return false;
}
public function loadSetting()
{
$json = array();
if (!empty($this->request->post['setting'])) {
$setting = json_decode(html_entity_decode($this->request->post['setting'], ENT_QUOTES, 'UTF-8'), true);
}
if (isset($setting['route'])) {
$route = $setting['route'];
}
if (isset($setting['field_name'])) {
$field_name = $setting['field_name'];
}
if (isset($setting['content'])) {
$content = $setting['content'];
}
if (isset($setting['id'])) {
$id = $setting['id'];
}
if (isset($route) && isset($field_name) && isset($content) && isset($id)) {
if ($id != '') {
$result = $this->{'model_extension_'.$this->codename.'_designer'}->getContent($route, $id, $field_name);
if (!empty($result) && !empty($result['content'])) {
$content = $result['content'];
}
}
$shortcode = false;
$block_setting = $this->{'model_extension_'.$this->codename.'_designer'}->parseContent($content, array(&$shortcode));
$json['designer_id'] = substr(md5(rand()), 0, 7);
$json['content'] = $this->{'model_extension_'.$this->codename.'_designer'}->parseSetting($block_setting);
if ($shortcode) {
$json['text'] = $this->{'model_extension_'.$this->codename.'_designer'}->getText($block_setting);
}
$json['blocks'] = $block_setting;
$json['success'] = 'success';
} else {
$json['error'] = 'error';
}
$this->response->addHeader("Content-Type: application/json");
$this->response->setOutput(json_encode($json, JSON_FORCE_OBJECT));
}
protected function prepareScripts()
{
$blocks = $this->{'model_extension_'.$this->codename.'_designer'}->getBlocks();
foreach ($blocks as $block) {
$output = $this->load->controller('extension/d_visual_designer_module/'.$block.'/scripts');
if ($output) {
$this->scripts = array_merge($this->scripts, $output);
}
}
}
protected function prepareStyles()
{
$blocks = $this->{'model_extension_'.$this->codename.'_designer'}->getBlocks();
foreach ($blocks as $block) {
$output = $this->load->controller('extension/d_visual_designer_module/'.$block.'/styles');
if ($output) {
$this->styles = array_merge($this->styles, $output);
}
}
}
public function prepareBlocksConfig()
{
$blocks = array();
$this->load->model('tool/image');
$results = $this->{'model_extension_'.$this->codename.'_designer'}->getBlocks();
foreach ($results as $block) {
$this->load->language('extension/'.$this->codename.'_module/'.$block);
$setting = $this->{'model_extension_'.$this->codename.'_designer'}->getSettingBlock($block);
$setting_default = $this->{'model_extension_'.$this->codename.'_designer'}->getSetting($setting['setting'], $block);
if (is_file(DIR_IMAGE .'catalog/d_visual_designer/'.$block.'.svg')) {
$image = '../image/catalog/d_visual_designer/'.$block.'.svg';
} else {
$image = $this->model_tool_image->resize('no_image.png', 32, 32);
}
if ($setting['display']) {
$blocks[$block] = array(
'title' => $this->language->get('text_title'),
'description' => $this->language->get('text_description'),
'image' => $image,
'type' => $block,
'setting_default' => $setting_default,
'category' => ucfirst($setting['category']),
'sort_order' => isset($setting['sort_order'])? $setting['sort_order'] : 0,
'setting' => $setting
);
}
}
usort($blocks, 'ControllerExtensionDVisualDesignerDesigner::sort_block');
return $blocks;
}
public function prepareTemplate()
{
$templates = array();
$this->load->model('tool/image');
$this->load->model('extension/'.$this->codename.'/template');
$results = $this->{'model_extension_'.$this->codename.'_template'}->getTemplates();
foreach ($results as $template) {
if ($template['image'] && file_exists(DIR_IMAGE.$template['image'])) {
$image = $this->model_tool_image->resize($template['image'], 160, 205);
} else {
$image = $this->model_tool_image->resize('no_image.png', 160, 205);
}
$templates[] = array(
'template_id' => $template['template_id'],
'config' => $template['config'],
'image' => $image,
'category' => ucfirst($template['category']),
'name' => html_entity_decode($template['name'], ENT_QUOTES, "UTF-8")
);
}
return $templates;
}
protected function prepareLocal($front = false)
{
$local = array();
if($front) {
$local['designer']['button_add_block'] = $this->language->get('button_add_block');
$local['designer']['button_add_template'] = $this->language->get('button_add_template');
$local['designer']['button_save_template'] = $this->language->get('button_save_template');
$local['designer']['button_mobile'] = $this->language->get('button_mobile');
$local['designer']['button_tablet'] = $this->language->get('button_tablet');
$local['designer']['button_desktop'] = $this->language->get('button_desktop');
$local['designer']['button_reload'] = $this->language->get('button_reload');
$local['designer']['button_backend_editor'] = $this->language->get('button_backend_editor');
$local['designer']['button_publish'] = $this->language->get('button_publish');
$local['designer']['button_cancel'] = $this->language->get('button_cancel');
$local['designer']['text_save_template'] = $this->language->get('text_save_template');
$local['designer']['text_success_update'] = $this->language->get('text_success_update');
$local['designer']['error_permission'] = $this->language->get('error_permission');
$local['designer']['text_success_template_save'] = $this->language->get('text_success_template_save');
$local['designer']['text_success_clone_block'] = $this->language->get('text_success_clone_block');
$local['designer']['text_success_remove_block'] = $this->language->get('text_success_remove_block');
}
$local['designer']['button_add'] = $this->language->get('button_add');
$local['designer']['button_close'] = $this->language->get('button_close');
$local['designer']['button_save'] = $this->language->get('button_save');
$local['designer']['button_saved'] = $this->language->get('button_saved');
//text
$local['designer']['text_add_block'] = $this->language->get('text_add_block');
$local['designer']['text_edit_block'] = $this->language->get('text_edit_block');
$local['designer']['text_add_template'] = $this->language->get('text_add_template');
$local['designer']['text_codeview'] = $this->language->get('text_codeview');
$local['designer']['text_classic_mode'] = $this->language->get('text_classic_mode');
$local['designer']['text_backend_editor'] = $this->language->get('text_backend_editor');
$local['designer']['text_frontend_editor'] = $this->language->get('text_frontend_editor');
$local['designer']['text_designer'] = $this->language->get('text_designer');
$local['designer']['text_welcome_header'] = $this->language->get('text_welcome_header');
$local['designer']['text_add_block'] = $this->language->get('text_add_block');
$local['designer']['text_add_text_block'] = $this->language->get('text_add_text_block');
$local['designer']['text_add_template'] = $this->language->get('text_add_template');
$local['designer']['text_save_template'] = $this->language->get('text_save_template');
$local['designer']['text_search'] = $this->language->get('text_search');
$local['designer']['text_layout'] = $this->language->get('text_layout');
$local['designer']['text_set_custom'] = $this->language->get('text_set_custom');
$local['designer']['text_add_child_block'] = $this->language->get('text_add_child_block');
$local['designer']['text_add'] = $this->language->get('text_add');
$local['designer']['text_file_manager'] = $this->language->get('text_file_manager');
$local['designer']['entry_border_color'] = $this->language->get('entry_border_color');
$local['designer']['entry_border_style'] = $this->language->get('entry_border_style');
$local['designer']['entry_border_radius'] = $this->language->get('entry_border_radius');
$local['designer']['entry_animate'] = $this->language->get('entry_animate');
$local['designer']['entry_show_on'] = $this->language->get('entry_show_on');
$local['designer']['entry_background'] = $this->language->get('entry_background');
$local['designer']['entry_id'] = $this->language->get('entry_id');
$local['designer']['entry_additional_css_class'] = $this->language->get('entry_additional_css_class');
$local['designer']['entry_additional_css_before'] = $this->language->get('entry_additional_css_before');
$local['designer']['entry_additional_css_content'] = $this->language->get('entry_additional_css_content');
$local['designer']['entry_additional_css_after'] = $this->language->get('entry_additional_css_after');
$local['designer']['entry_margin'] = $this->language->get('entry_margin');
$local['designer']['entry_padding'] = $this->language->get('entry_padding');
$local['designer']['entry_border'] = $this->language->get('entry_border');
$local['designer']['entry_name'] = $this->language->get('entry_name');
$local['designer']['entry_category'] = $this->language->get('entry_category');
$local['designer']['entry_image'] = $this->language->get('entry_image');
$local['designer']['entry_image_style'] = $this->language->get('entry_image_style');
$local['designer']['entry_image_position'] = $this->language->get('entry_image_position');
$local['designer']['entry_size'] = $this->language->get('entry_size');
$local['designer']['entry_image_template'] = $this->language->get('entry_image_template');
$local['designer']['entry_sort_order'] = $this->language->get('entry_sort_order');
$local['designer']['tab_general'] = $this->language->get('tab_general');
$local['designer']['tab_design'] = $this->language->get('tab_design');
$local['designer']['tab_css'] = $this->language->get('tab_css');
$local['designer']['tab_save_block'] = $this->language->get('tab_save_block');
$local['designer']['tab_templates'] = $this->language->get('tab_templates');
$local['designer']['tab_all_blocks'] = $this->language->get('tab_all_blocks');
$local['designer']['tab_content_blocks'] = $this->language->get('tab_content_blocks');
$local['designer']['tab_social_blocks'] = $this->language->get('tab_social_blocks');
$local['designer']['tab_structure_blocks'] = $this->language->get('tab_structure_blocks');
$local['designer']['text_top'] = $this->language->get('text_top');
$local['designer']['text_right'] = $this->language->get('text_right');
$local['designer']['text_bottom'] = $this->language->get('text_bottom');
$local['designer']['text_left'] = $this->language->get('text_left');
$local['designer']['text_yes'] = $this->language->get('text_yes');
$local['designer']['text_no'] = $this->language->get('text_no');
$local['designer']['text_enabled'] = $this->language->get('text_enabled');
$local['designer']['text_phone'] = $this->language->get('text_phone');
$local['designer']['text_tablet'] = $this->language->get('text_tablet');
$local['designer']['text_desktop'] = $this->language->get('text_desktop');
$local['designer']['text_horizontal'] = $this->language->get('text_horizontal');
$local['designer']['text_vertical'] = $this->language->get('text_vertical');
$local['designer']['text_complete_version'] = $this->language->get('text_complete_version');
$local['designer']['text_complete_version_template'] = $this->language->get('text_complete_version_template');
$local['designer']['error_name'] = $this->language->get('error_name');
//error
$local['designer']['error_size'] = $this->language->get('error_size');
$blocks = $this->{'model_extension_'.$this->codename.'_designer'}->getBlocks();
$local['blocks'] = array();
foreach ($blocks as $block) {
$local['blocks'][$block] = $this->load->controller('extension/d_visual_designer_module/'.$block.'/local');
}
return $local;
}
protected function prepareOptions()
{
$options = array();
$this->load->model('tool/image');
$options['designer']['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);
$options['designer']['border_styles'] = array(
'' => $this->language->get('text_default'),
'dotted' => $this->language->get('text_dotted'),
'dashed' => $this->language->get('text_dashed'),
'solid' => $this->language->get('text_solid'),
'double' => $this->language->get('text_double'),
'groove' => $this->language->get('text_groove'),
'ridge' => $this->language->get('text_ridge'),
'inset' => $this->language->get('text_inset'),
'outset' => $this->language->get('text_outset')
);
$options['designer']['image_styles'] = array(
'cover' => $this->language->get('text_cover'),
'contain' => $this->language->get('text_contain'),
'no-repeat' => $this->language->get('text_no_repeat'),
'repeat' => $this->language->get('text_repeat'),
'parallax' => $this->language->get('text_parallax')
);
$options['designer']['image_horizontal_positions'] = array(
'left' => $this->language->get('text_position_left'),
'center' => $this->language->get('text_position_center'),
'right' => $this->language->get('text_position_right')
);
$options['designer']['image_vertical_positions'] = array(
'top' => $this->language->get('text_position_top'),
'center' => $this->language->get('text_position_center'),
'bottom' => $this->language->get('text_position_bottom')
);
$options['designer']['animates'] = array(
'' => $this->language->get('text_none'),
'fadeInDown' => $this->language->get('text_fade_in_down'),
'fadeInUp' => $this->language->get('text_fade_in_up'),
'fadeInLeft' => $this->language->get('text_fade_in_left'),
'fadeInRight' => $this->language->get('text_fade_in_right'),
'fadeIn' => $this->language->get('text_fade_in'),
'bounceIn' => $this->language->get('text_bounce_in'),
'rubberBand' => $this->language->get('text_rubber_band'),
'rollIn' => $this->language->get('text_roll_in'),
'lightSpeedIn' => $this->language->get('text_light_speed_in'),
'flipInX' => $this->language->get('text_flip_in_x'),
'flipInY' => $this->language->get('text_flip_in_y'),
'jello' => $this->language->get('text_jello'),
'mk-floating-tossing' => $this->language->get('text_mk_floating_tossing'),
'mk-floating-pulse' => $this->language->get('text_mk_floating_pulse'),
'mk-floating-vertical' => $this->language->get('text_mk_floating_vertical'),
'mk-floating-horizontal' => $this->language->get('text_mk_floating_horizontal'),
'bounce_jump' => $this->language->get('text_bounce_jump')
);
$options['designer']['libraries'] = array(
'fontawesome' => 'Font Awesome',
'glyphicon' => 'Glyphicons',
'ionicons' => 'Open Ionic',
'mapicons' => 'Map Icons',
'material' => 'Material Design Iconic Font',
'typeicon' => 'Typeicons',
'elusive' => 'Elusive Icons',
'octicon' => 'Octicons',
'weather' => 'Weather Icons'
);
$iconSets = $this->{'model_extension_'.$this->codename.'_designer'}->getIconSets();
foreach ($iconSets as $value) {
$options['designer']['libraries'][$value] = $value;
$this->scripts[] = 'view/javascript/'.$this->codename."/iconset/".$value.'.js';
}
$blocks = $this->{'model_extension_'.$this->codename.'_designer'}->getBlocks();
$options['blocks'] = array();
foreach ($blocks as $block) {
$options['blocks'][$block] = $this->load->controller('extension/d_visual_designer_module/'.$block.'/options');
}
return $options;
}
public function updateContent()
{
$json = array();
if (isset($this->request->post['content'])) {
$content = $this->request->post['content'];
}
if (isset($content)) {
$json['setting'] = $content = $this->{'model_extension_'.$this->codename.'_designer'}->parseContent($content);
$json['success'] = 'success';
} else {
$json['errorr'] = 'error';
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json, JSON_FORCE_OBJECT));
}
public function updateSetting()
{
$json = array();
if (isset($this->request->post['setting'])) {
$setting = json_decode(html_entity_decode($this->request->post['setting'], ENT_QUOTES, 'UTF-8'), true);
}
if (isset($this->request->post['type'])) {
$type = $this->request->post['type'];
}
if (isset($setting) && isset($type)) {
$json['setting'] = $this->{'model_extension_'.$this->codename.'_designer'}->getSetting($setting['global'], $type);
$json['success'] = 'success';
} else {
$json['error'] = 'error';
}
$this->response->addHeader("Content-Type: application/json");
$this->response->setOutput(json_encode($json, JSON_FORCE_OBJECT));
}
public function frontend()
{
if (!empty($this->request->get['config'])) {
$config = html_entity_decode($this->request->get['config']);
}
if (!empty($this->request->get['field_name'])) {
$field_name = html_entity_decode($this->request->get['field_name']);
} else {
$field_name = false;
}
if (isset($this->request->get['id'])) {
$id = html_entity_decode($this->request->get['id']);
}
if (isset($id)&& !empty($config)) {
$data['button_add_block'] = $this->language->get('button_add_block');
$data['button_add_template'] = $this->language->get('button_add_template');
$data['button_save_template'] = $this->language->get('button_save_template');
$data['button_mobile'] = $this->language->get('button_mobile');
$data['button_tablet'] = $this->language->get('button_tablet');
$data['button_desktop'] = $this->language->get('button_desktop');
$data['button_reload'] = $this->language->get('button_reload');
$data['button_backend_editor'] = $this->language->get('button_backend_editor');
$data['button_publish'] = $this->language->get('button_publish');
$data['button_cancel'] = $this->language->get('button_cancel');
$data['text_save_template'] = $this->language->get('text_save_template');
$data['text_success_update'] = $this->language->get('text_success_update');
$data['error_permission'] = $this->language->get('error_permission');
$data['text_success_template_save'] = $this->language->get('text_success_template_save');
$data['text_success_clone_block'] = $this->language->get('text_success_clone_block');
$data['text_success_remove_block'] = $this->language->get('text_success_remove_block');
$route_info = $this->{'model_extension_'.$this->codename.'_designer'}->getRoute($config);
$data['state']['config'] = array();
$data['state']['blocks'] = array();
$param = array();
if (!empty($route_info['frontend_param'])&!empty($id)) {
$param[] = $route_info['frontend_param'].'='.$id;
}
if (!empty($route_info['frontend_full_param']) && $field_name) {
$param[] = 'field_name=' . $field_name;
}
if (!empty($route_info['frontend_full_param']) && $config) {
$param[] = 'config=' . $config;
}
$data['state']['config']['frontend_url'] = $this->catalog_url.'index.php?route='.$route_info['frontend_route'].'&'.implode('&', $param);
if (!empty($route_info['backend_param'])&!empty($id)) {
$param = $route_info['backend_param'].'='.$id;
} else {
$param = '';
}
$data['state']['config']['backend_url'] = $this->model_extension_d_opencart_patch_url->ajax($route_info['backend_route'], $param);
$this->load->model('setting/setting');
$setting_module = $this->model_setting_setting->getSetting($this->codename);
if (!empty($setting_module[$this->codename.'_setting'])) {
$setting_module = $setting_module[$this->codename.'_setting'];
} else {
$this->load->config($this->codename);
$setting_module = $this->config->get($this->codename.'_setting');
}
$data['riot_tags'] = $this->{'model_extension_'.$this->codename.'_designer'}->getRiotTags($setting_module['compress_files']);
$data['state']['config']['notify'] = $this->{'model_extension_'.$this->codename.'_designer'}->checkCompleteVersion();
$data['state']['config']['update_settings_url'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/updateBlocks');
$data['state']['config']['filemanager_url'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/getFileManager');
$data['state']['config']['new_image_url'] = $this->model_extension_d_opencart_patch_url->ajax($this->route.'/getImage');
$data['state']['config']['blocks'] = $this->prepareBlocksConfig();
$data['state']['history'] = array();
$data['state']['config']['url_token'] = $this->model_extension_d_opencart_patch_user->getUrlToken();
$data['state']['templates'] = $this->prepareTemplate();
$this->styles[] = 'view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css';
if(VERSION >= '3.0.0.0') {
$this->scripts[] = 'view/javascript/jquery/datetimepicker/moment/moment-with-locales.min.js';
} else {
$this->scripts[] = 'view/javascript/jquery/datetimepicker/moment.js';
}
$this->scripts[] = 'view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js';
$data['local'] = $this->prepareLocal(true);
$data['options'] = $this->prepareOptions();
$data['direction'] = $this->language->get('direction');
$data['lang'] = $this->language->get('code');
$data['base'] = $this->store_url;
$data['text_file_manager'] = $this->language->get('text_file_manager');
$data['text_frontend_title'] = $this->language->get('text_frontend_title');
$this->parseHeader();
$data['scripts'] = $this->document->getScripts();
$data['styles'] = $this->document->getStyles();
$this->response->setOutput($this->model_extension_d_opencart_patch_load->view('extension/'.$this->codename.'/frontend_editor', $data));
}
}
public function updateBlocks(){
$json = array();
if (!empty($this->request->post['blocks'])) {
$blocks = json_decode(html_entity_decode($this->request->post['blocks'], ENT_QUOTES, 'UTF-8'), true);
}
if (isset($blocks)) {
foreach ($blocks as $block_id => $block) {
$setting = $this->{'model_extension_'.$this->codename.'_designer'}->getSetting($block['setting']['global'], $block['type'], true);
$blocks[$block_id]['setting']['edit'] = $setting['edit'];
}
$json['blocks'] = $blocks;
$json['success'] = 'success';
} else {
$json['error'] = 'error';
}
$this->response->addHeader("Content-Type: application/json");
$this->response->setOutput(json_encode($json, JSON_FORCE_OBJECT));
}
public function sort_block($a, $b)
{
if ($a['sort_order'] == $b['sort_order']) {
return 0;
}
return ($a['sort_order'] < $b['sort_order']) ? -1 : 1;
}
public function getContent()
{
$json = array();
if (isset($this->request->post['setting'])) {
$setting = json_decode(html_entity_decode($this->request->post['setting'], ENT_QUOTES, 'UTF-8'), true);
}
if (isset($setting)) {
$json['content'] = str_replace('"', '"', $this->{'model_extension_'.$this->codename.'_designer'}->parseSetting($setting));
$json['success'] = 'success';
} else {
$json['error'] = 'error';
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function getFileManager()
{
$this->load->model('extension/d_opencart_patch/user');
$this->load->model('extension/d_opencart_patch/load');
$this->load->model('user/user_group');
$this->model_user_user_group->addPermission($this->model_extension_d_opencart_patch_user->getGroupId(), 'access', 'extension/d_elfinder');
$this->model_user_user_group->addPermission($this->model_extension_d_opencart_patch_user->getGroupId(), 'modify', 'extension/d_elfinder');
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
$data['base'] = HTTPS_CATALOG;
} else {
$data['base'] = HTTP_CATALOG;
}
$data['token'] = $this->model_extension_d_opencart_patch_user->getUrlToken();
$data['route'] = 'extension/d_elfinder/d_elfinder';
$this->response->setOutput($this->model_extension_d_opencart_patch_load->view('extension/d_elfinder/d_elfinder', $data));
}
public function getImage()
{
$this->load->model('tool/image');
if (isset($this->request->get['image'])) {
$this->response->setOutput($this->model_tool_image->resize(html_entity_decode($this->request->get['image'], ENT_QUOTES, 'UTF-8'), 100, 100));
}
}
public function validate()
{
$this->error = array();
$status = $this->config->get($this->codename . '_status');
if (!$status) {
$this->error['status'] = $this->language->get('error_status');
}
if (!isset($this->request->post['description'])) {
$this->error['description'] = $this->language->get('error_description');
}
if (empty($this->request->post['url'])) {
$this->error['url'] = $this->language->get('error_url');
}
if (!empty($setting['d_visual_designer_setting']['limit_access_user'])) {
if (!empty($setting['d_visual_designer_setting']['access_user']) && !in_array($this->user->getId(), $setting['d_visual_designer_setting']['access_user'])) {
$this->error['warning'] = $this->language->get('error_permission');
} elseif ($setting['d_visual_designer_setting']['access_user']) {
$this->error['warning'] = $this->language->get('error_permission');
}
}
if (!empty($setting['d_visual_designer_setting']['limit_access_user_group'])) {
if (!empty($setting['d_visual_designer_setting']['access_user_group']) && !in_array($this->user->getGroupId(), $setting['d_visual_designer_setting']['access_user_group'])) {
$this->error['warning'] = $this->language->get('error_permission');
} elseif (empty($setting['d_visual_designer_setting']['access_user_group'])) {
$this->error['warning'] = $this->language->get('error_permission');
}
} else {
$url_info = parse_url(str_replace('&', '&', $this->request->post['url']));
$url_params = array();
parse_str($url_info['query'], $url_params);
$route_info = $this->{'model_extension_'.$this->codename.'_designer'}->getRouteByBackendRoute($url_params['route']);
if (empty($route_info)) {
$this->error['config'] = $this->language->get('error_config');
}
}
return !$this->error;
}
}
|
<?php
namespace TbkApi\top;
class TopLogger
{
public $conf = array(
"separator" => "\t",
"log_file" => ""
);
private $fileHandle;
protected function getFileHandle()
{
if (null === $this->fileHandle)
{
if (empty($this->conf["log_file"]))
{
trigger_error("no log file spcified.");
}
$logDir = dirname($this->conf["log_file"]);
if (!is_dir($logDir))
{
mkdir($logDir, 0777, true);
}
$this->fileHandle = fopen($this->conf["log_file"], "a");
}
return $this->fileHandle;
}
public function log($logData)
{
if ("" == $logData || array() == $logData)
{
return false;
}
if (is_array($logData))
{
$logData = implode($this->conf["separator"], $logData);
}
$logData = $logData. "\n";
fwrite($this->getFileHandle(), $logData);
}
}
?>
|
<?php namespace Sailr\Item\Events;
use Item;
class ItemWasAdded {
public $item;
function __construct(Item $item)
{
$this->item = $item;
}
}
|
<?php
namespace PlacetoPay\DeclarationClient\Examples;
use PlacetoPay\DeclarationClient\Contracts\ActionInterface;
use PlacetoPay\DeclarationClient\Models\Service;
use PlacetoPay\DeclarationClient\Traits\ReturnUrlTrait;
/**
* Class ConsumerBeer
* @package app\Examples
*/
class ConsumerBeer extends Service
{
use ReturnUrlTrait;
/**
* @return string
*/
public function action($action = null)
{
return ActionInterface::ACTION_CREATE_REQUEST;
}
/**
* @return array
*/
public function data($data = null)
{
return [
'payload' => [
'locale' => 'es-CO',
'incomeType' => 'CONSUMER_BEER',
'companyDocumentType' => 'NIT',
'companyDocument' => '900000000',
'additionalData' => [
'valueStrings' => [
[
'keyword' => 'bidder_type',
'value' => 'PRODUCER',
],
[
'keyword' => 'bid_type',
'value' => 'INITIAL',
],
[
'keyword' => 'year_taxable_period',
'value' => date('Y'),
],
[
'keyword' => 'month_taxable_period',
'value' => date('m'),
],
[
'keyword' => 'tax_beers_siphons',
'value' => 938762000,
],
[
'keyword' => 'tax_refajos_mixtures',
'value' => 8404000,
],
[
'keyword' => 'tax_resend_beers_siphons',
'value' => 0,
],
[
'keyword' => 'tax_resend_refajos_mixtures',
'value' => 26000,
],
[
'keyword' => 'balance_favor_period_before',
'value' => 0,
],
[
'keyword' => 'value_sanctions',
'value' => 0,
],
[
'keyword' => 'value_corresponding_address_or_health_funds',
'value' => 156456000,
],
[
'keyword' => 'value_for_taxes_penalties',
'value' => 947140000,
],
[
'keyword' => 'balance_favor',
'value' => 0,
],
[
'keyword' => 'payment_value_tax_beers_siphons',
'value' => 782280000,
],
[
'keyword' => 'payment_value_tax_refajos_mixtures',
'value' => 8404000,
],
[
'keyword' => 'payment_value_penalties',
'value' => 0,
],
[
'keyword' => 'payment_value_interest_due',
'value' => 0,
],
[
'keyword' => 'total_to_pay',
'value' => 790684000,
]
],
'valueArrays' => [
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'POKER (L)(330)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-330'
],
[
'keyword' => 'retail_price',
'value' => 1118
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 342
],
[
'keyword' => 'quantity',
'value' => 47160
],
[
'keyword' => 'taxable_base',
'value' => 36596160
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 17566157
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'CLUB COLOMBIA (L)(330)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-330'
],
[
'keyword' => 'retail_price',
'value' => 1271
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 301
],
[
'keyword' => 'quantity',
'value' => 405032
],
[
'keyword' => 'taxable_base',
'value' => 392881040
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 188582899
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'AGUILA LIGHT (L)(330)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-330'
],
[
'keyword' => 'retail_price',
'value' => 1219
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 352
],
[
'keyword' => 'quantity',
'value' => 395436
],
[
'keyword' => 'taxable_base',
'value' => 342843012
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 164564646
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'AGUILA (L)(330)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-330'
],
[
'keyword' => 'retail_price',
'value' => 1118
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 342
],
[
'keyword' => 'quantity',
'value' => 790567
],
[
'keyword' => 'taxable_base',
'value' => 613479992
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 294470396
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'R'
],
[
'keyword' => 'brand',
'value' => 'COLA Y POLA PET (1500)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-1500'
],
[
'keyword' => 'retail_price',
'value' => 2326
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 333
],
[
'keyword' => 'quantity',
'value' => 21084
],
[
'keyword' => 'taxable_base',
'value' => 42020412
],
[
'keyword' => 'rate',
'value' => 20
],
[
'keyword' => 'tax_value',
'value' => 8404082
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'CONSTEÑA RN (350)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-350'
],
[
'keyword' => 'retail_price',
'value' => 843
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 27
],
[
'keyword' => 'quantity',
'value' => 196830
],
[
'keyword' => 'taxable_base',
'value' => 160613280
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 77094374
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'PILSEN (L)(473)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-473'
],
[
'keyword' => 'retail_price',
'value' => 1427
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 505
],
[
'keyword' => 'quantity',
'value' => 129953
],
[
'keyword' => 'taxable_base',
'value' => 119816666
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 57512000
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'AGUILA (L)(473)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-330'
],
[
'keyword' => 'retail_price',
'value' => 1426
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 503
],
[
'keyword' => 'quantity',
'value' => 167993
],
[
'keyword' => 'taxable_base',
'value' => 155057539
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 74427619
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'MILLER GD (L)(355)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-355'
],
[
'keyword' => 'retail_price',
'value' => 1606
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 422
],
[
'keyword' => 'quantity',
'value' => 17256
],
[
'keyword' => 'taxable_base',
'value' => 20431104
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 9806930
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'COSTEÑA R (L)(750)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-750'
],
[
'keyword' => 'retail_price',
'value' => 1499
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 43
],
[
'keyword' => 'quantity',
'value' => 8640
],
[
'keyword' => 'taxable_base',
'value' => 12579840
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 6038323
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'MILLER GD TW (355)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-355'
],
[
'keyword' => 'retail_price',
'value' => 1685
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 342
],
[
'keyword' => 'quantity',
'value' => 38100
],
[
'keyword' => 'taxable_base',
'value' => 49644300
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 23829264
],
]
],
[
'keyword' => 'liquidations',
'value' => [
[
'keyword' => 'class',
'value' => 'C'
],
[
'keyword' => 'brand',
'value' => 'POKER R (750)(UND)'
],
[
'keyword' => 'unit_measure',
'value' => 'U-1-750'
],
[
'keyword' => 'retail_price',
'value' => 1498
],
[
'keyword' => 'cost_packaging_and_containers',
'value' => 40
],
[
'keyword' => 'quantity',
'value' => 35536
],
[
'keyword' => 'taxable_base',
'value' => 51811488
],
[
'keyword' => 'rate',
'value' => 48
],
[
'keyword' => 'tax_value',
'value' => 24869514
],
]
]
]
],
'payment' => [
'amount' => rand(1000000, 6000000),
],
'returnUrl' => $this->returnUrl(),
]
];
}
}
|
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/welcome', function () {
return view('welcome');
});
Route::get('/{any}', function() {
return view('app');
})->where('any', '.*');
|
<?php $__env->startSection('title', ' | Liệt kê các đánh giá'); ?>
<?php $__env->startSection('styles'); ?>
<link href="<?php echo e(asset('admins/css/sweetalert.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<section class="content-header">
<div class="panel panel-default">
<div class="panel-heading"><strong class="panel-color-heading" >Đánh giá</strong></div>
<div class="panel-body">
<h1>
Danh sách
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo e(url('/khalaadmin')); ?>"><i class="fa fa-dashboard"></i> Quản lý</a></li>
<li class="active">Các đánh giá</li>
</ol>
</div>
</div>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong class="panel-color-heading" >Danh sách đánh giá</strong></div>
<div class="panel-body">
<?php echo $__env->make('admin.includes.flash_message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<form method="GET" action="<?php echo e(url('/khalaadmin/reviews')); ?>" accept-charset="UTF-8" class="form-inline my-2 my-lg-0" role="search">
<div class="form-group mx-sm-3 mb-2">
<input type="text" name="ma_order" class="form-control" placeholder="Đánh giá..." value="<?php echo e(request('content')); ?>">
</div>
<input type="submit" value="Tìm kiếm" style="margin:0px 10px;" class="btn btn-primary mb-2">
<a href="<?php echo e(url('/khalaadmin/reviews')); ?>" class="btn btn-primary"> Làm mới</a>
</form>
<br/>
<br/>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Thành viên</th>
<th>Sản phẩm</th>
<th>Đánh giá</th>
<th>Bình luận</th>
<th>Ngày đánh giá</th>
<th>Hành động</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $reviews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($item->id); ?></td>
<td><?php echo e($item->user -> name); ?></td>
<td><?php echo e($item->product -> title); ?></td>
<td><?php echo e($item->rating); ?></td>
<td><?php echo e($item -> comment); ?></td>
<td><?php echo e($item->created_at); ?></td>
<td>
<!-- xóa -->
<a href="" data-url="<?php echo e(route('review.delete',['id' => $item -> id])); ?>" data-toggle="tooltip" data-original-title="Xóa" class="btn btn-danger btn-sm sa-warning"> <i class="fa fa-trash-o">Xóa</i> </a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<div class="pagination-wrapper"> <?php echo $reviews->appends(['search' => Request::get('search')])->render(); ?> </div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<!-- Sweet-Alert -->
<script src="<?php echo e(asset('admins/js/sweetalert.min.js')); ?>"></script>
<script src="<?php echo e(asset('admins/js/jquery.sweet-alert.custom.js')); ?>"></script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\shop2\resources\views/admin/pages/review/index.blade.php ENDPATH**/ ?>
|
<?php
namespace App\Http\Middleware;
use Closure;
use Exception;
use Tymon\JWTAuth\Facades\JWTAuth;
class JwtMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
try {
$user = JWTAuth::parseToken()->authenticate();
} catch (Exception $e) {
if ($e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException){
return response()->json(['status' => 'Token is Invalid']);
}else if ($e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException){
return response()->json(['status' => 'Token is Expired']);
}else{
return response()->json(['status' => 'Authorization Token not found']);
}
}
return $next($request);
}
}
|
<?php
/**
* Created by PhpStorm.
* Author: Wai Yan Aung
* Date: 6/20/2016
* Time: 3:56 PM
*/
namespace App\Backend\Infrastructure\Forms;
use App\Http\Requests\Request;
class FacilitiesEntryRequest extends Request
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'facilities_name' => 'required',
'facilities_icon' => 'required | mimes:jpeg,jpg,png',
];
}
public function messages()
{
return [
'facilities_name.required' => 'Facilities Name is required',
'facilities_icon.required' => 'Facilities Icon is required!'
];
}
}
|
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> -->
<meta name="viewport" content="width=device-width">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://www.byshhyt.com/xmlrpc.php">
<?php
if( is_home() || is_page() ):?>
<title><?php echo get_bloginfo('name');?></title>
<meta name="keywords" content="<?php echo __('致呵, 广药白云山黄埔莱达,母婴,广药白云山致呵');?>">
<meta name="description" content="<?php echo get_bloginfo('description');?>">
<?php elseif( is_category() ): $cat = get_the_category(); ?>
<title><?php echo $cat[0]->cat_name . ' | 致呵 | 广药白云山黄埔莱达'; ?></title>
<meta name="description" content="<?php echo strip_tags(category_description()); ?>">
<meta name="keywords" content="<?php echo __('广药白云山,致呵,黄埔莱达,母婴,广药白云山致呵');?>">
<?php elseif( is_single() ):?>
<title><?php echo get_the_title() . ' | 致呵 | 广药白云山黄埔莱达'; ?></title>
<meta name="description" content="<?php echo strip_tags(get_the_excerpt()); ?>">
<meta name="keywords" content="<?php echo get_the_title() . '广药白云山,致呵,黄埔莱达,母婴,广药白云山致呵'; ?>">
<?php endif;?>
<!--[if lt IE 9]>
<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<!--show nav banner and sidebar -->
<div id="navbar" class="container-fluid">
<div class="row">
<div class="col-1"></div>
<div class="col-2">
<img class="navbar-brand w-100" src="<?php echo get_template_directory_uri().'/images/logo.png' ?>">
</div>
<div class="col-9 d-flex align-items-center justify-content-center">
<nav class="nav nav-fill">
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?r=1';?>">首页</a>
<p class="text-primary">HOME</p>
</li>
<li class="nav-item p-3">
<!-- <a class="nav-link" href="http://localhost/39/?page_id=4">公司简介</a> -->
<a class="nav-link text-dark" href="<?php echo site_url().'/?page_id=41';?>">公司简介</a>
<p class="text-danger">Company profile</p>
</li>
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?cat=2';?>">产品中心</a>
<p class="text-warning">Product Center</p>
</li>
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?cat=3';?>">新闻资讯</a>
<p class="text-secondary">News info</p>
</li>
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?page_id=43';?>">招商加盟</a>
<p class="text-success">Investment join</p>
</li>
<!-- <li class="nav-item p-3">
<a class="nav-link text-dark" href="#">防伪查询</a>
<p class="text-dark">Security code</p>
</li> -->
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?page_id=45';?>">代理留言</a>
<p class="text-muted">Ieave comments</p>
</li>
<li class="nav-item p-3">
<a class="nav-link text-dark" href="<?php echo site_url().'/?page_id=48';?>">联系我们</a>
<p class="text-danger">Contact us</p>
</li>
</nav>
</div>
</div>
</div>
<!-- banner -->
<?php if( is_home() || is_front_page() ):?>
<div class="container-fluid p-0">
<div id="banner-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="<?php echo get_template_directory_uri().'/images/banner-2.jpg';?>" alt="">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="<?php echo get_template_directory_uri().'/images/banner-3.jpg';?>" alt="">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="<?php echo get_template_directory_uri().'/images/banner-4.jpg';?>" alt="">
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('#banner-carousel').carousel({
interval: 6000
});
</script>
<?php else:?>
<div class="container-fluid p-0">
<img class="w-100 p-0" src="<?php echo get_template_directory_uri().'/images/banner-inner.jpg';?>">
</div>
<?php endif;?>
<div id="content" class="site-content">
|
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CrearTablaRequisitosRealizados extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('requisitosRealizados', function (Blueprint $table) {
$table->increments('id');
$table->longText('contenido');
$table->integer('puntaje_logrado');
$table->integer('idRequisito')->unsigned();
$table->integer('idClub')->unsigned();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('requisitosRealizados');
}
}
|
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\XMPDwc;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class ResourceRelationshipID extends AbstractTag
{
protected $Id = 'ResourceRelationshipResourceRelationshipID';
protected $Name = 'ResourceRelationshipID';
protected $FullName = 'DarwinCore::Main';
protected $GroupName = 'XMP-dwc';
protected $g0 = 'XMP';
protected $g1 = 'XMP-dwc';
protected $g2 = 'Other';
protected $Type = 'string';
protected $Writable = true;
protected $Description = 'Resource Relationship ID';
}
|
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Tax
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Mage_Tax_Model_Class_Source_Customer extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
{
public function getAllOptions()
{
if (!$this->_options) {
$this->_options = Mage::getResourceModel('tax/class_collection')
->addFieldToFilter('class_type', Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)
->load()->toOptionArray();
}
return $this->_options;
}
public function toOptionArray()
{
return $this->getAllOptions();
}
}
|
<?php
namespace App\Http\Controllers;
use App\DmHhTn;
use App\GiaHhTnDefault;
use App\PNhomTn;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Session;
class GiaHhTnDefaultController extends Controller
{
public function getpnhomhh(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
$inputs = $request->all();
//dd($inputs);
if(isset($inputs['manhom'])){
$model = PNhomTn::where('manhom',$inputs['manhom'])
->get();
//dd($model);
$result['message'] = '<div id="ttpnhom">';
if(count($model) > 0){
$result['message'] .= '<select class="form-control select2me" name="mapnhom" id="mapnhom">';
$result['message'] .= '<option value="">--Chọn phân nhóm hàng hóa- dịch vụ--</option>';
foreach($model as $tt){
$result['message'] .= '<option value="'.$tt->masopnhom.'">'.$tt->tenpnhom.'</option>';
}
$result['message'] .= '</select>';
$result['message'] .= '</div>';
$result['status'] = 'success';
}
}
die(json_encode($result));
}
public function gettthh(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
$inputs = $request->all();
//dd($inputs);
if(isset($inputs['mapnhom'])){
$model = DmHhTn::where('masopnhom',$inputs['mapnhom'])
->get();
//dd($model);
$result['message'] = '<div id="tthh">';
if(count($model) > 0){
$result['message'] .= '<select class="form-control select2me" name="mahh" id="mahh">';
$result['message'] .= '<option value="">--Chọn hàng hóa- dịch vụ--</option>';
foreach($model as $tt){
$result['message'] .= '<option value="'.$tt->mahh.'">'.$tt->tenhh.'</option>';
}
$result['message'] .= '</select>';
$result['message'] .= '</div>';
$result['status'] = 'success';
}
}
die(json_encode($result));
}
public function store(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
//dd($request);
$inputs = $request->all();
$inputs['soluong'] = str_replace(',','',$inputs['soluong']);
$inputs['soluong'] = str_replace('.','',$inputs['soluong']);
$inputs['giatu'] = str_replace(',','',$inputs['giatu']);
$inputs['giatu'] = str_replace('.','',$inputs['giatu']);
$inputs['giaden'] = str_replace(',','',$inputs['giaden']);
$inputs['giaden'] = str_replace('.','',$inputs['giaden']);
if($inputs['mahh']!=''){
$modelts = new GiaHhTnDefault();
$modelts->masopnhom = $inputs['masopnhom'];
$modelts->mahh = $inputs['mahh'];
$modelts->giatu =$inputs['giatu'];
$modelts->giaden = $inputs['giaden'];
$modelts->soluong = $inputs['soluong'];
$modelts->nguontin = $inputs['nguontin'];
$modelts->gc = $inputs['gc'];
$modelts->mahuyen = session('admin')->mahuyen;
$modelts->save();
$model = GiaHhTnDefault::where('mahuyen',session('admin')->mahuyen)
->get();
$modeldm = DmHhTn::all();
foreach($model as $tthh){
$this->gettenhh($modeldm,$tthh);
}
$result['message'] = '<tbody id="ttts">';
if(count($model) > 0){
foreach($model as $key=>$tents){
$result['message'] .= '<tr id="'.$tents->id.'">';
$result['message'] .= '<td style="text-align: center">'.($key +1).'</td>';
$result['message'] .= '<td class="active">'.$tents->tenhh.'</td>';
$result['message'] .= '<td style="text-align: right">'.number_format($tents->giatu).'</td>';
$result['message'] .= '<td style="text-align: right">'.number_format($tents->giaden).'</td>';
$result['message'] .= '<td style="text-align: center">'.number_format($tents->soluong).'</td>';
$result['message'] .= '<td>'.$tents->nguontin.'</td>';
$result['message'] .= '<td>'.$tents->gc.'</td>';
$result['message'] .= '<td>'.
'<button type="button" data-target="#modal-wide-width" data-toggle="modal" class="btn btn-default btn-xs mbs" onclick="editItem('.$tents->id.');"><i class="fa fa-edit"></i> Chỉnh sửa</button>'.
'<button type="button" class="btn btn-default btn-xs mbs" onclick="deleteRow('.$tents->id.')" ><i class="fa fa-trash-o"></i> Xóa</button>'
.'</td>';
$result['message'] .= '</tr>';
}
$result['message'] .= '</tbody>';
$result['status'] = 'success';
}
}
die(json_encode($result));
}
public function edit(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
//dd($request);
$inputs = $request->all();
if(isset($inputs['id'])){
$model = GiaHhTnDefault::where('id',$inputs['id'])
->first();
//dd($model);
$result['message'] = '<div class="modal-body" id="tttsedit">';
$result['message'] .= '<div class="row">';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Mã số phân nhóm<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="masopnhomedit" id="masopnhomedit" class="form-control" value="'.$model->masopnhom.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Mã hàng hóa<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="mahhedit" id="mahhedit" class="form-control" value="'.$model->mahh.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="row">';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Giá từ<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="giatuedit" id="giatuedit" class="form-control" data-mask="fdecimal" value="'.$model->giatu.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Giá đến<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="giadenedit" id="giadenedit" class="form-control" data-mask="fdecimal" value="'.$model->giaden.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="row">';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Số lượng<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="soluongedit" id="soluongedit" class="form-control" data-mask="fdecimal" value="'.$model->soluong.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="col-md-6">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Nguồn tin<span class="require">*</span></label>';
$result['message'] .= '<div><input type="text" name="nguontinedit" id="nguontinedit" class="form-control" value="'.$model->nguontin.'"></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<div class="row">';
$result['message'] .= '<div class="col-md-12">';
$result['message'] .= '<div class="form-group"><label for="selGender" class="control-label">Ghi chú<span class="require">*</span></label>';
$result['message'] .= '<div><textarea id="gcedit" class="form-control" name="gcedit" cols="30" rows="3">'.$model->gc.'</textarea></div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '</div>';
$result['message'] .= '<input type="hidden" id="idedit" name="idedit" value="'.$model->id.'">';
$result['message'] .= '</div>';
$result['status'] = 'success';
}
die(json_encode($result));
}
public function update(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
//dd($request);
$inputs = $request->all();
if(isset($inputs['id'])){
$inputs['soluong'] = str_replace(',','',$inputs['soluong']);
$inputs['soluong'] = str_replace('.','',$inputs['soluong']);
$inputs['giatu'] = str_replace(',','',$inputs['giatu']);
$inputs['giatu'] = str_replace('.','',$inputs['giatu']);
$inputs['giaden'] = str_replace(',','',$inputs['giaden']);
$inputs['giaden'] = str_replace('.','',$inputs['giaden']);
$modelupdate = GiaHhTnDefault::where('id',$inputs['id'])
->first();
//$modelupdate->masopnhom = $inputs['masopnhom'];
//$modelupdate->mahh = $inputs['mahh'];
$modelupdate->giatu =$inputs['giatu'];
$modelupdate->giaden = $inputs['giaden'];
$modelupdate->soluong = $inputs['soluong'];
$modelupdate->nguontin = $inputs['nguontin'];
$modelupdate->gc = $inputs['gc'];
$modelupdate->save();
$model = GiaHhTnDefault::where('mahuyen',session('admin')->mahuyen)
->get();
$modeldm = DmHhTn::all();
foreach($model as $tthh){
$this->gettenhh($modeldm,$tthh);
}
$result['message'] = '<tbody id="ttts">';
if(count($model) > 0){
foreach($model as $key=>$tents){
$result['message'] .= '<tr id="'.$tents->id.'">';
$result['message'] .= '<td style="text-align: center">'.($key+1).'</td>';
$result['message'] .= '<td class="active">'.$tents->tenhh.'</td>';
$result['message'] .= '<td style="text-align: right">'.number_format($tents->giatu).'</td>';
$result['message'] .= '<td style="text-align: right">'.number_format($tents->giaden).'</td>';
$result['message'] .= '<td style="text-align: center">'.number_format($tents->soluong).'</td>';
$result['message'] .= '<td>'.$tents->nguontin.'</td>';
$result['message'] .= '<td>'.$tents->gc.'</td>';
$result['message'] .= '<td>'.
'<button type="button" data-target="#modal-wide-width" data-toggle="modal" class="btn btn-default btn-xs mbs" onclick="editItem('.$tents->id.');"><i class="fa fa-edit"></i> Chỉnh sửa</button>'.
'<button type="button" class="btn btn-default btn-xs mbs" onclick="deleteRow('.$tents->id.')" ><i class="fa fa-trash-o"></i> Xóa</button>'
.'</td>';
$result['message'] .= '</tr>';
}
$result['message'] .= '</tbody>';
$result['status'] = 'success';
}
}
die(json_encode($result));
}
public function destroy(Request $request)
{
$result = array(
'status' => 'fail',
'message' => 'error',
);
if(!Session::has('admin')) {
$result = array(
'status' => 'fail',
'message' => 'permission denied',
);
die(json_encode($result));
}
//dd($request);
$inputs = $request->all();
if(isset($inputs['id'])){
$modeldel = GiaHhTnDefault::where('id',$inputs['id'])
->delete();
$model = GiaHhTnDefault::where('mahuyen',session('admin')->mahuyen)
->get();
$modeldm = DmHhTn::all();
foreach($model as $tthh){
$this->gettenhh($modeldm,$tthh);
}
$result['message'] = '<tbody id="ttts">';
if(count($model) > 0){
foreach($model as $key=>$tents){
$result['message'] .= '<tr id="'.$tents->id.'">';
$result['message'] .= '<td>'.($key+1).'</td>';
$result['message'] .= '<td>'.$tents->tenhh.'</td>';
$result['message'] .= '<td>'.number_format($tents->giatu).'</td>';
$result['message'] .= '<td>'.number_format($tents->giaden).'</td>';
$result['message'] .= '<td>'.number_format($tents->soluong).'</td>';
$result['message'] .= '<td>'.$tents->nguontin.'</td>';
$result['message'] .= '<td>'.$tents->gc.'</td>';
$result['message'] .= '<td>'.
'<button type="button" data-target="#modal-wide-width" data-toggle="modal" class="btn btn-default btn-xs mbs" onclick="editItem('.$tents->id.');"><i class="fa fa-edit"></i> Chỉnh sửa</button>'.
'<button type="button" class="btn btn-default btn-xs mbs" onclick="deleteRow('.$tents->id.')" ><i class="fa fa-trash-o"></i> Xóa</button>'
.'</td>';
$result['message'] .= '</tr>';
}
$result['message'] .= '</tbody>';
$result['status'] = 'success';
}
else{
$result['message'] .= '<tr>';
$result['message'] .= '<td colspan="8" style="text-align: center">Chưa có thông tin</td>';
$result['message'] .= '</tr>';
$result['message'] .= '</tbody>';
$result['status'] = 'success';
}
}
die(json_encode($result));
}
public function gettenhh($mahh,$array){
foreach($mahh as $tt){
if($tt->masopnhom == $array->masopnhom && $tt->mahh == $array->mahh){
$array->tenhh = $tt->tenhh;
break;
}
}
}
}
|
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Bill extends Model
{
use HasFactory;
protected $fillable=[
'user_id',
'meet_id',
'amount',
'type',
'status',
'remain',
'count',
'com',
'transactionId',
'bank',
'port',
'wallet',
'info',
];
public function user(){
return $this->belongsTo(User::class);
}
public function meet(){
return $this->belongsTo(Meet::class);
}
}
|
<?php
class OrchidForm extends Form {
/**
* Our constructor only requires the controller and the name of the form
* method. We'll create the fields and actions in here.
*
*/
public function __construct($controller, $name, $OrchidID = null) {
$colourSelection = COLOUR_SELECTION;
$monthSelection = MONTH_SELECTION;
if($OrchidID != null) {
$Orchid = Orchid::get()->byID($OrchidID);
$idField = HiddenField::create('OrchidID', 'OrchidID')->setValue($OrchidID);
$file = Image::get()->byID($Orchid->OrchidPhotoID);
$currentImage = LiteralField::create('CurrentImage', '<img src="assets/orchid-photos/'.$file->Filename.'" style="max-width:200px;" />');
$imageField = FileField::create('OrchidPhoto', 'Upload a different Orchid Photo (use camera)<span style="color:darkred;"> - will overwrite the image above</span>');
$potNumberField = NumericField::create('PotNumber', 'Pot Number')->setAttribute('placeholder', 'Enter the Orchid Pot number here')->setValue($Orchid->PotNumber);
$breedField = TextField::create('Breed', 'Breed')->setAttribute('placeholder', 'Enter the breed of the orchid')->setValue($Orchid->Breed);
$typeField = TextField::create('Type', 'Type')->setAttribute('placeholder', 'Enter the type of the orchid')->setValue($Orchid->Type);
$commonNameField = TextField::create('CommonName', 'Common Name')->setAttribute('placeholder', 'Enter the common name of the orchid')->setValue($Orchid->CommonName);
$flowerColour = CheckboxSetField::create('FlowerColour', 'Flower Colour')->setSource($colourSelection)->setValue(json_decode($Orchid->FlowerColour));
$floweringMonth = CheckboxSetField::create('FloweringMonth', 'Flowering Month')->setSource($monthSelection)->setValue(json_decode($Orchid->FloweringMonth));
$notes = TextareaField::create('Notes', 'Notes')->setValue($Orchid->Notes);
} else {
$idField = HiddenField::create('OrchidID', 'OrchidID')->setValue(0);
$currentImage = LiteralField::create('CurrentImage', '');
$imageField = FileField::create('OrchidPhoto', 'Upload your Orchid Photo (use camera)');
$potNumberField = NumericField::create('PotNumber', 'Pot Number')->setAttribute('placeholder', 'Enter the Orchid Pot number here');
$breedField = TextField::create('Breed', 'Breed')->setAttribute('placeholder', 'Enter the breed of the orchid');
$typeField = TextField::create('Type', 'Type')->setAttribute('placeholder', 'Enter the type of the orchid');
$commonNameField = TextField::create('CommonName', 'Common Name')->setAttribute('placeholder', 'Enter the common name of the orchid');
$flowerColour = CheckboxSetField::create('FlowerColour', 'Flowering Colour')->setSource($colourSelection);
$floweringMonth = CheckboxSetField::create('FloweringMonth', 'Flowering Month')->setSource($monthSelection);
$notes = TextareaField::create('Notes', 'Notes');
}
$fields = new FieldList(
$idField,
$currentImage,
$imageField,
$potNumberField,
$breedField,
$typeField,
$commonNameField,
$flowerColour,
$floweringMonth,
$notes
);
$actions = new FieldList(
FormAction::create('processOrchidForm')
);
$required = new RequiredFields(array(
'PotNumber'
));
// now we create the actual form with our fields and actions defined
// within this class
parent::__construct($controller, $name, $fields, $actions, $required);
// any modifications we need to make to the form.
$this->setFormMethod('POST', true);
$this->setAttribute('enctype', "multipart/form-data");
$this->addExtraClass('footer-newsletter-form');
$this->disableSecurityToken();
}
}
|
<?php
use Illuminate\Database\Seeder;
class BusinessesTableSeeder extends Seeder
{
public function run()
{
factory(App\Business::class, 10)->states('owner')->create();
}
}
|
<div class="content">
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="card-header">
<div class="row">
<div class="col-md-10">
<h4 class="card-title"> Blogs</h4>
</div>
<div class="col-md-2">
<button type="button" class="btn btn-info" data-catData='' data-toggle="modal"
data-target="#add">Add</button>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-bordered responsive nowrap" style="width:100%"
id="tableData">
<thead class=" text-primary">
<tr>
<th> S.no. </th>
<th> Title </th>
<th> Keywords </th>
<th> Image </th>
<th> Description </th>
<th> CreatedAt </th>
<th> Status </th>
<th class="text-center"> Action </th>
</tr>
</thead>
<tbody>
<?php
if(!empty($data))
{
$i=1;
foreach ($data as $blog) {
?>
<tr>
<td>
<?php echo $i++; ?>
</td>
<td>
<?php echo $blog->title; ?>
</td>
<td>
<?php echo $blog->keywords; ?>
</td>
<td>
<img data-enlargeable style="cursor: zoom-in;object-fit:cover;height:100px;width:100px;" src="<?php echo $blog->image !=null ? base_url('assets/uploads/blogs/').$blog->image : base_url('assets/uploads/uploads.png') ?>" alt="blog image" srcset="">
</td>
<td>
<?php echo $blog->description; ?>
</td>
<td>
<?php echo $blog->createdAt; ?>
<td>
<?php $status = $blog->status ? 0 : 1; ?>
<a
href="<?php echo base_url('common/changeStatus/blogs/').$blog->id.'/'.$status ?>"><?php echo $blog->status ? '<i class="fas fa-check text-success"></i>' : '<i class="fas fa-times text-danger" ></i>'; ?></a>
</td>
<td class="text-center">
<a data-toggle="modal" data-catData='<?php echo json_encode($blog); ?>'
data-target="#add">
<i class="fas fa-edit" style="padding-right: 50px; color:darkgreen"></i></a>
<a href='<?php echo base_url('common/deletedata/blogs/').$blog->id ?>'><i
class="fa fa-trash text-danger" aria-hidden="true"></i></a>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg " role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title categoryTitle" id="categoryTitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id='blogs' action=" <?php echo base_url('admin/saveBlogs/add/new'); ?>" method="post" enctype="multipart/form-data" >
<div class="form-group">
<label for="exampleInputEmail1">Tittle <span class="text-danger">*</span> </label>
<input type="text " class="form-control" id="title" name="title" placeholder="Enter title here" required>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Keywords</label>
<input type="text " class="form-control" id="keywords" name="keywords"
placeholder="Enter keywords here" data-role="tagsinput">
</div>
<div class="form-group">
<label class="filelabel add-image" id="img1">
<i class="fas fa-paperclip"></i>
<span class="title">
Add Image 720 x 720
</span>
<input class="FileUpload1 file1" id="file" name="file" type="file" />
</label>
</div>
<input class="d-none" type="hidden" name="oldImage" id="oldImage">
<div class="form-group">
<label for="exampleInputPassword1">Description <span class="text-danger">*</span> </label>
<textarea name="description" id="description" cols="30" rows="10" class="form-control" required></textarea>
<div id="editor2_error"> </div>
</div>
<div class="form group">
<button type="submit" name="submit" id="buttonTitle" class="btn btn-info"></button>
</div>
</form>
</div>
</div>
</div>
</div>
|
<?php namespace App\Models;
use App\Traits\Ownable;
use Illuminate\Database\Eloquent\Model;
use Neilrussell6\Laravel5JsonApi\Traits\Validatable;
class Project extends Model
{
use Validatable, Ownable;
const STATUS_INCOMPLETE = 1;
const STATUS_COMPLETE = 2;
const STATUS_TRASH = 3;
protected $fillable = ['user_id', 'name', 'status'];
protected $hidden = [];
protected $casts = [
'status' => 'integer',
];
public $type = 'projects';
public $rules = [
'name' => 'required'
];
public $available_includes = ['owner', 'tasks'];
public $default_includes = ['owner'];
// ----------------------------------------------------
// eloquent events
// ----------------------------------------------------
protected static function boot() {
parent::boot();
static::deleting(function($project) {
$project->tasks->each(function($task) {
$task->delete();
});
});
}
// ----------------------------------------------------
// relationships
// ----------------------------------------------------
public function owner ()
{
return $this->belongsTo('App\Models\User', 'user_id'); // we would not need to provide a foreign key if the method was called 'user'
}
public function tasks ()
{
return $this->hasMany('App\Models\Task');
}
}
|
<?php
/*
* This file is part of the TecnoCreaciones package.
*
* (c) www.tecnocreaciones.com
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pequiven\MasterBundle\Model\Base;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Modelo base de las entidades
*
* @author Carlos Mendoza <inhack20@gmail.com>
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
* @ORM\MappedSuperclass()
* @ORM\HasLifecycleCallbacks()
*/
abstract class ModelBase
{
/**
* @var \DateTime
* @Gedmo\Timestampable(on="create")
* @ORM\Column(name="created_at", type="datetime")
*/
protected $createdAt;
/**
* @var \DateTime
* @Gedmo\Timestampable(on="update")
* @ORM\Column(name="updated_at", type="datetime")
*/
protected $updatedAt;
/**
* @var \DateTime
* @ORM\Column(name="deletedAt", type="datetime", nullable=true)
*/
protected $deletedAt;
function getCreatedAt() {
return $this->createdAt;
}
function getUpdatedAt() {
return $this->updatedAt;
}
function getDeletedAt() {
return $this->deletedAt;
}
/**
* @param \DateTime $createdAt
* @return \Pequiven\SEIPBundle\Model\BaseModel
*/
function setCreatedAt(\DateTime $createdAt) {
$this->createdAt = $createdAt;
}
/**
* @param \DateTime $updatedAt
* @return \Pequiven\SEIPBundle\Model\BaseModel
*/
function setUpdatedAt(\DateTime $updatedAt) {
$this->updatedAt = $updatedAt;
}
function setDeletedAt(\DateTime $deletedAt) {
$this->deletedAt = $deletedAt;
}
}
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Mdl_peserta extends CI_Model{
function __construct() {
parent::__construct();
$this->load->database();
}
public function add($data)
{
$this->db->insert('peserta', $data);
}
public function get_all_data()
{
$query = $this->db->get('peserta');
//$query = $this->db->query('SELECT * from peserta');
return $query;
}
public function get_selected_data_peserta($id)
{
$query = $this->db->get_where('peserta', array('id' => $id));
return $query;
}
}
|
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "transaction".
*
* @property int $id
* @property int $id_user
* @property string $data_create
* @property int $type
* @property int $number
* @property int $sum
* @property int $status
*/
class Transaction extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'transaction';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id', 'id_user', 'type', 'sum', 'status'], 'required'],
[['id', 'id_user', 'type', 'number', 'sum', 'status'], 'integer'],
[['data_create'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'id_user' => 'Id User',
'data_create' => 'Data Create',
'type' => 'Type',
'number' => 'Number',
'sum' => 'Sum',
'status' => 'Status',
];
}
}
|
<?php
// This file is auto-generated. Do not edit!
return array('001'=>'विश्व','002'=>'अफ़्रीका','003'=>'उत्तर अमेरिका','005'=>'दक्षिण अमेरिका','009'=>'ओशिआनिया','011'=>'पश्चिमी अफ़्रीका','013'=>'मध्य अमेरिका','014'=>'पूर्वी अफ़्रीका','015'=>'उत्तरी अफ़्रीका','017'=>'मध्य अफ़्रीका','018'=>'दक्षिणी अफ़्रीका','019'=>'अमेरिकाज़','021'=>'उत्तरी अमेरिका','029'=>'कैरिबियन','030'=>'पूर्वी एशिया','034'=>'दक्षिणी एशिया','035'=>'दक्षिण-पूर्व एशिया','039'=>'दक्षिणी यूरोप','053'=>'ऑस्ट्रेलेशिया','054'=>'मेलानेशिया','057'=>'माइक्रोनेशियाई क्षेत्र','061'=>'पोलिनेशिया',142=>'एशिया',143=>'मध्य एशिया',145=>'पश्चिमी एशिया',150=>'यूरोप',151=>'पूर्वी यूरोप',154=>'उत्तरी यूरोप',155=>'पश्चिमी यूरोप',202=>'उप-सहारा अफ़्रीका',419=>'लैटिन अमेरिका','AC'=>'असेंशन द्वीप','AD'=>'एंडोरा','AE'=>'संयुक्त अरब अमीरात','AF'=>'अफ़गानिस्तान','AG'=>'एंटिगुआ और बरबुडा','AI'=>'एंग्विला','AL'=>'अल्बानिया','AM'=>'आर्मेनिया','AO'=>'अंगोला','AQ'=>'अंटार्कटिका','AR'=>'अर्जेंटीना','AS'=>'अमेरिकी समोआ','AT'=>'ऑस्ट्रिया','AU'=>'ऑस्ट्रेलिया','AW'=>'अरूबा','AX'=>'एलैंड द्वीपसमूह','AZ'=>'अज़रबैजान','BA'=>'बोस्निया और हर्ज़ेगोविना','BB'=>'बारबाडोस','BD'=>'बांग्लादेश','BE'=>'बेल्जियम','BF'=>'बुर्किना फ़ासो','BG'=>'बुल्गारिया','BH'=>'बहरीन','BI'=>'बुरुंडी','BJ'=>'बेनिन','BL'=>'सेंट बार्थेलेमी','BM'=>'बरमूडा','BN'=>'ब्रूनेई','BO'=>'बोलीविया','BQ'=>'कैरिबियन नीदरलैंड','BR'=>'ब्राज़ील','BS'=>'बहामास','BT'=>'भूटान','BV'=>'बोवेत द्वीप','BW'=>'बोत्स्वाना','BY'=>'बेलारूस','BZ'=>'बेलीज़','CA'=>'कनाडा','CC'=>'कोकोस (कीलिंग) द्वीपसमूह','CD'=>'कांगो - किंशासा','CD-alt-variant'=>'कांगो (डीआरसी)','CF'=>'मध्य अफ़्रीकी गणराज्य','CG'=>'कांगो – ब्राज़ाविल','CG-alt-variant'=>'कांगो (गणराज्य)','CH'=>'स्विट्ज़रलैंड','CI'=>'कोट डी आइवर','CI-alt-variant'=>'आइवरी कोस्ट','CK'=>'कुक द्वीपसमूह','CL'=>'चिली','CM'=>'कैमरून','CN'=>'चीन','CO'=>'कोलंबिया','CP'=>'क्लिपर्टन द्वीप','CR'=>'कोस्टारिका','CU'=>'क्यूबा','CV'=>'केप वर्ड','CW'=>'क्यूरासाओ','CX'=>'क्रिसमस द्वीप','CY'=>'साइप्रस','CZ'=>'चेकिया','CZ-alt-variant'=>'चेक गणराज्य','DE'=>'जर्मनी','DG'=>'डिएगो गार्सिया','DJ'=>'जिबूती','DK'=>'डेनमार्क','DM'=>'डोमिनिका','DO'=>'डोमिनिकन गणराज्य','DZ'=>'अल्जीरिया','EA'=>'सेउटा और मेलिला','EC'=>'इक्वाडोर','EE'=>'एस्टोनिया','EG'=>'मिस्र','EH'=>'पश्चिमी सहारा','ER'=>'इरिट्रिया','ES'=>'स्पेन','ET'=>'इथियोपिया','EU'=>'यूरोपीय संघ','EZ'=>'यूरोज़ोन','FI'=>'फ़िनलैंड','FJ'=>'फ़िजी','FK'=>'फ़ॉकलैंड द्वीपसमूह','FK-alt-variant'=>'फ़ॉकलैंड द्वीपसमूह (इज़्लास माल्विनास)','FM'=>'माइक्रोनेशिया','FO'=>'फ़ेरो द्वीपसमूह','FR'=>'फ़्रांस','GA'=>'गैबॉन','GB'=>'यूनाइटेड किंगडम','GB-alt-short'=>'यू॰के॰','GD'=>'ग्रेनाडा','GE'=>'जॉर्जिया','GF'=>'फ़्रेंच गुयाना','GG'=>'गर्नसी','GH'=>'घाना','GI'=>'जिब्राल्टर','GL'=>'ग्रीनलैंड','GM'=>'गाम्बिया','GN'=>'गिनी','GP'=>'ग्वाडेलूप','GQ'=>'इक्वेटोरियल गिनी','GR'=>'यूनान','GS'=>'दक्षिण जॉर्जिया और दक्षिण सैंडविच द्वीपसमूह','GT'=>'ग्वाटेमाला','GU'=>'गुआम','GW'=>'गिनी-बिसाउ','GY'=>'गुयाना','HK'=>'हाँग काँग (चीन विशेष प्रशासनिक क्षेत्र)','HK-alt-short'=>'हाँग काँग','HM'=>'हर्ड द्वीप और मैकडोनॉल्ड द्वीपसमूह','HN'=>'होंडूरास','HR'=>'क्रोएशिया','HT'=>'हैती','HU'=>'हंगरी','IC'=>'कैनेरी द्वीपसमूह','ID'=>'इंडोनेशिया','IE'=>'आयरलैंड','IL'=>'इज़राइल','IM'=>'आइल ऑफ़ मैन','IN'=>'भारत','IO'=>'ब्रिटिश हिंद महासागरीय क्षेत्र','IQ'=>'इराक','IR'=>'ईरान','IS'=>'आइसलैंड','IT'=>'इटली','JE'=>'जर्सी','JM'=>'जमैका','JO'=>'जॉर्डन','JP'=>'जापान','KE'=>'केन्या','KG'=>'किर्गिज़स्तान','KH'=>'कंबोडिया','KI'=>'किरिबाती','KM'=>'कोमोरोस','KN'=>'सेंट किट्स और नेविस','KP'=>'उत्तर कोरिया','KR'=>'दक्षिण कोरिया','KW'=>'कुवैत','KY'=>'कैमेन द्वीपसमूह','KZ'=>'कज़ाखस्तान','LA'=>'लाओस','LB'=>'लेबनान','LC'=>'सेंट लूसिया','LI'=>'लिचेंस्टीन','LK'=>'श्रीलंका','LR'=>'लाइबेरिया','LS'=>'लेसोथो','LT'=>'लिथुआनिया','LU'=>'लग्ज़मबर्ग','LV'=>'लातविया','LY'=>'लीबिया','MA'=>'मोरक्को','MC'=>'मोनाको','MD'=>'मॉल्डोवा','ME'=>'मोंटेनेग्रो','MF'=>'सेंट मार्टिन','MG'=>'मेडागास्कर','MH'=>'मार्शल द्वीपसमूह','MK'=>'उत्तरी मकदूनिया','ML'=>'माली','MM'=>'म्यांमार (बर्मा)','MN'=>'मंगोलिया','MO'=>'मकाऊ (विशेष प्रशासनिक क्षेत्र चीन)','MO-alt-short'=>'मकाऊ','MP'=>'उत्तरी मारियाना द्वीपसमूह','MQ'=>'मार्टीनिक','MR'=>'मॉरिटानिया','MS'=>'मोंटसेरात','MT'=>'माल्टा','MU'=>'मॉरीशस','MV'=>'मालदीव','MW'=>'मलावी','MX'=>'मैक्सिको','MY'=>'मलेशिया','MZ'=>'मोज़ांबिक','NA'=>'नामीबिया','NC'=>'न्यू कैलेडोनिया','NE'=>'नाइजर','NF'=>'नॉरफ़ॉक द्वीप','NG'=>'नाइजीरिया','NI'=>'निकारागुआ','NL'=>'नीदरलैंड','NO'=>'नॉर्वे','NP'=>'नेपाल','NR'=>'नाउरु','NU'=>'नीयू','NZ'=>'न्यूज़ीलैंड','OM'=>'ओमान','PA'=>'पनामा','PE'=>'पेरू','PF'=>'फ़्रेंच पोलिनेशिया','PG'=>'पापुआ न्यू गिनी','PH'=>'फ़िलिपींस','PK'=>'पाकिस्तान','PL'=>'पोलैंड','PM'=>'सेंट पिएरे और मिक्वेलान','PN'=>'पिटकैर्न द्वीपसमूह','PR'=>'पोर्टो रिको','PS'=>'फ़िलिस्तीनी क्षेत्र','PS-alt-short'=>'फ़िलिस्तीन','PT'=>'पुर्तगाल','PW'=>'पलाऊ','PY'=>'पराग्वे','QA'=>'क़तर','QO'=>'आउटलाइंग ओशिनिया','RE'=>'रियूनियन','RO'=>'रोमानिया','RS'=>'सर्बिया','RU'=>'रूस','RW'=>'रवांडा','SA'=>'सऊदी अरब','SB'=>'सोलोमन द्वीपसमूह','SC'=>'सेशेल्स','SD'=>'सूडान','SE'=>'स्वीडन','SG'=>'सिंगापुर','SH'=>'सेंट हेलेना','SI'=>'स्लोवेनिया','SJ'=>'स्वालबार्ड और जान मायेन','SK'=>'स्लोवाकिया','SL'=>'सिएरा लियोन','SM'=>'सैन मेरीनो','SN'=>'सेनेगल','SO'=>'सोमालिया','SR'=>'सूरीनाम','SS'=>'दक्षिण सूडान','ST'=>'साओ टोम और प्रिंसिपे','SV'=>'अल सल्वाडोर','SX'=>'सिंट मार्टिन','SY'=>'सीरिया','SZ'=>'एस्वाटिनी','SZ-alt-variant'=>'स्वाज़ीलैंड','TA'=>'ट्रिस्टन दा कुना','TC'=>'तुर्क और कैकोज़ द्वीपसमूह','TD'=>'चाड','TF'=>'फ़्रांसीसी दक्षिणी क्षेत्र','TG'=>'टोगो','TH'=>'थाईलैंड','TJ'=>'ताज़िकिस्तान','TK'=>'तोकेलाउ','TL'=>'तिमोर-लेस्त','TL-alt-variant'=>'पूर्वी तिमोर','TM'=>'तुर्कमेनिस्तान','TN'=>'ट्यूनीशिया','TO'=>'टोंगा','TR'=>'तुर्की','TT'=>'त्रिनिदाद और टोबैगो','TV'=>'तुवालू','TW'=>'ताइवान','TZ'=>'तंज़ानिया','UA'=>'यूक्रेन','UG'=>'युगांडा','UM'=>'यू॰एस॰ आउटलाइंग द्वीपसमूह','UN'=>'संयुक्त राष्ट्र','UN-alt-short'=>'संयुक्त राष्ट्र','US'=>'संयुक्त राज्य','US-alt-short'=>'अमेरिका','UY'=>'उरूग्वे','UZ'=>'उज़्बेकिस्तान','VA'=>'वेटिकन सिटी','VC'=>'सेंट विंसेंट और ग्रेनाडाइंस','VE'=>'वेनेज़ुएला','VG'=>'ब्रिटिश वर्जिन द्वीपसमूह','VI'=>'यू॰एस॰ वर्जिन द्वीपसमूह','VN'=>'वियतनाम','VU'=>'वनुआतू','WF'=>'वालिस और फ़्यूचूना','WS'=>'समोआ','XA'=>'सूडो-एक्सेंट','XB'=>'सूडो-बायडायरेक्शनल','XK'=>'कोसोवो','YE'=>'यमन','YT'=>'मायोते','ZA'=>'दक्षिण अफ़्रीका','ZM'=>'ज़ाम्बिया','ZW'=>'ज़िम्बाब्वे','ZZ'=>'अज्ञात क्षेत्र');
|
<?php
declare(strict_types=1);
use Extraton\TonClient\TonClient;
require __DIR__ . '/../vendor/autoload.php';
$tonClient = TonClient::createDefault();
// Get Utils module
$utils = $tonClient->getUtils();
$result = $tonClient->version();
echo 'TON SDK version: ' . $result->getVersion() . PHP_EOL;
|
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Gate;
use App\Models\Log;
class LogsController extends Controller
{
public function index()
{
if (! Gate::allows('users_manage')) {
return abort(500);
}
$logs = Log::all();
return view('admin.logs.index', compact('logs'));
}
public function destroy($id)
{
$log = Log::find($id);
$log->delete();
}
}
|
<?php
namespace app\models;
use yii\data\ActiveDataProvider;
class ShortLinkSearch extends ShortLink
{
/**
* Validation rules for search
* @return array
*/
public function rules()
{
$baseRules = parent::rules();
return $baseRules;
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
$baseLabels = parent::attributeLabels();
return $baseLabels;
}
/**
* Build search query and return as result data provider
* @param $params
* @param null $userId
* @return ActiveDataProvider
*/
public function search($params, $userId = null)
{
$q = parent::find()->alias('sl');
if(!empty($userId)) {
$q->andWhere(['sl.user_id' => $userId]);
}
if($this->load($params)){
if($this->validate()){
if(!empty($this->id)){
$q->andWhere(['sl.id' => $this->id]);
}
if(!empty($this->phone)){
$q->andWhere(['like','sl.phone',$this->phone]);
}
if(!empty($this->original_link)){
$q->andWhere(['like','sl.original_link',$this->original_link]);
}
if(!empty($this->key)){
$q->andWhere(['like','sl.key',$this->key]);
}
if(!empty($this->type_id)){
$q->andWhere(['sl.type_id' => $this->type_id]);
}
if(!empty($this->status_id)){
$q->andWhere(['sl.status_id' => $this->status_id]);
}
if(!empty($this->clicks)){
$q->andWhere('sl.clicks >= :min AND sl.clicks <= :max',['min' => ((int)$this->clicks)-5,'max'=>((int)$this->clicks)+5]);
}
}
}
if(!empty($this->rating_ordering)){
$q->orderBy("rating {$this->rating_ordering}");
}
$q->distinct();
return new ActiveDataProvider([
'query' => $q,
'pagination' => [
'pageSize' => !empty($this->per_page) ? (int)$this->per_page : 20,
],
]);
}
}
|
@extends('app')
@section('content')
<div class="jumbotron index-header jumbotron_set jumbotron-cover @if( Auth::check() ) session-active-cover @endif">
<div class="container wrap-jumbotron position-relative">
<h1 class="title-site vivify driveInTop delay-500" id="titleSite">{{$settings->welcome_text}}</h1>
<p class="subtitle-site vivify fadeInBottom delay-600"><strong>{{$settings->welcome_subtitle}}</strong></p>
<form role="search" autocomplete="off" action="{{ url('search') }}" method="get">
<div class="input-group input-group-lg searchBar">
<input type="text" class="form-control" name="q" id="btnItems" placeholder="{{trans('misc.title_search_bar')}}">
<span class="input-group-btn">
<button class="btn btn-main btn-flat" type="submit" id="btnSearch">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</form>
@if($categoryPopular)
<div style="text-align:center;color:#FFF;margin-top: 10px;font-size: 16px;">
<strong>{{trans('misc.popular_categories')}} {!! $categoryPopular !!}</strong>
</div>
@endif
</div><!-- container wrap-jumbotron -->
</div><!-- jumbotron -->
<div class="container-fluid margin-bottom-40">
<div class="row margin-bottom-20">
@if( $images->total() != 0 )
@if($settings->show_images_index == 'featured' || $settings->show_images_index == 'both')
<div class="col-md-12 btn-block margin-bottom-40">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow highlight-word-color">@lang('misc.featured_photos')</h1>
<h5 class="btn-block text-center class-montserrat text-uppercase">{{trans('misc.subtitle_featured_home')}}</h5>
</div>
<div id="imagesFlexFeatured" class="flex-images btn-block margin-bottom-40">
@include('includes.images', ['images' => $featured])
</div><!-- Image Flex -->
<div class="col-md-12 text-center margin-bottom-20">
<a href="{{ url('featured') }}" class="btn btn-lg btn-main custom-rounded">
{{ trans('misc.view_all') }} <i class="fa fa-long-arrow-right"></i>
</a>
</div>
@endif
@if($settings->show_images_index == 'latest' || $settings->show_images_index == 'both')
<div class="col-md-12 btn-block margin-bottom-40">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow highlight-word-color">@lang('misc.recent_photos')</h1>
<h5 class="btn-block text-center class-montserrat text-uppercase">{{trans('misc.title_2_index')}}</h5>
</div>
<div id="imagesFlex" class="flex-images btn-block margin-bottom-40">
@include('includes.images')
</div><!-- Image Flex -->
<div class="col-md-12 text-center margin-bottom-20">
<a href="{{ url('latest') }}" class="btn btn-lg btn-main custom-rounded">
{{ trans('misc.view_all') }} <i class="fa fa-long-arrow-right"></i>
</a>
</div>
@endif
@else
<div class="btn-block text-center">
<i class="icon icon-Picture ico-no-result"></i>
</div>
<h3 class="margin-top-none text-center no-result no-result-mg">
{{ trans('misc.no_images_published') }}
</h3>
@endif
</div><!-- row -->
<div class="row margin-bottom-40">
<div class="container">
@if ($settings->show_counter == 'on')
<div class="col-md-4 border-stats">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow"><span class=".numbers-with-commas counter"><?php echo html_entity_decode(App\Helper::formatNumbersStats(App\Models\User::where('status', 'active')->count())) ?></span></h1>
<h5 class="btn-block text-center class-montserrat subtitle-color text-uppercase">{{trans('misc.members')}}</h5>
</div><!-- col-md-3 -->
<div class="col-md-4 border-stats">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow"><span class=".numbers-with-commas counter"><?php echo html_entity_decode(App\Helper::formatNumbersStats(App\Models\Downloads::count())) ?></span></h1>
<h5 class="btn-block text-center class-montserrat subtitle-color text-uppercase">{{trans('misc.downloads')}}</h5>
</div><!-- col-md-3 -->
<div class="col-md-4 border-stats">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow"><span class=".numbers-with-commas counter"><?php echo html_entity_decode(App\Helper::formatNumbersStats(App\Models\Images::where('status', 'active')->count())) ?></span></h1>
<h5 class="btn-block text-center class-montserrat subtitle-color text-uppercase">{{trans('misc.stock_photos')}}</h5>
</div><!-- col-md-3 -->
@endif
@if( isset( $settings->google_adsense ) && $settings->google_ads_index == 'on' && $settings->google_adsense_index != '' )
<div class="col-md-12 margin-top-40">
<?php echo html_entity_decode($settings->google_adsense_index); ?>
</div>
@endif
</div><!-- row -->
</div>
</div><!-- container wrap-ui -->
<div class="jumbotron jumbotron-bottom margin-bottom-zero jumbotron-cover">
<div class="container wrap-jumbotron position-relative">
<h1 class="title-site">{{trans('misc.title_2_index')}}</h1>
<p class="subtitle-site"><strong>{{$settings->welcome_subtitle}}</strong></p>
@if( Auth::check() || $settings->registration_active == 0 )
<form role="search" autocomplete="off" action="{{ url('search') }}" method="get">
<div class="input-group input-group-lg searchBar">
<input type="text" class="form-control" name="q" id="btnItems_2" placeholder="{{trans('misc.title_search_bar')}}">
<span class="input-group-btn">
<button class="btn btn-main btn-flat" type="submit" id="btnSearch_2">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</form>
@else
<div class="btn-block text-center">
<a href="{{ url('register') }}" class="btn btn-lg btn-main custom-rounded">
{{ trans('misc.signup_free') }}
</a>
</div>
@endif
</div><!-- container wrap-jumbotron -->
</div><!-- jumbotron -->
@if ($settings->show_categories_index == 'on')
<div class="wrapper">
<div class="container">
<div class="row margin-bottom-40">
<div class="col-md-12 btn-block margin-bottom-40">
<h1 class="btn-block text-center class-montserrat margin-bottom-zero none-overflow color-white">{{trans('misc.categories')}}</h1>
<h5 class="btn-block text-center class-montserrat text-uppercase color-gray">{{trans('misc.browse_by_category')}}</h5>
</div>
@foreach($categories->chunk(3) as $column)
<div class="col-md-3 col-center">
<ul class="list-unstyled imagesCategory">
@foreach ($column as $category)
<li>
<a class="link-category" href="{{ url('category') }}/{{ $category->slug }}">{{ $category->name }} ({{$category->images()->count()}}) </a>
</li>
@endforeach
</ul>
</div>
@endforeach
@if( $categories->total() > 11 )
<div class="col-md-12 text-center margin-top-40">
<a href="{{ url('categories') }}" class="btn btn-lg btn-main custom-rounded">
{{ trans('misc.view_all') }} <i class="fa fa-long-arrow-right"></i>
</a>
</div>
@endif
</div><!-- row -->
</div><!-- container -->
</div><!-- wrapper -->
@endif
@endsection
@section('javascript')
<script src="{{ asset('plugins/jquery.counterup/jquery.counterup.min.js') }}"></script>
<script src="{{ asset('plugins/jquery.counterup/waypoints.min.js') }}"></script>
<script type="text/javascript">
$('#imagesFlex').flexImages({
rowHeight: 320,
maxRows: 8,
truncate: true
});
$('#imagesFlexFeatured').flexImages({
rowHeight: 320,
maxRows: 8,
truncate: true
});
jQuery(document).ready(function($) {
$('.counter').counterUp({
delay: 10, // the delay time in ms
time: 1000 // the speed time in ms
});
});
@if(session('success_verify'))
swal({
title: "{{ trans('misc.welcome') }}",
text: "{{ trans('users.account_validated') }}",
type: "success",
confirmButtonText: "{{ trans('users.ok') }}"
});
@endif
@if(session('error_verify'))
swal({
title: "{{ trans('misc.error_oops') }}",
text: "{{ trans('users.code_not_valid') }}",
type: "error",
confirmButtonText: "{{ trans('users.ok') }}"
});
@endif
// GET country
/*$.get("https://ipinfo.io", function (response) {
console.log(response.country);
}, "jsonp");*/
</script>
@endsection
|
<?php
namespace App\Http\Controllers\API\V1;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Customer;
use App\Person;
class CustomersController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//dd($request);
echo ($request['customers']['customer_number']);
$first_name = $request['customers']['first_name'];
$last_name = $request['customers']['last_name'];
$customer_type = $request['customer_type'];
if($customer_type == 'person'){ //if inserting person
$person = new Person;
$person->first_name = $first_name;
$person->last_name = $last_name;
$person->save();
$new_person_id = $person->id;
$this->storeCustomerDetails($request['customers'], $new_person_id, $customer_type);
}
else{ //if inserting company
}
//die($request['customers']['first_name']);
}
public function storeCustomerDetails($passed_request, $new_id, $customer_type)
{
$request2 = new Request($passed_request);
dd($request2);
$customer = Customer::create($request2::all() + ['customer_details_id' => $new_id, 'customer_type' => $customer_type]);
return "success";
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
|
--TEST--
ldap_first_attribute() - Testing ldap_first_attribute() that should fail
--CREDITS--
Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
require "connect.inc";
$link = ldap_connect($host, $port);
var_dump(ldap_first_attribute($link));
var_dump(ldap_first_attribute($link, $link));
?>
===DONE===
--EXPECTF--
Warning: ldap_first_attribute() expects %s 2 parameters, 1 given in %s on line %d
NULL
Warning: ldap_first_attribute(): supplied resource is not a valid ldap result entry resource in %s on line %d
bool(false)
===DONE===
|
<?php
namespace tinkers\exceptions;
use tinkers\ccavenue\Exception;
class CredentialNotSetException extends Exception
{
}
|
<?php
namespace Yves\Mopay\Events;
use Illuminate\Queue\SerializesModels;
use Yves\Mopay\Models\Payment;
class PaymentFailedEvent{
use SerializesModels;
public $payment = null;
public function __construct(Payment $payment) {
$this->payment = $payment;
}
}
|
<?php
namespace App\Http\Controllers;
use App\Http\Requests\ProductRequest;
use Illuminate\Http\Request;
class ContactConroller extends Controller
{
public function submit(ProductController $request)
{
$product = new ProductController();
$product -> name = $request -> input('name');
$product -> email = $request -> input('email');
$product -> message = $request -> input('message');
$product->save();
return redirect()->route('getHome');
}
public function updatePostSubmit($id,ProductRequest $request)
{
$product =Contact::find($id);
$product -> name = $request -> input('name');
$product -> email = $request -> input('email');
$product -> message = $request -> input('message');
$product->save();
return redirect()->route('allData');
}
public function allData(){
$product = new ProductController();
return view('post',['data' => $product->orderBy('id','desc') ->take(10)->get()]);
}
public function post($id){
$product =new ProductController();
return view('updatemessage',['data'=>$product->find($id)]);
}
public function deletePost($id){
ProductController::find($id)->delete();
return redirect()->route('allData');
}
}
|
<?php
/**
* Created by IntelliJ IDEA.
* User: HeSir-hws
* Date: 2019/1/14
* Time: 14:23
*/
namespace app\index\controller;
use think\Db;
use think\Loader;
class Difficultcate extends Base
{
/**
* 疑难剖析 分类列表
* @access public
* @param string $user_id 用户id
* @return json
*/
public function lis($user_id = '', $limit = '', $page = '')
{
if (!$limit) {
$limit = 10;
}
$user = Db::name('user')->where('user_id', '=', $user_id)->find();
if ($user) {
$count = Db::name('difficult_cate')->count();
$data = Db::name('difficult_cate')->where('user_id', '=', $user_id)->limit($limit)->page($page)->select();
$result = [
'count' => $count,
'data' => $data
];
return json_encode($result, JSON_UNESCAPED_UNICODE);
}
}
/**
* 疑难剖析 添加分类
* @access public
* @param string $user_id 用户id
* @param string $cate_name 分类名称
* @return json
*/
public function add($user_id = '', $difficult_cate_name = '')
{
$param = [
'user_id' => $user_id,
'difficult_cate_name' => $difficult_cate_name,
];
$user = Db::name('user')->where('user_id', '=', $user_id)->find();
if ($user) {
//validate
$validate = Loader::validate('Difficultcate');
if (!$validate->scene('add')->check($param)) {
$return = ['num' => 104, 'msg' => $validate->getError()];
return json_encode($return, JSON_UNESCAPED_UNICODE);
die;
};
$result = Db::name('difficult_cate')->insert($param);
if ($result) {
$return = ['num' => 102, 'msg' => '疑难剖析分类添加成功!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
} else {
$return = ['num' => 103, 'msg' => '疑难剖析分类添加失败!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
} else {
$return = ['num' => 101, 'msg' => '用户信息出错,请重新登录再做操作'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
}
/**
* 疑难剖析 修改分类
* @access public
* @param string $user_id 用户id
* @param string $cate_name 分类名称
* @return json
*/
public function edit($user_id = '', $difficult_cate_name = '', $difficult_cate_id = '')
{
$param = [
'user_id' => $user_id,
'difficult_cate_name' => $difficult_cate_name,
'difficult_cate_id' => $difficult_cate_id,
];
$user = Db::name('user')->where('user_id', '=', $user_id)->find();
if ($user) {
//validate
$validate = Loader::validate('Difficultcate');
if (!$validate->scene('add')->check($param)) {
$return = ['num' => 104, 'msg' => $validate->getError()];
return json_encode($return, JSON_UNESCAPED_UNICODE);
die;
};
$result = Db::name('difficult_cate')->update($param);
if ($result) {
$return = ['num' => 102, 'msg' => '疑难剖析分类修改成功!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
} else {
$return = ['num' => 103, 'msg' => '疑难剖析分类修改失败!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
} else {
$return = ['num' => 101, 'msg' => '用户信息出错,请重新登录再做操作'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
}
/**
* 疑难剖析 删除分类
* @access public
* @param string $user_id 用户id
* @param string $cate_id 分类id
* @return json
*/
public function del($user_id = '', $difficult_cate_id = '')
{
$user = Db::name('user')->where('user_id', '=', $user_id)->find();
if ($user) {
$result = Db::name('difficult_cate')->delete($difficult_cate_id);
if ($result) {
$return = ['num' => 102, 'msg' => '疑难剖析分类删除成功!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
} else {
$return = ['num' => 103, 'msg' => '疑难剖析分类删除失败!'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
} else {
$return = ['num' => 101, 'msg' => '用户账号出错,请重新登录操作'];
return json_encode($return, JSON_UNESCAPED_UNICODE);
}
}
/**
* 疑难剖析 搜索分类
* @access public
* @param string $user_id 用户id
* @param string $keywords 关键字
* @return json
*/
public function search($keywords = '', $user_id = '')
{
$user = Db::name('user')->where('user_id', '=', $user_id)->find();
$where['difficult_cate_name'] = array('like', '%' . $keywords . '%');
if ($user) {
$list = Db::name('difficult_cate')->where($where)->field('difficult_cate_id,difficult_cate_name,user_id')->select();
$count = Db::name('difficult_cate')->where($where)->count();
$result = [
'count' => $count,
'data' => $list
];
return json_encode($result, JSON_UNESCAPED_UNICODE);
}
}
}
|
<?php namespace App\Services\PremiereLeagueApi;
class BaseService
{
public function get($url){
$curl = curl_init();
$action_url = $url;
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => $this->getRandomUserAgent(),
));
$resp = curl_exec($curl);
$result = json_decode($resp, true);
return $result;
}
public function getRandomUserAgent()
{
$userAgents=array(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6",
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)",
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)",
"Opera/9.20 (Windows NT 6.0; U; en)",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.50",
"Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.02 [en]",
"Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr; rv:1.7) Gecko/20040624 Firefox/0.9",
"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/48 (like Gecko) Safari/48"
);
$random = rand(0,count($userAgents)-1);
return $userAgents[$random];
}
}
|
<?php
class Page {
public $RootDir;
public $dotenv;
public $status;
public $message;
public function __construct()
{
$this->RootDir = $GLOBALS['RootDir'];
}
public function View($view_folder_name, $view) {
$files = glob("." . DIRECTORY_SEPARATOR . $view_folder_name . DIRECTORY_SEPARATOR . $view . '.php');
require "./config/config.php";
require $files[0];
}
public function navigate_to($path, $message=[]) {
$_SESSION['status'] = $this->status = (array_keys($message)[0]) ? array_keys($message)[0] : null;
$_SESSION['message'] = $this->message = (array_values($message)[0]) ? array_values($message)[0] : null;
header("Location: " . $path);
exit();
}
public function go_back($path=null, $message = []) {
$path = ($path == null || is_array($path)) ? $_SERVER['HTTP_REFERER'] : $path;
$_SESSION['status'] = $this->status = (array_keys($message)[0]) ? array_keys($message)[0] : null;
$_SESSION['message'] = $this->message = (array_values($message)[0]) ? array_values($message)[0] : null;
header("Location: " . $path);
exit();
}
public function AuthorizationMiddleware()
{
if (strtolower($_ENV['AUTH']) == 'true') {
if (Auth::session_exists() == false) {
$this->navigate_to(strtolower($_ENV['LOGOUT_DESTINATION']), ["error" => "Login is required!"]);
}
}
}
}
|
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
</head>
<body>
</br>
</br>
</br>
</br>
<h1>Update your Task Here!</h1>
<div class="container">
<form action="/updatedata" method="post">
{{csrf_field()}}
<input type="text" class="formcontrol" name="task" value="{{$taskdata->task}}"/>
<input type="hidden" name="id" value="{{$taskdata->id}}"/>
<input type="submit" class="btn btn-warning" value="Update"/>
<input type ="button" class="btn btn-danger" value="Cancel"/>
</form>
</div>
</body>
</html>
|
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Services extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('services', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('photo');
$table->string('description');
$table->integer('slider_id')->unsigned();
$table->foreign('slider_id')->references('id')->on('sliders');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
|
@extends('user.layouts.default')
@section('content')
<section>
<div class="max-w-screen-xl mx-auto p-4" >
@if(session()->has('status'))
<p>{{ session()->get('status') }}</p>
@endif
<div class="pb-4">
<form action="">
<input type="text" id="searchProduct" class="w-full border border-gray-300 py-2 px-4 text-sm rounded-md" placeholder="Search products..." />
</form>
</div>
<div class="grid grid-cols-5 gap-4" id="responseSearch">
@forelse ($products as $product)
<div class="border rounded-md p-4">
<div class="w-full h-64 flex-justify-center items-center">
<img class="w-full" src="{{ asset('storage/'.$product->product_image->img_path) }}" alt="">
</div>
<div class="py-2">
{{ $product->title }}
</div>
<div class="py-2">
<span>${{ $product->selling_price }}</span>
<i style="text-decoration: line-through" class="text-gray-500">${{ $product->price }}</i>
</div>
<div class="flex">
<a class="py-1 px-4 text-white bg-indigo-500 rounded-md text-sm" href="{{ url('add-to-cart') }}"">Add to Cart</a>
</div>
</div>
@empty
<div>
No Product added...
</div>
@endforelse
</div>
</div>
</section>
@endsection
@section('scripts')
<script>
$("#searchProduct").on("keyup", function() {
$.ajax({
url: "{{ url('admin/search') }}",
method: 'POST',
data: {
_token: '{{ csrf_token() }}',
searchKey: $(this).val()
},
success: function(res) {
console.log(res);
$("#responseSearch").empty();
res.forEach(function(item, index){
$("#responseSearch").append(`
<div class="border rounded-md p-4">
<div class="w-full h-64 flex-justify-center items-center">
<img class="w-full" src="{{ asset('storage/${item.product_image.img_path}') }}" alt="">
</div>
<div class="py-2">
${item.title}
</div>
<div class="py-2">
<span>$${item.selling_price}</span>
<i style="text-decoration: line-through" class="text-gray-500">$${item.price}</i>
</div>
<div class="flex">
<a class="py-1 px-4 text-white bg-red-500 rounded-md text-sm" href="{{ url('admin/product/${item.id}/edit') }}">Edit</a>
<form action="{{ url('admin/product/${item.id}') }}" method="post">
@csrf
@method('DELETE')
<button type="submit" class="py-1 px-4 text-white bg-blue-500 rounded-md text-sm ml-2">Delete</button>
</form>
</div>
</div>
`);
})
}
});
})
</script>
@endsection
|
<!doctype html>
<html lang="de">
<head>
<?php include "../inc/meta.inc"; ?>
<base href="<?php echo dirname($_SERVER['SCRIPT_NAME']); ?>">
<title>KADAS Albireo: Ein vereinfachtes QGIS für jedermann – FOSSGIS 2020</title>
<link rel="stylesheet" href="./css/normalize.css">
<link rel="stylesheet" href="./css/base.css">
<link rel="stylesheet" href="./css/print.css" media="print">
</head>
<body id="programm">
<?php include "../inc/header.inc"; ?>
<!-- This file was generated by a script. Do not edit this file in Git,
edit contents in Pretalx, regenerate the PHP files and commit them
in the Git repository of the website. -->
<p><a href="programm/freitag.php#session_V8ZBMG">◄◄ zurück zum Programm</a> </p>
<h2 class='abstract-title'>KADAS Albireo: Ein vereinfachtes QGIS für jedermann</h2>
<section>
<p>
<span class='abstract-speakers'>Sandro Mani</span></p>
<p><span class='abstract-time-heading'>Zeit: </span>Freitag 13. März 11:30 Uhr<br><span class='abstract-room-heading'>Ort: </span>HS Rundbau</p>
<div class="video-container">
<a href="https://media.ccc.de/v/fossgis2020-3118-kadas-albireo-ein-vereinfachtes-qgis-fr-jedermann">
<img class="video-preview" src="video_previews/3118-hd.jpg" alt="Vorschaubild des Videos">
<div class="video-preview-overlay"></div>
</a>
</div>
<p><a href="/2020/attachments/V8ZBMG_kadas_albireo_L91fwON.pdf">Vortragsfolien (PDF) </a></p>
<p>KADAS Albireo ist eine Desktop-GIS-Anwendung, die auf dem QGIS Kern aufbaut und verschiedene QGIS-Standardfunktionen sowie spezielle Erweiterungen in einer stark vereinfachten Benutzeroberfläche einem breiten Spektrum von Endnutzer zugänglich macht.</p>
<p>Dieser Vortrag stellt die Desktop-GIS-Anwendung KADAS Albireo vor, sowohl aus Sicht der Funktionalitäten die sie dem Endnutzer anbietet, als aus Sicht der Programmarchitektur als QGIS basierte Anwendung.</p>
<div class='abstract-bio'>
<h3 class='abstract-bio-name'>Sandro Mani</h3>
<p>Software Entwickler bei Sourcepole AG</p>
</div>
</section>
<?php include "../inc/footer.inc"; ?>
</body>
</html>
|
<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
|
@extends('layoutsDashboard.dashboard')
@section('content')
<style>
.panel-heading button {
width: 100%;
}
label,
h1,
h2,
h3,
h4,
h5,
h6,
p,
input,
.form-group {
text-align: right;
font-family: 'font1';
}
</style>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">@lang('site.categories')</h1>
</div><!-- /.col -->
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item active"> @lang('site.edit')</li>
<li class="breadcrumb-item"><a href="{{route('dashboard.clients.index')}}">@lang('site.clients')</a></li>
<li class="breadcrumb-item"><a href="{{route('dashboard.index')}}">@lang('site.dashboard')</a></li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-6 col-12" style="border-top: 6px solid #28a745;">
<div class="box box-primary">
<div class="box-header">
<h6 class="box-title" style="margin-bottom: 10px">@lang('site.categories')</h6>
</div><!-- end of box header -->
<div class="box-body">
@foreach ($categories as $category)
<div class="panel-group">
<div class="panel panel-info">
<div class="panel-heading ">
<button class="panel-title panel-body btn btn-outline-success btn-sm" data-toggle="collapse" href="#{{ str_replace(' ', '-', $category->name) }}">{{ $category->name }}</button>
</div>
<div id="{{ str_replace(' ', '-', $category->name) }}" class="panel-collapse collapse">
<div class="panel-body">
@if ($category->products->count() > 0)
<table class="table table-hover">
<tr>
<th>@lang('site.name')</th>
<th>@lang('site.stock')</th>
<th>@lang('site.price')</th>
<th>@lang('site.add')</th>
</tr>
@foreach ($category->products as $product)
<tr>
<td>{{ $product->name }}</td>
<td>{{ $product->stock }}</td>
<td>{{ number_format($product->sale_price, 2) }}</td>
<td>
<a href="" id="product-{{ $product->id }}" data-name="{{ $product->name }}" data-id="{{ $product->id }}" data-price="{{ $product->sale_price }}" class="{{ in_array($product->id, $order->products->pluck('id')->toArray()) ? 'btn-default disabled' : 'btn-success add-product-btn' }} btn-sm ">
<i class="fa fa-plus"></i>
</a>
</td>
</tr>
@endforeach
</table><!-- end of table -->
@else
<h5>@lang('site.no_records')</h5>
@endif
</div><!-- end of panel body -->
</div><!-- end of panel collapse -->
</div><!-- end of panel primary -->
</div><!-- end of panel group -->
@endforeach
</div><!-- end of box body -->
</div><!-- end of box -->
</div><!-- end of col -->
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">@lang('site.orders')</h3>
</div><!-- end of box header -->
<div class="box-body">
@include('partials._errors')
<form action="{{ route('dashboard.clients.orders.update', ['order' => $order->id, 'client' => $client->id]) }}" method="post">
{{ csrf_field() }}
{{ method_field('put') }}
<table class="table table-hover">
<thead>
<tr>
<th>@lang('site.product')</th>
<th>@lang('site.quantity')</th>
<th>@lang('site.price')</th>
</tr>
</thead>
<tbody class="order-list">
@foreach ($order->products as $product)
<tr>
<td>{{ $product->name }}</td>
<td><input type="number" name="products[{{ $product->id }}][quantity]" data-price="{{ number_format($product->sale_price, 2) }}" class="form-control input-sm product-quantity" min="1" value="{{ $product->pivot->quantity }}"></td>
<td class="product-price">{{ number_format($product->sale_price * $product->pivot->quantity, 2) }}</td>
<td>
<button class="btn btn-danger btn-sm remove-product-btn" data-id="{{ $product->id }}"><span class="fa fa-trash"></span></button>
</td>
</tr>
@endforeach
</tbody>
</table><!-- end of table -->
<h4>@lang('site.total') : <span class="total-price">{{ number_format($order->total_price, 2) }}</span></h4>
<button class="btn btn-primary btn-block" id="form-btn"><i class="fa fa-edit"></i> @lang('site.edit_order')</button>
</form><!-- end of form -->
</div><!-- end of box body -->
</div><!-- end of box -->
@if ($client->orders->count() > 0)
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" style="margin-bottom: 10px">@lang('site.previous_orders')
<small>{{ $orders->total() }}</small>
</h3>
</div><!-- end of box header -->
<div class="box-body">
@foreach ($orders as $order)
<div class="panel-group">
<div class="panel panel-success">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#{{ $order->created_at->format('d-m-Y-s') }}">{{ $order->created_at->toFormattedDateString() }}</a>
</h4>
</div>
<div id="{{ $order->created_at->format('d-m-Y-s') }}" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-group">
@foreach ($order->products as $product)
<li class="list-group-item">{{ $product->name }}</li>
@endforeach
</ul>
</div><!-- end of panel body -->
</div><!-- end of panel collapse -->
</div><!-- end of panel primary -->
</div><!-- end of panel group -->
@endforeach
{{ $orders->links() }}
</div><!-- end of box body -->
</div><!-- end of box -->
@endif
</div><!-- end of col -->
</div><!-- end of row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
@endsection
|
<?php
/**
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com)
*/
namespace ZFTest\ContentNegotiation;
use PHPUnit_Framework_TestCase as TestCase;
use ReflectionObject;
use Zend\Http\Request;
use Zend\Mvc\MvcEvent;
use Zend\Mvc\Router\RouteMatch;
use Zend\Stdlib\Parameters;
use ZF\ContentNegotiation\ContentTypeListener;
use ZF\ContentNegotiation\MultipartContentParser;
use ZF\ContentNegotiation\Request as ContentNegotiationRequest;
class ContentTypeListenerTest extends TestCase
{
public function setUp()
{
$this->listener = new ContentTypeListener();
}
public function methodsWithBodies()
{
return [
'post' => ['POST'],
'patch' => ['PATCH'],
'put' => ['PUT'],
'delete' => ['DELETE'],
];
}
/**
* @group 3
* @dataProvider methodsWithBodies
*/
public function testJsonDecodeErrorsReturnsProblemResponse($method)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent('Invalid JSON data');
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertInstanceOf('ZF\ApiProblem\ApiProblemResponse', $result);
$problem = $result->getApiProblem();
$this->assertEquals(400, $problem->status);
$this->assertContains('JSON decoding', $problem->detail);
}
public function multipartFormDataMethods()
{
return [
'patch' => ['patch'],
'put' => ['put'],
'delete' => ['delete'],
];
}
/**
* @dataProvider multipartFormDataMethods
*/
public function testCanDecodeMultipartFormDataRequestsForPutPatchAndDeleteOperations($method)
{
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine(
'Content-Type',
'multipart/form-data; boundary=6603ddd555b044dc9a022f3ad9281c20'
);
$request->setContent(file_get_contents(__DIR__ . '/TestAsset/multipart-form-data.txt'));
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$listener = $this->listener;
$result = $listener($event);
$parameterData = $event->getParam('ZFContentNegotiationParameterData');
$params = $parameterData->getBodyParams();
$this->assertEquals([
'mime_type' => 'md',
], $params);
$files = $request->getFiles();
$this->assertEquals(1, $files->count());
$file = $files->get('text');
$this->assertInternalType('array', $file);
$this->assertArrayHasKey('error', $file);
$this->assertArrayHasKey('name', $file);
$this->assertArrayHasKey('tmp_name', $file);
$this->assertArrayHasKey('size', $file);
$this->assertArrayHasKey('type', $file);
$this->assertEquals('README.md', $file['name']);
$this->assertRegexp('/^zfc/', basename($file['tmp_name']));
$this->assertTrue(file_exists($file['tmp_name']));
}
/**
* @dataProvider multipartFormDataMethods
*/
public function testCanDecodeMultipartFormDataRequestsFromStreamsForPutAndPatchOperations($method)
{
$request = new ContentNegotiationRequest();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine(
'Content-Type',
'multipart/form-data; boundary=6603ddd555b044dc9a022f3ad9281c20'
);
$request->setContentStream('file://' . realpath(__DIR__ . '/TestAsset/multipart-form-data.txt'));
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$listener = $this->listener;
$result = $listener($event);
$parameterData = $event->getParam('ZFContentNegotiationParameterData');
$params = $parameterData->getBodyParams();
$this->assertEquals([
'mime_type' => 'md',
], $params);
$files = $request->getFiles();
$this->assertEquals(1, $files->count());
$file = $files->get('text');
$this->assertInternalType('array', $file);
$this->assertArrayHasKey('error', $file);
$this->assertArrayHasKey('name', $file);
$this->assertArrayHasKey('tmp_name', $file);
$this->assertArrayHasKey('size', $file);
$this->assertArrayHasKey('type', $file);
$this->assertEquals('README.md', $file['name']);
$this->assertRegexp('/^zfc/', basename($file['tmp_name']));
$this->assertTrue(file_exists($file['tmp_name']));
}
public function testDecodingMultipartFormDataWithFileRegistersFileCleanupEventListener()
{
$request = new Request();
$request->setMethod('PATCH');
$request->getHeaders()->addHeaderLine(
'Content-Type',
'multipart/form-data; boundary=6603ddd555b044dc9a022f3ad9281c20'
);
$request->setContent(file_get_contents(__DIR__ . '/TestAsset/multipart-form-data.txt'));
$target = new TestAsset\EventTarget();
$events = $this->getMock('Zend\EventManager\EventManagerInterface');
$events->expects($this->once())
->method('attach')
->with(
$this->equalTo('finish'),
$this->equalTo([$this->listener, 'onFinish']),
$this->equalTo(1000)
);
$target->events = $events;
$event = new MvcEvent();
$event->setTarget($target);
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$listener = $this->listener;
$result = $listener($event);
}
public function testOnFinishWillRemoveAnyUploadFilesUploadedByTheListener()
{
$tmpDir = MultipartContentParser::getUploadTempDir();
$tmpFile = tempnam($tmpDir, 'zfc');
file_put_contents($tmpFile, 'File created by ' . __CLASS__);
$files = new Parameters([
'test' => [
'error' => UPLOAD_ERR_OK,
'name' => 'test.txt',
'type' => 'text/plain',
'tmp_name' => $tmpFile,
'size' => filesize($tmpFile),
],
]);
$request = new Request();
$request->setFiles($files);
$event = new MvcEvent();
$event->setRequest($request);
$r = new ReflectionObject($this->listener);
$p = $r->getProperty('uploadTmpDir');
$p->setAccessible(true);
$p->setValue($this->listener, $tmpDir);
$this->listener->onFinish($event);
$this->assertFalse(file_exists($tmpFile));
}
public function testOnFinishDoesNotRemoveUploadFilesTheListenerDidNotCreate()
{
$tmpDir = MultipartContentParser::getUploadTempDir();
$tmpFile = tempnam($tmpDir, 'php');
file_put_contents($tmpFile, 'File created by ' . __CLASS__);
$files = new Parameters([
'test' => [
'error' => UPLOAD_ERR_OK,
'name' => 'test.txt',
'type' => 'text/plain',
'tmp_name' => $tmpFile,
'size' => filesize($tmpFile),
],
]);
$request = new Request();
$request->setFiles($files);
$event = new MvcEvent();
$event->setRequest($request);
$this->listener->onFinish($event);
$this->assertTrue(file_exists($tmpFile));
unlink($tmpFile);
}
public function testOnFinishDoesNotRemoveUploadFilesThatHaveBeenMoved()
{
$tmpDir = sys_get_temp_dir() . '/' . str_replace('\\', '_', __CLASS__);
mkdir($tmpDir);
$tmpFile = tempnam($tmpDir, 'zfc');
$files = new Parameters([
'test' => [
'error' => UPLOAD_ERR_OK,
'name' => 'test.txt',
'type' => 'text/plain',
'tmp_name' => $tmpFile,
],
]);
$request = new Request();
$request->setFiles($files);
$event = new MvcEvent();
$event->setRequest($request);
$this->listener->onFinish($event);
$this->assertTrue(file_exists($tmpFile));
unlink($tmpFile);
rmdir($tmpDir);
}
/**
* @group 35
* @dataProvider methodsWithBodies
*/
public function testWillNotAttemptToInjectNullValueForBodyParams($method)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent('');
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals([], $params->getBodyParams());
}
public function methodsWithBlankBodies()
{
return [
'post-space' => ['POST', ' '],
'post-lines' => ['POST', "\n\n"],
'post-lines-and-space' => ['POST', " \n \n"],
'patch-space' => ['PATCH', ' '],
'patch-lines' => ['PATCH', "\n\n"],
'patch-lines-and-space' => ['PATCH', " \n \n"],
'put-space' => ['PUT', ' '],
'put-lines' => ['PUT', "\n\n"],
'put-lines-and-space' => ['PUT', " \n \n"],
'delete-space' => ['DELETE', ' '],
'delete-lines' => ['DELETE', "\n\n"],
'delete-lines-and-space' => ['DELETE', " \n \n"],
];
}
/**
* @group 36
* @dataProvider methodsWithBlankBodies
*/
public function testWillNotAttemptToInjectNullValueForBodyParamsWhenContentIsWhitespace($method, $content)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent($content);
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals([], $params->getBodyParams());
}
public function methodsWithLeadingWhitespace()
{
return [
'post-space' => ['POST', ' {"foo": "bar"}'],
'post-lines' => ['POST', "\n\n{\"foo\": \"bar\"}"],
'post-lines-and-space' => ['POST', " \n \n{\"foo\": \"bar\"}"],
'patch-space' => ['PATCH', ' {"foo": "bar"}'],
'patch-lines' => ['PATCH', "\n\n{\"foo\": \"bar\"}"],
'patch-lines-and-space' => ['PATCH', " \n \n{\"foo\": \"bar\"}"],
'put-space' => ['PUT', ' {"foo": "bar"}'],
'put-lines' => ['PUT', "\n\n{\"foo\": \"bar\"}"],
'put-lines-and-space' => ['PUT', " \n \n{\"foo\": \"bar\"}"],
'delete-space' => ['DELETE', ' {"foo": "bar"}'],
'delete-lines' => ['DELETE', "\n\n{\"foo\": \"bar\"}"],
'delete-lines-and-space' => ['DELETE', " \n \n{\"foo\": \"bar\"}"],
];
}
/**
* @group 36
* @dataProvider methodsWithLeadingWhitespace
*/
public function testWillHandleJsonContentWithLeadingWhitespace($method, $content)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent($content);
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals(['foo' => 'bar'], $params->getBodyParams());
}
public function methodsWithTrailingWhitespace()
{
return [
'post-space' => ['POST', '{"foo": "bar"} '],
'post-lines' => ['POST', "{\"foo\": \"bar\"}\n\n"],
'post-lines-and-space' => ['POST', "{\"foo\": \"bar\"} \n \n"],
'patch-space' => ['PATCH', '{"foo": "bar"} '],
'patch-lines' => ['PATCH', "{\"foo\": \"bar\"}\n\n"],
'patch-lines-and-space' => ['PATCH', "{\"foo\": \"bar\"} \n \n"],
'put-space' => ['PUT', '{"foo": "bar"} '],
'put-lines' => ['PUT', "{\"foo\": \"bar\"}\n\n"],
'put-lines-and-space' => ['PUT', "{\"foo\": \"bar\"} \n \n"],
'delete-space' => ['DELETE', '{"foo": "bar"} '],
'delete-lines' => ['DELETE', "{\"foo\": \"bar\"}\n\n"],
'delete-lines-and-space' => ['DELETE', "{\"foo\": \"bar\"} \n \n"],
];
}
/**
* @group 36
* @dataProvider methodsWithTrailingWhitespace
*/
public function testWillHandleJsonContentWithTrailingWhitespace($method, $content)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent($content);
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals(['foo' => 'bar'], $params->getBodyParams());
}
public function methodsWithLeadingAndTrailingWhitespace()
{
return [
'post-space' => ['POST', ' {"foo": "bar"} '],
'post-lines' => ['POST', "\n\n{\"foo\": \"bar\"}\n\n"],
'post-lines-and-space' => ['POST', " \n \n{\"foo\": \"bar\"} \n \n"],
'patch-space' => ['PATCH', ' {"foo": "bar"} '],
'patch-lines' => ['PATCH', "\n\n{\"foo\": \"bar\"}\n\n"],
'patch-lines-and-space' => ['PATCH', " \n \n{\"foo\": \"bar\"} \n \n"],
'put-space' => ['PUT', ' {"foo": "bar"} '],
'put-lines' => ['PUT', "\n\n{\"foo\": \"bar\"}\n\n"],
'put-lines-and-space' => ['PUT', " \n \n{\"foo\": \"bar\"} \n \n"],
'delete-space' => ['DELETE', ' {"foo": "bar"} '],
'delete-lines' => ['DELETE', "\n\n{\"foo\": \"bar\"}\n\n"],
'delete-lines-and-space' => ['DELETE', " \n \n{\"foo\": \"bar\"} \n \n"],
];
}
/**
* @group 36
* @dataProvider methodsWithLeadingAndTrailingWhitespace
*/
public function testWillHandleJsonContentWithLeadingAndTrailingWhitespace($method, $content)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent($content);
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals(['foo' => 'bar'], $params->getBodyParams());
}
public function methodsWithWhitespaceInsideBody()
{
return [
'post-space' => ['POST', '{"foo": "bar foo"}'],
'patch-space' => ['PATCH', '{"foo": "bar foo"}'],
'put-space' => ['PUT', '{"foo": "bar foo"}'],
'delete-space' => ['DELETE', '{"foo": "bar foo"}'],
];
}
/**
* @dataProvider methodsWithWhitespaceInsideBody
*/
public function testWillNotRemoveWhitespaceInsideBody($method, $content)
{
$listener = $this->listener;
$request = new Request();
$request->setMethod($method);
$request->getHeaders()->addHeaderLine('Content-Type', 'application/json');
$request->setContent($content);
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$result = $listener($event);
$this->assertNull($result);
$params = $event->getParam('ZFContentNegotiationParameterData');
$this->assertEquals(['foo' => 'bar foo'], $params->getBodyParams());
}
/**
* @group 42
*/
public function testReturns400ResponseWhenBodyPartIsMissingName()
{
$request = new Request();
$request->setMethod('PUT');
$request->getHeaders()->addHeaderLine(
'Content-Type',
'multipart/form-data; boundary=6603ddd555b044dc9a022f3ad9281c20'
);
$request->setContent(file_get_contents(__DIR__ . '/TestAsset/multipart-form-data-missing-name.txt'));
$event = new MvcEvent();
$event->setRequest($request);
$event->setRouteMatch(new RouteMatch([]));
$listener = $this->listener;
$result = $listener($event);
$this->assertInstanceOf('ZF\ApiProblem\ApiProblemResponse', $result);
$this->assertEquals(400, $result->getStatusCode());
$details = $result->getApiProblem()->toArray();
$this->assertContains('does not contain a "name" field', $details['detail']);
}
}
|
<?php
namespace App\Services;
use App\Services\RequestTrait;
use Illuminate\Auth\GuardHelpers;
use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Guard as GuardContract;
use Illuminate\Support\Facades\Log;
class JWTGuard implements GuardContract {
use GuardHelpers, RequestTrait;
/**
*
* @var \App\Services\JWTAuth;
*/
protected $jwtAuth;
public function __construct(JWTAuth $jwtAuth, UserProvider $provider, Request $request) {
$this->jwtAuth = $jwtAuth;
$this->provider = $provider;
$this->request = $request;
}
/**
* Get the currently authenticated user.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function user() {
// If we've already retrieved the user for the current request we can just
// return it back immediately. We do not want to fetch the user data on
// every call to this method because that would be tremendously slow.
if (! is_null($this->user)) {
return $this->user;
}
$this->user = null;
$tokenString = $this->jwtAuth->getToken();
if($this->jwtAuth->verifyToken($tokenString)) {
$this->user = $this->jwtAuth->checkToken($tokenString);
}
return $this->user;
}
/**
* Validate a user's credentials.
*
* @param array $credentials
*
* @return bool
*/
public function validate(array $credentials = []) {
$user = $this->provider->retrieveByCredentials($credentials);
return $this->hasValidCredentials($user, $credentials);
}
/**
* Attempt to authenticate the user using the given credentials and return the token.
*
* @param array $credentials
* @param bool $login
*
* @return mixed
*/
public function attempt(array $credentials = []) {
Log::debug('Attemp to authenticate');
$user = $this->provider->retrieveByCredentials($credentials);
if ($this->hasValidCredentials($user, $credentials)) {
return $this->login($user, $credentials);
}
return false;
}
/**
* Determine if the user matches the credentials.
*
* @param mixed $user
* @param array $credentials
*
* @return bool
*/
protected function hasValidCredentials($user, $credentials) {
return !is_null($user) && $this->provider->validateCredentials($user, $credentials);
}
/**
* Log a user into the application. Create access token for the user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
*
* @return token
*/
public function login(Authenticatable $user) {
$token = $this->jwtAuth->newAuthenticationToken($user);
$this->setUser($user);
return $token;
}
/**
* Log the user out of the application.
*
* @return void
*/
public function logout() {
$this->jwtAuth->invalidateToken();
$this->user = null;
}
}
|
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Reponse extends Model
{
use HasFactory;
protected $fillebl = [
'id_reponse',
'id_question',
'lib_reponse',
'corect'
];
}
|
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->multiLineString('content');
$table->multiLineString('adminContent');
$table->string('tags');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('posts');
}
}
|
<?php
/**
* Created by Cristian.
* Date: 11/09/16 09:00 PM.
*/
namespace Reliese\Coders\Model;
use Illuminate\Support\Arr;
use Reliese\Meta\Blueprint;
class Config
{
/**
* @var array
*/
protected $config;
/**
* ModelConfig constructor.
*
* @param array $config
*/
public function __construct($config = [])
{
$this->config = $config;
}
/**
* @param \Reliese\Meta\Blueprint $blueprint
* @param string $key
* @param mixed $default
*
* @return mixed
*/
public function get(Blueprint $blueprint, $key, $default = null)
{
$default = Arr::get($this->config, "*.$key", $default);
$schema = Arr::get($this->config, "{$blueprint->schema()}.$key", $default);
$specific = Arr::get($this->config, "{$blueprint->qualifiedTable()}.$key", $schema);
return $specific;
}
}
|
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit408c4c8dc3ba733922a905f7c1476446
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit408c4c8dc3ba733922a905f7c1476446', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit408c4c8dc3ba733922a905f7c1476446', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit408c4c8dc3ba733922a905f7c1476446::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit408c4c8dc3ba733922a905f7c1476446::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire408c4c8dc3ba733922a905f7c1476446($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire408c4c8dc3ba733922a905f7c1476446($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
|
<?php
class home extends CI_Controller{
function __construct() {
parent::__construct();
$this->load->model('model_post');
$this->load->model('model_comment');
$this->load->model('model_system_user');
$this->load->library('form_validation');
$this->load->helper(array('form', 'url'));
if(empty($this->session->userdata('email'))||$this->session->userdata('user_type')!='user'){
redirect('login');
}
}
public function index(){
if(empty($this->session->userdata('email'))&&1==2){
// $this->load->view('./user/view_profile');
} else {
$this->load->view('./user/view_profile');
}
}
// time line
public function time_line(){
$this->load->view('./user/view_time_line');
}
public function about(){
$this->load->view('./user/view_about');
}
public function followers(){
$this->load->view('./user/view_followers');
}
public function freinds(){
$this->load->view('./user/view_freinds');
}
public function photos(){
$this->load->view('./user/view_photos');
}
public function do_upload(){
$config['upload_path'] = './uploads/posts';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 1000;
$config['max_width'] = 1024;
$config['max_height'] = 768;
//config the image details
$this->load->library('upload', $config);
//check whether the img is uploaded succesfully
if ( $this->upload->do_upload('img')==FALSE)
{
//get errors for the upload
$error = array('error' => $this->upload->display_errors());
//give the errors to disply
$this->load->view('./user/view_profile', $error);
}
else
{
$img_info = array('upload_data' => $this->upload->data());
$this->get_value($img_info);
}
}
public function get_value($img_info){
$this->form_validation->set_rules('title', 'Title', 'trim');
$this->form_validation->set_rules('content', 'Content', 'trim');
if($this->form_validation->run()==FALSE){
$this->load->view('./user/view_profile');
}else{
if( $this->model_post->add_a_post($img_info)){//bolean true
redirect('./users/home');
}
}
}
public function delete_a_post($post_id){
if($this->model_post->delete_a_post_by_id($post_id)){
redirect('./users/home');
}
}
public function make_comments($post_id){
if($_POST){
$this->form_validation->set_rules('comment_contentt', 'Comment', 'trim');
if($this->form_validation->run()){
if($this->model_comment->add_comment_for_a_post($post_id)){
// $this->load->view('./astrologer/view_profile');
redirect('./users/home');
}
} else {
$this->load->view('./astrologer/view_profile');
}
}
}
public function delete_a_comment($comment_id){
if($this->model_comment->delete_a_comment_by_id($comment_id)){
redirect('./astrologers/home');
}
}
// ----------------------------like operations------------------------
public function add_a_like($post_id){
if($this->model_post->add_like_for_post($post_id)){
redirect('./users/home');
}
}
public function remove_a_like($post_id){
if($this->model_post->remove_like_for_post($post_id)){
redirect('./users/home');
}
}
public function get_number_of_likes_for_a_post($post_id){
if($this->model_post->remove_like_for_post($post_id)){
redirect('./users/home');
}
}
}
?>
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Application_model extends CI_Model {
public $password_hash;
public $password_salt;
public $username;
public $fullname;
public $email;
public $location;
public $createdAt;
public $updatedAt;
public $collection;
public function __construct()
{
parent::__construct();
}
public function createApplication($application_details) {
$this->load->model('referral_model');
$collection = "Application";
$createdAt = new DateTime();
$updatedAt = new DateTime();
$email = "";
$application_id = uniqid();
$job_id = "";
$name = "";
$linkedin = "";
$referred_from = "";
$referral_chain = [];
if(isset($application_details['name'])) {
$name = $application_details['name'];
}
if(isset($application_details['email'])) {
$email = $application_details['email'];
}
if(isset($application_details['linkedin'])) {
$linkedin = $application_details['linkedin'];
}
if(isset($application_details['job_id'])) {
$job_id = $application_details['job_id'];
}
if(isset($application_details['referred_from'])) {
$referred_from = $application_details['referred_from'];
$referral_details = $this->referral_model->fetchReferralDetails($referred_from);
if(isset($referral_details['referral_chain'])) {
$referral_chain = json_decode($referral_details['referral_chain'],true);
}
}
//return 'fsdfdfd '. $referral_from;
//die();
if(strlen($referred_from) > 0) {
//return 'fdfsfdfd '.$referral_from;
$newApplication = array(
'createdAt' => $createdAt,
'updatedAt' => $updatedAt,
'job_id' => $job_id,
'application_id' => $application_id,
'referred_from' => $referred_from,
"linkedin" => $linkedin,
'email' => $email,
'name' => $name,
'referral_chain' => json_encode($referral_chain)
);
} else {
$newApplication = array(
'createdAt' => $createdAt,
'updatedAt' => $updatedAt,
'job_id' => $job_id,
'application_id' => $application_id,
'linkedin' => $linkedin,
'email' => $email,
'name' => $name,
'referral_chain' => json_encode($referral_chain)
);
}
$this->mlabapi->insert($collection, $newApplication);
return $newApplication;
}
public function fetchCandidatesCurrentJob($job_id) {
$collection = "Application";
if(isset($job_id)) {
$result = $this->mlabapi->fetchApplication($collection, array('job_id' => $job_id));
if(count($result) > 0) {
return $result;
}
}
return $result;
}
public function updateApplication($referral_details) {
$collection = "Application";
$newJob = array(
);
$this->mlabapi->insert($collection, $newJob);
}
public function fetchJobsCurrentUser() {
$collection = "Job";
$result = [];
if($this->session->userdata('user_id')) {
$user_id = $this->session->userdata('user_id');
$result = $this->mlabapi->fetchJobs($collection, array('user_id' => $user_id));
}
return $result;
}
public function fetchJobDetails($job_id) {
$collection = "Job";
$result = [];
if(isset($job_id)) {
$result = $this->mlabapi->fetchJob($collection, array('job_code' => $job_id));
if(count($result) > 0) {
return $result[0];
}
}
return $result;
}
}
|
<?php
namespace BlogBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ArticleType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('slug')
->add('titre')
->add('cat')
->add('contenu')
->add('dateAjout')
->add('dateModif')
->add('resume')
->add('categorie')
->add('user')
->add('commentaire');
}/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'BlogBundle\Entity\Article'
));
}
/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return 'blogbundle_article';
}
}
|
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
?>
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'email') ?>
<div class="form-group">
<?= Html::submitButton('Submit', ['class'=> 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'http://localhost/THANOOLUK';
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';
/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| Allow $_GET array
|--------------------------------------------------------------------------
|
| By default CodeIgniter enables access to the $_GET array. If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['allow_get_array'] = TRUE;
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
| integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| Date Format for Logs
|--------------------------------------------------------------------------
|
| Each item that is logged has an associated date. You can use PHP date
| codes to set your own date formatting
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
| FALSE = Disabled
| TRUE = Enabled, take all query parameters into account.
| Please be aware that this may result in numerous cache
| files generated for the same page over and over again.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
| Whether to match the user's IP address when reading the session data.
|
| WARNING: If you're using the database driver, don't forget to update
| your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
| Whether to destroy session data associated with the old session ID
| when auto-regenerating the session ID. When set to FALSE, the data
| will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
| Global XSS Filtering
|--------------------------------------------------------------------------
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery
|--------------------------------------------------------------------------
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
| checked on a submitted form. If you are accepting user data, it is strongly
| recommended CSRF protection be enabled.
|
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
|
<form action="{{ route('statuses.store') }}" method="post">
@include('shared._errors')
{{ csrf_field() }}
<textarea rows="3" class="form-control" name="content" placeholder="聊聊新鲜事...">{{ old('content') }}</textarea>
<button type="submit" class="btn btn-primary pull-right">发布</button>
</form>
|
<?php
/**
* Quantum PHP Framework
*
* An open source software development framework for PHP
*
* @package Quantum
* @author Arman Ag. <arman.ag@softberg.org>
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
* @link http://quantum.softberg.org/
* @since 2.4.0
*/
namespace Quantum\Http\Request;
/**
* Trait Url
* @package Quantum\Http\Request
*/
trait Url
{
/**
* Scheme
* @var string
*/
private static $__protocol = null;
/**
* Host name
* @var string
*/
private static $__host = null;
/**
* Server port
* @var string
*/
private static $__port = null;
/**
* Request URI
* @var string
*/
private static $__uri = null;
/**
* Gets the protocol
* @return string
*/
public static function getProtocol(): ?string
{
return self::$__protocol;
}
/**
* Sets the protocol
* @param string $protocol
*/
public static function setProtocol(string $protocol)
{
self::$__protocol = $protocol;
}
/**
* Gets the host name
* @return string
*/
public static function getHost(): ?string
{
return self::$__host;
}
/**
* Sets the host name
* @param string $host
*/
public static function setHost(string $host)
{
self::$__host = $host;
}
/**
* Gets the port
* @return string
*/
public static function getPort(): ?string
{
return self::$__port;
}
/**
* Sets the port
* @param string $port
*/
public static function setPort(string $port)
{
self::$__port = $port;
}
/**
* Gets the URI
* @return string|null
*/
public static function getUri(): ?string
{
return self::$__uri;
}
/**
* Sets the URI
* @param string $uri
*/
public static function setUri(string $uri)
{
self::$__uri = ltrim($uri, '/');
}
}
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Login_model extends CI_Model {
function create($data) {
//Bentuk Umum: $this->db->insert("nama_tabel", $data);
$this->db->insert("t_login", $data);
}
function read($where="", $order="") {
if(!empty($where)) $this->db->where($where);
if(!empty($order)) $this->db->where($order);
$query = $this->db->get("t_login");
if($query AND $query->num_rows() != 0) {
return $query->result();
} else {
return array();
}
}
}
?>
|
<?php
namespace App\Models\auth;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class UserFilter extends QueryFilter
{
public function rules(): array
{
return [
'search' => 'filled',
'state' => 'in:active,inactive',
'role' => 'in:admin,user',
'skills' => 'array|exists:skills,id',
'from' => 'date_format:d/m/Y',
'to' => 'date_format:d/m/Y',
];
}
public function search($query, $search)
{
return $query->where(function ($query) use ($search) {
$query->where('name', 'like', "%{$search}%")
->orWhere('email', 'like', "%{$search}%")
->orWhereHas('team', function ($query) use ($search) {
$query->where('name', 'like', "%{$search}%");
});
});
}
public function state($query, $state)
{
return $query->where('active', $state == 'active');
}
public function skills($query, $skills)
{
$subquery = DB::table('user_skill AS s')
->selectRaw('COUNT(`s`.`id`)')
->whereColumn('s.user_id', 'users.id')
->whereIn('skill_id', $skills);
$query->whereQuery($subquery, count($skills));
}
public function from($query, $date)
{
$date = Carbon::createFromFormat('d/m/Y', $date);
$query->whereDate('created_at', '>=', $date);
}
public function to($query, $date)
{
$date = Carbon::createFromFormat('d/m/Y', $date);
$query->whereDate('created_at', '<=', $date);
}
}
|
<?php
/**
* This file is part of the Nette Framework (http://nette.org)
*
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*
* For the full copyright and license information, please view
* the file license.txt that was distributed with this source code.
*/
namespace Nette\Mail;
use Nette,
Nette\Utils\Strings;
/**
* Mail provides functionality to compose and send both text and MIME-compliant multipart email messages.
*
* @author David Grudl
*
* @property array $from
* @property string $subject
* @property string $returnPath
* @property int $priority
* @property mixed $htmlBody
* @property IMailer $mailer
*/
class Message extends MimePart
{
/** Priority */
const HIGH = 1,
NORMAL = 3,
LOW = 5;
/** @var IMailer */
public static $defaultMailer = 'Nette\Mail\SendmailMailer';
/** @var array */
public static $defaultHeaders = array(
'MIME-Version' => '1.0',
'X-Mailer' => 'Nette Framework',
);
/** @var IMailer */
private $mailer;
/** @var array */
private $attachments = array();
/** @var array */
private $inlines = array();
/** @var mixed */
private $html;
/** @var string */
private $basePath;
public function __construct()
{
foreach (static::$defaultHeaders as $name => $value) {
$this->setHeader($name, $value);
}
$this->setHeader('Date', date('r'));
}
/**
* Sets the sender of the message.
* @param string email or format "John Doe" <doe@example.com>
* @param string
* @return Message provides a fluent interface
*/
public function setFrom($email, $name = NULL)
{
$this->setHeader('From', $this->formatEmail($email, $name));
return $this;
}
/**
* Returns the sender of the message.
* @return array
*/
public function getFrom()
{
return $this->getHeader('From');
}
/**
* Adds the reply-to address.
* @param string email or format "John Doe" <doe@example.com>
* @param string
* @return Message provides a fluent interface
*/
public function addReplyTo($email, $name = NULL)
{
$this->setHeader('Reply-To', $this->formatEmail($email, $name), TRUE);
return $this;
}
/**
* Sets the subject of the message.
* @param string
* @return Message provides a fluent interface
*/
public function setSubject($subject)
{
$this->setHeader('Subject', $subject);
return $this;
}
/**
* Returns the subject of the message.
* @return string
*/
public function getSubject()
{
return $this->getHeader('Subject');
}
/**
* Adds email recipient.
* @param string email or format "John Doe" <doe@example.com>
* @param string
* @return Message provides a fluent interface
*/
public function addTo($email, $name = NULL) // addRecipient()
{
$this->setHeader('To', $this->formatEmail($email, $name), TRUE);
return $this;
}
/**
* Adds carbon copy email recipient.
* @param string email or format "John Doe" <doe@example.com>
* @param string
* @return Message provides a fluent interface
*/
public function addCc($email, $name = NULL)
{
$this->setHeader('Cc', $this->formatEmail($email, $name), TRUE);
return $this;
}
/**
* Adds blind carbon copy email recipient.
* @param string email or format "John Doe" <doe@example.com>
* @param string
* @return Message provides a fluent interface
*/
public function addBcc($email, $name = NULL)
{
$this->setHeader('Bcc', $this->formatEmail($email, $name), TRUE);
return $this;
}
/**
* Formats recipient email.
* @param string
* @param string
* @return array
*/
private function formatEmail($email, $name)
{
if (!$name && preg_match('#^(.+) +<(.*)>$#', $email, $matches)) {
return array($matches[2] => $matches[1]);
} else {
return array($email => $name);
}
}
/**
* Sets the Return-Path header of the message.
* @param string email
* @return Message provides a fluent interface
*/
public function setReturnPath($email)
{
$this->setHeader('Return-Path', $email);
return $this;
}
/**
* Returns the Return-Path header.
* @return string
*/
public function getReturnPath()
{
return $this->getHeader('From');
}
/**
* Sets email priority.
* @param int
* @return Message provides a fluent interface
*/
public function setPriority($priority)
{
$this->setHeader('X-Priority', (int) $priority);
return $this;
}
/**
* Returns email priority.
* @return int
*/
public function getPriority()
{
return $this->getHeader('X-Priority');
}
/**
* Sets HTML body.
* @param string|Nette\Templating\ITemplate
* @param mixed base-path or FALSE to disable parsing
* @return Message provides a fluent interface
*/
public function setHtmlBody($html, $basePath = NULL)
{
$this->html = $html;
$this->basePath = $basePath;
return $this;
}
/**
* Gets HTML body.
* @return mixed
*/
public function getHtmlBody()
{
return $this->html;
}
/**
* Adds embedded file.
* @param string
* @param string
* @param string
* @return MimePart
*/
public function addEmbeddedFile($file, $content = NULL, $contentType = NULL)
{
return $this->inlines[$file] = $this->createAttachment($file, $content, $contentType, 'inline')
->setHeader('Content-ID', $this->getRandomId());
}
/**
* Adds attachment.
* @param string
* @param string
* @param string
* @return MimePart
*/
public function addAttachment($file, $content = NULL, $contentType = NULL)
{
return $this->attachments[] = $this->createAttachment($file, $content, $contentType, 'attachment');
}
/**
* Creates file MIME part.
* @return MimePart
*/
private function createAttachment($file, $content, $contentType, $disposition)
{
$part = new MimePart;
if ($content === NULL) {
$content = file_get_contents($file);
if ($content === FALSE) {
throw new Nette\FileNotFoundException("Unable to read file '$file'.");
}
} else {
$content = (string) $content;
}
$part->setBody($content);
$part->setContentType($contentType ? $contentType : Nette\Utils\MimeTypeDetector::fromString($content));
$part->setEncoding(preg_match('#(multipart|message)/#A', $contentType) ? self::ENCODING_8BIT : self::ENCODING_BASE64);
$part->setHeader('Content-Disposition', $disposition . '; filename="' . Strings::fixEncoding(basename($file)) . '"');
return $part;
}
/********************* building and sending ****************d*g**/
/**
* Sends email.
* @return void
*/
public function send()
{
$this->getMailer()->send($this->build());
}
/**
* Sets the mailer.
* @param IMailer
* @return Message provides a fluent interface
*/
public function setMailer(IMailer $mailer)
{
$this->mailer = $mailer;
return $this;
}
/**
* Returns mailer.
* @return IMailer
*/
public function getMailer()
{
if ($this->mailer === NULL) {
$this->mailer = is_object(static::$defaultMailer) ? static::$defaultMailer : new static::$defaultMailer;
}
return $this->mailer;
}
/**
* Returns encoded message.
* @return string
*/
public function generateMessage()
{
if ($this->getHeader('Message-ID')) {
return parent::generateMessage();
} else {
return $this->build()->generateMessage();
}
}
/**
* Builds email. Does not modify itself, but returns a new object.
* @return Message
*/
protected function build()
{
$mail = clone $this;
$mail->setHeader('Message-ID', $this->getRandomId());
$mail->buildHtml();
$mail->buildText();
$cursor = $mail;
if ($mail->attachments) {
$tmp = $cursor->setContentType('multipart/mixed');
$cursor = $cursor->addPart();
foreach ($mail->attachments as $value) {
$tmp->addPart($value);
}
}
if ($mail->html != NULL) { // intentionally ==
$tmp = $cursor->setContentType('multipart/alternative');
$cursor = $cursor->addPart();
$alt = $tmp->addPart();
if ($mail->inlines) {
$tmp = $alt->setContentType('multipart/related');
$alt = $alt->addPart();
foreach ($mail->inlines as $name => $value) {
$tmp->addPart($value);
}
}
$alt->setContentType('text/html', 'UTF-8')
->setEncoding(preg_match('#\S{990}#', $mail->html)
? self::ENCODING_QUOTED_PRINTABLE
: (preg_match('#[\x80-\xFF]#', $mail->html) ? self::ENCODING_8BIT : self::ENCODING_7BIT))
->setBody($mail->html);
}
$text = $mail->getBody();
$mail->setBody(NULL);
$cursor->setContentType('text/plain', 'UTF-8')
->setEncoding(preg_match('#\S{990}#', $text)
? self::ENCODING_QUOTED_PRINTABLE
: (preg_match('#[\x80-\xFF]#', $text) ? self::ENCODING_8BIT : self::ENCODING_7BIT))
->setBody($text);
return $mail;
}
/**
* Builds HTML content.
* @return void
*/
protected function buildHtml()
{
if ($this->html instanceof Nette\Templating\ITemplate) {
$this->html->mail = $this;
if ($this->basePath === NULL && $this->html instanceof Nette\Templating\IFileTemplate) {
$this->basePath = dirname($this->html->getFile());
}
$this->html = $this->html->__toString(TRUE);
}
if ($this->basePath !== FALSE) {
$cids = array();
$matches = Strings::matchAll(
$this->html,
'#(src\s*=\s*|background\s*=\s*|url\()(["\'])(?![a-z]+:|[/\\#])(.+?)\\2#i',
PREG_OFFSET_CAPTURE
);
foreach (array_reverse($matches) as $m) {
$file = rtrim($this->basePath, '/\\') . '/' . $m[3][0];
if (!isset($cids[$file])) {
$cids[$file] = substr($this->addEmbeddedFile($file)->getHeader("Content-ID"), 1, -1);
}
$this->html = substr_replace($this->html,
"{$m[1][0]}{$m[2][0]}cid:{$cids[$file]}{$m[2][0]}",
$m[0][1], strlen($m[0][0])
);
}
}
if (!$this->getSubject() && $matches = Strings::match($this->html, '#<title>(.+?)</title>#is')) {
$this->setSubject(html_entity_decode($matches[1], ENT_QUOTES, 'UTF-8'));
}
}
/**
* Builds text content.
* @return void
*/
protected function buildText()
{
$text = $this->getBody();
if ($text instanceof Nette\Templating\ITemplate) {
$text->mail = $this;
$this->setBody($text->__toString(TRUE));
} elseif ($text == NULL && $this->html != NULL) { // intentionally ==
$text = Strings::replace($this->html, array(
'#<(style|script|head).*</\\1>#Uis' => '',
'#<t[dh][ >]#i' => " $0",
'#[\r\n]+#' => ' ',
'#<(/?p|/?h\d|li|br|/tr)[ >/]#i' => "\n$0",
));
$text = html_entity_decode(strip_tags($text), ENT_QUOTES, 'UTF-8');
$text = Strings::replace($text, '#[ \t]+#', ' ');
$this->setBody(trim($text));
}
}
/** @return string */
private function getRandomId()
{
return '<' . Strings::random() . '@' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST']
: (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'))
. '>';
}
}
|
@extends('layouts.app')
@section('content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
@lang('models/statusOrdems.plural')
</div>
<div class="col-sm-6">
<a class="btn btn-primary float-right"
href="{{ route('statusOrdems.create') }}">
@lang('crud.add_new')
</a>
</div>
</div>
</div>
</section>
<div class="content px-3">
@include('flash::message')
<div class="clearfix"></div>
<div class="card">
<div class="card-body p-0">
@include('status_ordems.table')
<div class="card-footer clearfix float-right">
<div class="float-right">
</div>
</div>
</div>
</div>
</div>
@endsection
|
@if ($pagi->hasPages())
<nav class="flex items-center justify-center" role="navigation" aria-label="pagination">
@if (! $pagi->onFirstPage())
<a
href="{{ $pagi->previousPageUrl() }}"
rel="prev"
aria-label="Previous Page"
class="inline-flex items-center px-4 py-1 font-bold font-whyte text-c-blue-200 hover:underline lg:text-lg"
>
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
</svg>
<span>Previous Page</span>
</a>
@endif
{{-- <ul class="flex">
@foreach ($pagi->elements() as $element)
@if (is_string($element))
<li class="disabled" aria-disabled="true">
<span class="py-1 mr-3">…</span>
</li>
@endif
@if (is_array($element))
@foreach ($element as $page => $url)
<li>
@if ($page == $pagi->currentPage())
<span
class="px-4 py-1 mr-3 text-white bg-blue-600 border rounded-sm"
aria-current="page"
>{{ $page }}</span>
@else
<a
href="{{ $url }}"
class="px-4 py-1 mr-3 border rounded-sm hover:bg-blue-600 hover:text-white"
>{{ $page }}</a>
@endif
</li>
@endforeach
@endif
@endforeach
</ul> --}}
@if ($pagi->hasMorePages())
<a
href="{{ $pagi->nextPageUrl() }}"
rel="next"
aria-label="Next Page"
class="inline-flex items-center px-4 py-1 font-bold font-whyte text-c-blue-200 hover:underline lg:text-lg"
>
<span>Next Page</span>
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</a>
@endif
</nav>
@endif
|
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::group(['middleware'=>'guest'],function(){
Route::get('/',[
'uses'=> 'UserController@getHome',
'as'=> 'guest.home'
]);
Route::post('/signin',[
'uses' => 'UserController@postLogin',
'as' => 'guest.login'
]);
});
Route::group(['middleware'=>'auth'],function(){
Route::get('/profile',[
'uses'=> 'UserController@getProfile',
'as'=> 'user.home',
'prefix'=> 'user'
]);
Route::get('/logout',[
'uses'=> 'UserController@getLogout',
'as'=> 'user.logout',
'prefix'=> 'user'
]);
Route::get('/tambah',[
'uses'=> 'UserController@getTambahKeputusan',
'as'=> 'user.tambah',
'prefix'=> 'user'
]);
Route::get('/histori',[
'uses'=> 'UserController@getHistori',
'as'=> 'user.histori',
'prefix'=> 'user'
]);
Route::get('/data',[
'uses'=> 'UserController@getData',
'as'=> 'user.data',
'prefix'=> 'user'
]);
Route::post('/data',[
'uses'=> 'UserController@postData',
'as'=> 'user.data',
'prefix'=> 'user'
]);
Route::post('/tambah_keputusan',[
'uses'=> 'UserController@postTambahKeputusan',
'as'=> 'user.tambah_keputusan',
'prefix'=> 'user'
]);
Route::get('/detail/{id_hasil}',[
'uses'=> 'UserController@getHasil',
'as'=> 'user.hasil',
'prefix'=> 'user'
]);
Route::get('/edit/{id_hasil}',[
'uses'=> 'UserController@getEdit',
'as'=> 'user.edit',
'prefix'=> 'user'
]);
Route::post('/edit/{id_data}',[
'uses'=> 'UserController@postEdit',
'as'=> 'user.edit',
'prefix'=> 'user'
]);
Route::get('/alert/{id_data}',[
'uses'=> 'UserController@getAlert',
'as'=> 'user.alert',
'prefix'=> 'user'
]);
Route::get('/delete/{id_data}',[
'uses'=> 'UserController@getDelete',
'as'=> 'user.delete',
'prefix'=> 'user'
]);
});
|
<?php
namespace Markup\RabbitMq\ManagementApi;
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\Psr7\Request;
/**
* ManagementApi
*
* @author Richard Fullmer <richard.fullmer@opensoftdev.com>
*/
class Client
{
/**
* @var GuzzleClient
*/
protected $client;
/**
* @var string
*/
protected $username;
/**
* @var string
*/
protected $password;
/**
* @var string
*/
const USERNAME_DEFAULT = 'guest';
/**
* @var string
*/
const PASSWORD_DEFAULT = 'guest';
/**
* @var string
*/
const BASEURL_DEFAULT = 'http://localhost:15672';
public function __construct(
$baseUrl = self::BASEURL_DEFAULT,
$username = self::USERNAME_DEFAULT,
$password = self::PASSWORD_DEFAULT
) {
$this->username = $username;
$this->password = $password;
$this->client = new GuzzleClient([
'base_uri' => $baseUrl,
'defaults' => ['auth' => [$this->username, $this->password]],
'auth' => [$this->username, $this->password]
]);
}
/**
* @param string $endpoint Resource URI.
* @param string $method
* @param array $headers HTTP headers
* @param string|resource|array $body Entity body of request (POST/PUT) or response (GET)
* @return array
*/
public function send($endpoint, $method = 'GET', $headers = [], $body = null)
{
if (null !== $body) {
$body = json_encode($body);
}
if (in_array($method, ['PUT', 'POST', 'DELETE'])) {
$headers['Content-Type'] = 'application/json';
}
$response = $this->client->send(new Request($method, $endpoint, $headers, $body));
return json_decode($response->getBody(), true);
}
}
|
<?php
// Load the Qcodo Development Framework
require(dirname(__FILE__) . '/../../includes/prepend.inc.php');
/**
* This is a quick-and-dirty draft QForm object to do the List All functionality
* of the Flowchart class. It uses the code-generated
* FlowchartDataGrid control which has meta-methods to help with
* easily creating/defining Flowchart columns.
*
* Any display customizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* NOTE: This file is overwritten on any code regenerations. If you want to make
* permanent changes, it is STRONGLY RECOMMENDED to move both flowchart_list.php AND
* flowchart_list.tpl.php out of this Form Drafts directory.
*
* @package My Application
* @subpackage Drafts
*/
class FlowchartListForm extends QForm {
// Local instance of the Meta DataGrid to list Flowcharts
protected $dtgFlowcharts;
// Create QForm Event Handlers as Needed
// protected function Form_Exit() {}
// protected function Form_Load() {}
// protected function Form_PreRender() {}
// protected function Form_Validate() {}
protected function Form_Run() {
// Security check for ALLOW_REMOTE_ADMIN
// To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
QApplication::CheckRemoteAdmin();
}
protected function Form_Create() {
// Instantiate the Meta DataGrid
$this->dtgFlowcharts = new FlowchartDataGrid($this);
// Style the DataGrid (if desired)
$this->dtgFlowcharts->CssClass = 'datagrid';
$this->dtgFlowcharts->AlternateRowStyle->CssClass = 'alternate';
// Add Pagination (if desired)
$this->dtgFlowcharts->Paginator = new QPaginator($this->dtgFlowcharts);
$this->dtgFlowcharts->ItemsPerPage = 20;
// Use the MetaDataGrid functionality to add Columns for this datagrid
// Create an Edit Column
$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/flowchart_edit.php';
$this->dtgFlowcharts->MetaAddEditLinkColumn($strEditPageUrl, 'Edit', 'Edit');
// Create the Other Columns (note that you can use strings for flowchart's properties, or you
// can traverse down QQN::flowchart() to display fields that are down the hierarchy)
$this->dtgFlowcharts->MetaAddColumn('Id');
$this->dtgFlowcharts->MetaAddColumn(QQN::Flowchart()->Reference);
$this->dtgFlowcharts->MetaAddColumn('Order');
$this->dtgFlowcharts->MetaAddColumn(QQN::Flowchart()->Actions);
$this->dtgFlowcharts->MetaAddColumn(QQN::Flowchart()->Machine);
$this->dtgFlowcharts->MetaAddColumn('Time');
}
}
// Go ahead and run this form object to generate the page and event handlers, implicitly using
// flowchart_list.tpl.php as the included HTML template file
FlowchartListForm::Run('FlowchartListForm');
?>
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php if ($stateTheme == 'light') { ?>
<div class="preloader"></div>
<?php } else { ?>
<div class="preloaderDark"></div>
<?php } ?>
<main class="page-content pt-2">
<div class="container-fluid p-5">
<div class="row noselect">
<div class="form-group col-md-12">
<div id="doc-id">
<h4 class="text-muted mb-4">Encoder un patient</h4>
<div class="row mb-4">
<div class="col-md-12">
<div class="card border-0 rounded-0">
<div class="card-body">
<?php echo form_open_multipart('Dashboard/addPatient');?>
<label class="control-label col-sm-2" for="username">Prénom RP :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-prenom"
placeholder="Prénom">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-2" for="username">Nom RP :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-nom"
placeholder="Nom">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-2" for="username">Numéro de téléphone :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-num"
placeholder="Numéro">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Prénom et Nom d'un proche (ou
surnom) :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme"
name="newPatient-procheNom" placeholder="Prénom et Nom">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Numéro de téléphone du proche
:</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme"
name="newPatient-procheNum" placeholder="Numéro">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Groupe sanguin :</label>
<div class="col-sm-10">
<select type="username" class="form-control input-theme" name="newPatient-gs"
placeholder="Groupe sanguin">
<option value="A+">A+</option>
<option value="A-">A-</option>
<option value="B+">B+</option>
<option value="B-">B-</option>
<option value="AB+">AB+</option>
<option value="AB-">AB-</option>
<option value="O+">O+</option>
<option value="O-">O-</option>
</select>
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Poids du patient (pas
obligatoire) :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-poids"
placeholder="Poids">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Taille du patient (pas
obligatoire) :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-taille"
placeholder="Taille">
</div>
<div style="margin-top: 1%;"></div> <!-- separator -->
<label class="control-label col-sm-3" for="username">Date de naissance (Sous le format xx/xx/xxxx) :</label>
<div class="col-sm-10">
<input type="username" class="form-control input-theme" name="newPatient-dob"
placeholder="Date de naissance">
</div>
<div style="margin-top: 2%;"></div> <!-- separator -->
<div class="col-sm-10">
<img id="blah" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
alt="" width="280" height="320" />
</div>
<div style="margin-top: 2%;"></div> <!-- separator -->
<div class="col-sm-10">
<input type='file' id="pictureBtn" title="" name='profile_pic' size='20' />
<span class='btn btn-info' id="btnAddPicture">Ajouter une photo</span>
</div>
<div style="margin-top: 2%;"></div> <!-- separator -->
<?php echo "<input class='btn btn-primary right' type='submit' name='submit' value='Ajouter le patient' /> ";?>
<?php echo "</form>"?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
|
<?php
namespace Common\Model;
use Common\Model\MCommonModel;
class MUserAddressModel extends MCommonModel
{
}
|
@extends('layouts.app')
@section('content')
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Add form</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<!-- <a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">Config option 1</a>
</li>
<li><a href="#">Config option 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a> -->
</div>
</div>
<div class="ibox-content">
{{ Form::open( array('method' => 'post', 'class' => 'form-horizontal','files' => true, 'id' => 'addDemo' )) }}
<div class="form-group"><label class="col-lg-2 control-label">First Name</label>
<div class="col-lg-9">
{{ Form::text('first_name', null, array('class' => 'form-control first_name' ,'required')) }}
</div>
</div>
<div class="form-group"><label class="col-lg-2 control-label">Last Name</label>
<div class="col-lg-9">
{{ Form::text('last_name', null, array('class' => 'form-control last_name' ,'required')) }}
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">File</label>
<div class="fileinput fileinput-new input-group col-lg-9" data-provides="fileinput">
<div class="form-control" data-trigger="fileinput">
<i class="glyphicon glyphicon-file fileinput-exists"></i>
<span class="fileinput-filename"></span>
</div>
<span class="input-group-addon btn btn-default btn-file">
<span class="fileinput-new">Select file</span>
<span class="fileinput-exists">Change</span>
<input type="file" name="demo_pic"/>
</span>
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-2 control-label">Select</label>
<div class="col-sm-9">
{{ Form::select('testarray', $testarray , null, array('class' => 'form-control m-b', 'id' => 'test')) }}
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Gender</label>
<div class="col-sm-9">
<label class="radio-inline">
{{ Form::radio('gender', 'M', array('class' => 'form-control male' ,'id'=>'male')) }} Male</label>
<label class="radio-inline">
{{ Form::radio('gender', 'F', array('class' => 'form-control famale' ,'id'=>'famale')) }} Female</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">checkbox</label>
<div class="col-sm-9">
<label class="checkbox-inline">
{{ Form::checkbox('hb', 'M', array('class' => 'form-control male' ,'id'=>'male')) }} checkbox1</label>
<label class="checkbox-inline">
{{ Form::checkbox('hb', 'F', array('class' => 'form-control famale' ,'id'=>'famale')) }} checkbox2</label>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-9">
<button class="btn btn-sm btn-primary" type="submit">Save</button>
</div>
</div>
{{ Form::close() }}
</div>
</div>
</div>
</div>
</div>
@endsection
|
<?php
/**
* This file has been @generated by a phing task from CLDR version 35.1.0.
* See [README.md](README.md#generating-data) for more information.
*
* @internal Please do not require this file directly.
* It may change location/format between versions
*
* Do not modify this file directly!
*/
return array (
'AC' => 'i-Ascension Island',
'AD' => 'i-Andorra',
'AE' => 'i-United Arab Emirates',
'AF' => 'i-Afghanistan',
'AG' => 'i-Antigua ne-Barbuda',
'AI' => 'i-Anguilla',
'AL' => 'i-Albania',
'AM' => 'i-Armenia',
'AO' => 'i-Angola',
'AQ' => 'i-Antarctica',
'AR' => 'i-Argentina',
'AS' => 'i-American Samoa',
'AT' => 'i-Austria',
'AU' => 'i-Australia',
'AW' => 'i-Aruba',
'AX' => 'i-Åland Islands',
'AZ' => 'i-Azerbaijan',
'BA' => 'i-Bosnia ne-Herzegovina',
'BB' => 'i-Barbados',
'BD' => 'i-Bangladesh',
'BE' => 'i-Belgium',
'BF' => 'i-Burkina Faso',
'BG' => 'i-Bulgaria',
'BH' => 'i-Bahrain',
'BI' => 'i-Burundi',
'BJ' => 'i-Benin',
'BL' => 'i-Saint Barthélemy',
'BM' => 'i-Bermuda',
'BN' => 'i-Brunei',
'BO' => 'i-Bolivia',
'BQ' => 'i-Caribbean Netherlands',
'BR' => 'i-Brazil',
'BS' => 'i-Bahamas',
'BT' => 'i-Bhutan',
'BW' => 'iBotswana',
'BY' => 'i-Belarus',
'BZ' => 'i-Belize',
'CA' => 'i-Canada',
'CC' => 'i-Cocos (Keeling) Islands',
'CD' => 'i-Congo - Kinshasa',
'CF' => 'i-Central African Republic',
'CG' => 'i-Congo - Brazzaville',
'CH' => 'i-Switzerland',
'CI' => 'i-Côte d’Ivoire',
'CK' => 'i-Cook Islands',
'CL' => 'i-Chile',
'CM' => 'i-Cameroon',
'CN' => 'i-China',
'CO' => 'i-Colombia',
'CR' => 'i-Costa Rica',
'CU' => 'i-Cuba',
'CV' => 'i-Cape Verde',
'CW' => 'i-Curaçao',
'CX' => 'i-Christmas Island',
'CY' => 'i-Cyprus',
'CZ' => 'i-Czechia',
'DE' => 'i-Germany',
'DG' => 'i-Diego Garcia',
'DJ' => 'i-Djibouti',
'DK' => 'i-Denmark',
'DM' => 'i-Dominica',
'DO' => 'i-Dominican Republic',
'DZ' => 'i-Algeria',
'EA' => 'i-Cueta ne-Melilla',
'EC' => 'i-Ecuador',
'EE' => 'i-Estonia',
'EG' => 'i-Egypt',
'EH' => 'i-Western Sahara',
'ER' => 'i-Eritrea',
'ES' => 'i-Spain',
'ET' => 'i-Ethiopia',
'FI' => 'i-Finland',
'FJ' => 'i-Fiji',
'FK' => 'i-Falkland Islands',
'FM' => 'i-Micronesia',
'FO' => 'i-Faroe Islands',
'FR' => 'i-France',
'GA' => 'i-Gabon',
'GB' => 'i-United Kingdom',
'GD' => 'i-Grenada',
'GE' => 'i-Georgia',
'GF' => 'i-French Guiana',
'GG' => 'i-Guernsey',
'GH' => 'i-Ghana',
'GI' => 'i-Gibraltar',
'GL' => 'i-Greenland',
'GM' => 'i-Gambia',
'GN' => 'i-Guinea',
'GP' => 'i-Guadeloupe',
'GQ' => 'i-Equatorial Guinea',
'GR' => 'i-Greece',
'GS' => 'i-South Georgia ne-South Sandwich Islands',
'GT' => 'i-Guatemala',
'GU' => 'i-Guam',
'GW' => 'i-Guinea-Bissau',
'GY' => 'i-Guyana',
'HK' => 'i-Hong Kong SAR China',
'HN' => 'i-Honduras',
'HR' => 'i-Croatia',
'HT' => 'i-Haiti',
'HU' => 'i-Hungary',
'IC' => 'i-Canary Islands',
'ID' => 'i-Indonesia',
'IE' => 'i-Ireland',
'IL' => 'kwa-Israel',
'IM' => 'i-Isle of Man',
'IN' => 'i-India',
'IO' => 'i-British Indian Ocean Territory',
'IQ' => 'i-Iraq',
'IR' => 'i-Iran',
'IS' => 'i-Iceland',
'IT' => 'i-Italy',
'JE' => 'i-Jersey',
'JM' => 'i-Jamaica',
'JO' => 'i-Jordan',
'JP' => 'i-Japan',
'KE' => 'i-Kenya',
'KG' => 'i-Kyrgyzstan',
'KH' => 'i-Cambodia',
'KI' => 'i-Kiribati',
'KM' => 'i-Comoros',
'KN' => 'i-Saint Kitts ne-Nevis',
'KP' => 'i-North Korea',
'KR' => 'i-South Korea',
'KW' => 'i-Kuwait',
'KY' => 'i-Cayman Islands',
'KZ' => 'i-Kazakhstan',
'LA' => 'i-Laos',
'LB' => 'i-Lebanon',
'LC' => 'i-Saint Lucia',
'LI' => 'i-Liechtenstein',
'LK' => 'i-Sri Lanka',
'LR' => 'i-Liberia',
'LS' => 'iLesotho',
'LT' => 'i-Lithuania',
'LU' => 'i-Luxembourg',
'LV' => 'i-Latvia',
'LY' => 'i-Libya',
'MA' => 'i-Morocco',
'MC' => 'i-Monaco',
'MD' => 'i-Moldova',
'ME' => 'i-Montenegro',
'MF' => 'i-Saint Martin',
'MG' => 'i-Madagascar',
'MH' => 'i-Marshall Islands',
'MK' => 'i-Macedonia',
'ML' => 'iMali',
'MM' => 'i-Myanmar (Burma)',
'MN' => 'i-Mongolia',
'MO' => 'i-Macau SAR China',
'MP' => 'i-Northern Mariana Islands',
'MQ' => 'i-Martinique',
'MR' => 'i-Mauritania',
'MS' => 'i-Montserrat',
'MT' => 'i-Malta',
'MU' => 'i-Mauritius',
'MV' => 'i-Maldives',
'MW' => 'iMalawi',
'MX' => 'i-Mexico',
'MY' => 'i-Malaysia',
'MZ' => 'i-Mozambique',
'NA' => 'i-Namibia',
'NC' => 'i-New Caledonia',
'NE' => 'i-Niger',
'NF' => 'i-Norfolk Island',
'NG' => 'i-Nigeria',
'NI' => 'i-Nicaragua',
'NL' => 'i-Netherlands',
'NO' => 'i-Norway',
'NP' => 'i-Nepal',
'NR' => 'i-Nauru',
'NU' => 'i-Niue',
'NZ' => 'i-New Zealand',
'OM' => 'i-Oman',
'PA' => 'i-Panama',
'PE' => 'i-Peru',
'PF' => 'i-French Polynesia',
'PG' => 'i-Papua New Guinea',
'PH' => 'i-Philippines',
'PK' => 'i-Pakistan',
'PL' => 'i-Poland',
'PM' => 'i-Saint Pierre kanye ne-Miquelon',
'PN' => 'i-Pitcairn Islands',
'PR' => 'i-Puerto Rico',
'PS' => 'i-Palestinian Territories',
'PT' => 'i-Portugal',
'PW' => 'i-Palau',
'PY' => 'i-Paraguay',
'QA' => 'i-Qatar',
'RE' => 'i-Réunion',
'RO' => 'i-Romania',
'RS' => 'i-Serbia',
'RU' => 'i-Russia',
'RW' => 'i-Rwanda',
'SA' => 'i-Saudi Arabia',
'SB' => 'i-Solomon Islands',
'SC' => 'i-Seychelles',
'SD' => 'i-Sudan',
'SE' => 'i-Sweden',
'SG' => 'i-Singapore',
'SH' => 'i-St. Helena',
'SI' => 'i-Slovenia',
'SJ' => 'i-Svalbard ne-Jan Mayen',
'SK' => 'i-Slovakia',
'SL' => 'i-Sierra Leone',
'SM' => 'i-San Marino',
'SN' => 'i-Senegal',
'SO' => 'i-Somalia',
'SR' => 'i-Suriname',
'SS' => 'i-South Sudan',
'ST' => 'i-São Tomé kanye ne-Príncipe',
'SV' => 'i-El Salvador',
'SX' => 'i-Sint Maarten',
'SY' => 'i-Syria',
'SZ' => 'i-Swaziland',
'TA' => 'i-Tristan da Cunha',
'TC' => 'i-Turks ne-Caicos Islands',
'TD' => 'i-Chad',
'TF' => 'i-French Southern Territories',
'TG' => 'i-Togo',
'TH' => 'i-Thailand',
'TJ' => 'i-Tajikistan',
'TK' => 'i-Tokelau',
'TL' => 'i-Timor-Leste',
'TM' => 'i-Turkmenistan',
'TN' => 'i-Tunisia',
'TO' => 'i-Tonga',
'TR' => 'i-Turkey',
'TT' => 'i-Trinidad ne-Tobago',
'TV' => 'i-Tuvalu',
'TW' => 'i-Taiwan',
'TZ' => 'i-Tanzania',
'UA' => 'i-Ukraine',
'UG' => 'i-Uganda',
'UM' => 'i-U.S. Minor Outlying Islands',
'US' => 'i-United States',
'UY' => 'i-Uruguay',
'UZ' => 'i-Uzbekistan',
'VA' => 'i-Vatican City',
'VC' => 'i-Saint Vincent ne-Grenadines',
'VE' => 'i-Venezuela',
'VG' => 'i-British Virgin Islands',
'VI' => 'i-U.S. Virgin Islands',
'VN' => 'i-Vietnam',
'VU' => 'i-Vanuatu',
'WF' => 'i-Wallis ne-Futuna',
'WS' => 'i-Samoa',
'XK' => 'i-Kosovo',
'YE' => 'i-Yemen',
'YT' => 'i-Mayotte',
'ZA' => 'iNingizimu Afrika',
'ZM' => 'i-Zambia',
'ZW' => 'iZimbabwe',
);
|
<?php
class kopenissue extends control {
public function __construct() {
parent::__construct();
}
/**
* create.
*
* @access public
* @return errcode Object
*/
public function create() {
$data = fixer::input('post')->get();
$ret = $this->kopenissue->create($data);
die(json_encode($ret));
}
/**
* edit.
*
* @access public
* @return errcode Object
*/
public function edit() {
$data =fixer::input('post')->get();
$ret = $this->kopenissue->update($data, true);//成功检出新数据
die(json_encode($ret));
}
/**
* approve.
*
* @access public
* @return errcode Object
*/
public function approve() {
$data = fixer::input('post')->get();
$ret = $this->kopenissue->approve($data);
die(json_encode($ret));
}
/**
* calendar.
*
* @access public
* @return void
*/
public function index() {
/* The title and position. */
$this->view->title = $this->lang->kopenissue->common.$this->lang->colon.$this->lang->kopenissue->index;
$this->view->position[] = $this->lang->kopenissue->index;
$this->display();
}
/**
* index.
*
* @access public
* @return void
*/
public function getList() {
$ret = kevin_create_new_errcode();
$ret->data = $this->kopenissue->getList();
if (dao::isError()) {
$ret->errcode = 15;
$ret->errmsg = dao::getError(true);
}
die(json_encode($ret));
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.