max_stars_repo_path
stringlengths
4
587
max_stars_repo_name
stringlengths
5
118
max_stars_count
int64
0
39.9k
id
stringlengths
1
8
content
stringlengths
1
1.05M
score
float64
-1.14
3.53
int_score
int64
0
4
application/views/Auth/Blog/list.php
beaprogrammer1980/demoblogwebsite
0
3
<?php $this->load->view('Auth/header'); ?> <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4"> <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> <h1 class="h2">View Blog</h1> </div> <!-- 1.create controller blogc and load view listv.php 2.create view listv.php and copy dashboard common code and add form tag for title,descrition --> <div class="table-responsive"> <table class="table table-striped"> <tr> <th>ID</th> <th>Title</th> <th>Description</th> <th>Author</th> <th width="200">Action</th> </tr> <?php foreach($query as $row): ?> <tr> <td><?php echo $row->blog_id; ?></td> <td><?php echo $row->title; ?></td> <td><?php echo $row->description; ?></td> <td><?php echo $row->author; ?></td> <td> <a href="#" class="btn btn-primary">Edit</a> <a href="#" class="btn btn-danger">Delete</a> </td> </tr> <?php endforeach; ?> </table> </div> </main> <?php $this->load->view('Auth/footer'); ?>
1.132813
1
update/2992/postupdate.php
webdepp/pimcore
1
11
<?php function sendQuery ($sql) { try { $db = Pimcore_Resource::get(); $db->query($sql); } catch (Exception $e) { echo $e->getMessage(); echo "Please execute the following query manually: <br />"; echo "<pre>" . $sql . "</pre><hr />"; } } $tableNames = array( "documents_doctypes", "glossary", "keyvalue_groups", "keyvalue_keys", "properties_predefined", "redirects", "sites", "staticroutes" ); foreach ($tableNames as $tableName) { sendQuery("ALTER TABLE `" . $tableName . "` ADD COLUMN `creationDate` bigint(20) unsigned DEFAULT 0;"); sendQuery("ALTER TABLE `" . $tableName . "` ADD COLUMN `modificationDate` bigint(20) unsigned DEFAULT 0;"); }
1.164063
1
src/Handlers/DifferentCountryHandler.php
devtoolboxuk/cerberus
0
19
<?php namespace devtoolboxuk\cerberus\Handlers; use devtoolboxuk\cerberus\Wrappers\DifferentCountryWrapper as DifferentCountryWrapper; class DifferentCountryHandler extends Handler { public function __construct($value = '') { parent::__construct($value); $this->setHandlerName(str_replace(__NAMESPACE__ . '\\', '', __CLASS__)); $this->pushWrapper(new DifferentCountryWrapper()); } }
1
1
src/DaPigGuy/PiggyFactions/tasks/UpdatePowerTask.php
CortexPE/PiggyFactions
0
27
<?php declare(strict_types=1); namespace DaPigGuy\PiggyFactions\tasks; use DaPigGuy\PiggyFactions\event\member\PowerChangeEvent; use DaPigGuy\PiggyFactions\PiggyFactions; use DaPigGuy\PiggyFactions\players\PlayerManager; use pocketmine\scheduler\Task; class UpdatePowerTask extends Task { const INTERVAL = 5 * 60 * 20; /** @var PiggyFactions */ private $plugin; public function __construct(PiggyFactions $plugin) { $this->plugin = $plugin; } public function onRun(int $currentTick) { foreach ($this->plugin->getServer()->getOnlinePlayers() as $p) { $member = PlayerManager::getInstance()->getPlayer($p->getUniqueId()); $ev = new PowerChangeEvent($member, PowerChangeEvent::CAUSE_TIME, $member->getPower() + $this->plugin->getConfig()->getNested("factions.power.per.hour", 2) / (72000 / self::INTERVAL)); $ev->call(); if ($ev->isCancelled()) return; $member->setPower($ev->getPower()); } } }
1.40625
1
modules/admin/views/index/head.php
beyondamos/yiicms
0
35
<?php use yii\helpers\Url; ?> <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Document</title> <link rel="stylesheet" href="/admin/lib/bootstrap/css/bootstrap.css"> </head> <body> <!-- <!-- 导航栏 --> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <a href="" class="navbar-brand">DayDayLearn</a> </div> <ul class="nav navbar-nav navbar-right"> <li><a href="news_list.html" target="main-frame">欢迎回来,<?php echo $this->params['user_info']['nickname'];?></a></li> <li><a href="<?php echo Url::home();?>" target="_blank" >网站首页</a></li> <li><a href="<?php echo Url::to(['login/logout']);?>" target="_top">退出</a></li> </ul> </div> </nav> <!-- /导航栏 --> <script src="/admin/lib/jquery/jquery-1.11.3.js"></script> <script src="/admin/lib/bootstrap/js/bootstrap.min.js"></script> </body> </html>
0.84375
1
src/Form/Type/TaskType.php
frusciante1988/XLF-Generator
2
43
<?php // src/Form/Type/TaskType.php namespace App\Form\Type; use App\Entity\Task; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\FileType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; class TaskType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('save', SubmitType::class, ['label' => 'Create Xliff File']); $builder->add('xlfFile', FileType::class, ['required' => false, 'label' => 'Please upload the XLF File to insert automatically the elements.']); $builder->add('sourceLanguage'); $builder->add('targetLanguage'); $builder->add('productName'); $builder->add('xliffElements', CollectionType::class, [ 'entry_type' => XliffElementType::class, 'entry_options' => ['label' => false], 'allow_add' => true, 'by_reference' => false, 'allow_delete' => true, ] ); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( [ 'data_class' => Task::class, ] ); } }
1.140625
1
application/views/admin/tambah_mobil_form.php
nrdajisnrd/masjo
0
51
<div class="main-content"> <section class="section"> <div class="section-header"> <h1>Input Mobil</h1> </div> </section> <div class="container-fluid"> <div class="card"> <div class="card-body"> <form method="post" action="<?php echo base_url().'admin/data_mobil/tambah_mobil_aksi' ?>" enctype="multipart/form-data"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label>Nama Mobil</label> <input type="text" name="nama_mobil" class="form-control"> <?php echo form_error('nama_mobil', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>Deskripsi</label> <textarea class="form-control" name="deskripsi" rows="3"></textarea> <?php echo form_error('deskripsi', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>Harga /hari</label> <input type="text" name="harga" class="form-control"> <?php echo form_error('harga', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>Tahun Produksi</label> <input type="text" name="tahun" class="form-control"> <?php echo form_error('tahun', '<div class="text-small text-danger">', '</div>') ?> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Merk Mobil</label> <select class="form-control" name="nama_merk"> <option value="">-- PILIH MERK --</option> <?php foreach ($merk as $mrk) : ?> <option value="<?php echo $mrk->nama_merk ?>"><?php echo $mrk->nama_merk ?></option> <?php endforeach; ?> </select> <?php echo form_error('nama_merk', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>No. Polisi</label> <input type="text" name="nopol" class="form-control"> <?php echo form_error('nopol', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>Jenis Bahan Bakar</label> <select class="form-control" name="bbm"> <option value="">-- PILIH BAHAN BAKAR --</option> <option value="Premium">Premium</option> <option value="Pertalite">Pertalite</option> <option value="Pertamax">Pertamax</option> <option value="Diesel">Diesel</option> </select> <?php echo form_error('bbm', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <label>Kapasitas</label> <input type="text" name="seating" class="form-control"> <?php echo form_error('seating', '<div class="text-small text-danger">', '</div>') ?> </div> </div> </div> <hr> <div class="row"> <div class="col-md-12"> <h5><b>Upload Gambar</b></h5> </div> </div> <div class="row"> <div class="form-group"> <div class="col-md-4"> Gambar 1 <input type="file" name="image1"> </div> <?php echo form_error('image1', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <div class="col-md-4"> Gambar 2 <input type="file" name="image2"> </div> <?php echo form_error('image2', '<div class="text-small text-danger">', '</div>') ?> </div> <div class="form-group"> <div class="col-md-4"> Gambar 3 <input type="file" name="image3"> </div> <?php echo form_error('image3', '<div class="text-small text-danger">', '</div>') ?> </div> </div> <hr> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading mb-2"><h5>Accessories</h5></div> <div class="panel-body d-flex justify-content-left"> <div class="form-group"> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[1]" value="1"> <label> Air Conditioner </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[2]" value="1"> <label> Power Door Locks </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[3]" value="1"> <label> AntiLock Braking System </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[4]" value="1"> <label> Brake Assist </label> </div> </div> <div class="form-group ml-5"> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[5]" value="1"> <label> Power Steering </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[6]" value="1"> <label> Driver Airbag</label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[7]" value="1"> <label> Passenger Airbag </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[8]" value="1"> <label> Power Windows </label> </div> </div> <div class="form-group ml-5"> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[9]" value="1"> <label> CD Player </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[10]" value="1"> <label> Central Locking</label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox" name="aksesoris[11]" value="1"> <label> Crash Sensor </label> </div> <div class="checkbox checkbox-inline"> <input type="checkbox"name="aksesoris[12]" value="1"> <label> Leather Seats </label> </div> </div> </div> </div> </div> </div> <button type="submit" class="btn btn-primary">Simpan</button> </form> </div> </div> </div> </div>
0.972656
1
public/quizresult/classes/question/sequence/SequenceQuestion.class.php
vikasshekhawat/Cybersecurity_Assessment_Tool
0
59
<?php class SequenceQuestion extends SequenceSurveyQuestion { public function isGradedByDefault() { return true; } public function initFromXmlNode(DOMElement $node) { parent::initFromXmlNode($node); $correctAnswer = array(); foreach ($this->answers as $answer) { $correctAnswer[$this->getCorrectAnswerIndex($answer)] = $answer; } $answersCount = count($correctAnswer); for ($i = 0; $i < $answersCount; ++$i) { if ($this->correctAnswer != '') { $this->correctAnswer .= '; '; } $this->correctAnswer .= $i + 1 . '. ' . $correctAnswer[$i]->text; } } protected function createAnswer($index) { $answer = new SequenceAnswer(); $answer->index = $index; return $answer; } /** * @param SequenceAnswer $answer * @return int */ private function getCorrectAnswerIndex($answer) { return isset($answer->originalIndex) ? $answer->originalIndex : $answer->index; } }
1.617188
2
index.php
dlepera88-php/framework-dlx
0
67
<?php /** * framework-dlx * @version: v1.17.07 * @author: <NAME> * * Created by <NAME> on 2017-07-28. Please report any bug at * https://github.com/dlepera88-php/framework-dlx/issues * * The MIT License (MIT) * Copyright (c) 2017 <NAME> http://diegolepera.xyz/ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ # Máscaras define('MASK_CPF', '000.000.000-00'); define('MASK_CNPJ', '00.000.000/0000-00'); define('MASK_TELEFONE_CELULAR_8', '(00) 0000-0000'); define('MASK_TELEFONE_CELULAR_9', '(00) 0 0000-0000'); define('MASK_CEP', '00000-000'); # Expressões regulares define('EXPREG_CPF', '~^(\d{3}\.){2}\d{3}-\d{2}$~'); define('EXPREG_CNPJ', '~^\d{2}(\.\d{3}){2}-\d{2}$~'); define('EXPREG_TELEFONE_GERAL', '~^\(\d{2}\)\s([6-9]\s)?\d{4}-\d{4}$~'); define('EXPREG_CEP', '~^\d{4}-\d{3}$~'); define('EXPREG_IDIOMA', '~^[a-z]{2,3}([-_][A-Za-z]{2,3})?$~'); require_once 'dlx/dlx.classe.php'; try { $dlx_conf = filter_input_array(INPUT_GET, [ 'dlx-aplicativo' => ['filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_EMPTY_STRING_NULL], 'dlx-ambiente' => ['filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_EMPTY_STRING_NULL], 'dlx-url' => ['filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_EMPTY_STRING_NULL] ]); $__dlx = new DLX($dlx_conf['dlx-aplicativo'], $dlx_conf['dlx-ambiente'], $dlx_conf['dlx-url']); $__dlx->executar(); } catch (\DLX\Excecao\DLX $ex) { echo $ex->obterMensagem(); } catch (Exception $ex) { echo $ex->getMessage(); } // Fim try ... catch
1.226563
1
resources/views/res/actu.blade.php
LeCitronVert/reallifequest
0
75
<!--<div class="news"> <img src="{{$a->User()->avatar}}" alt="Avatar de {{$a->User()->name}}" /> <span class="news_group"> <span class="news_user">{{$a->User()->name}}</span> <span class="news_text">{{ __('fil.' . $a->type) }}</span> @if($a->type == "questaccepted" || $a->type == "questrefused" || $a->type == "questtimeout") <span class="news_value">{{\App\Quest::find($a->newsValue)->prompt}}</span> @endif @if($a->type == "levelup") <span class="news_value">{{$a->newsValue}}</span> @endif </span> </div>--> <div class="notification"> <div class="notification__image" style="background-image: url('{{$a->User()->avatar}}')" alt="Avatar de {{$a->User()->name}}"></div> <div class="notification__content"> <span class="notification__content__name">{{$a->User()->name}}</span> <p class="notification__content__description">{{ __('fil.' . $a->type) }} @if($a->type == "questaccepted" || $a->type == "questrefused" || $a->type == "questtimeout") <strong>{{\App\Quest::find($a->newsValue)->prompt}}</strong> @endif @if($a->type == "levelup") <strong>{{$a->newsValue}}</strong> @endif</p> <span class="notification__content__date">22/05/2020</span> </div> </div>
1.039063
1
lib/PHPGit/Command.php
juankp3/export_commitfile
18
83
<?php class PHPGit_Command { /** * @var string Real filesystem path of the repository */ protected $dir; /** * @var string Git command to run */ protected $commandString; /** * @var boolean Whether to enable debug mode or not * When debug mode is on, commands and their output are displayed */ protected $debug; /** * Instanciate a new Git command * * @param string $dir real filesystem path of the repository * @param array $options */ public function __construct($dir, $commandString, $debug) { $commandString = trim($commandString); $this->dir = $dir; $this->commandString = $commandString; $this->debug = $debug; } public function run() { $commandToRun = sprintf('cd %s && %s', escapeshellarg($this->dir), $this->commandString); if($this->debug) { print $commandToRun."\n"; } ob_start(); passthru($commandToRun, $returnVar); $output = ob_get_clean(); if($this->debug) { print $output."\n"; } if(0 !== $returnVar) { // Git 1.5.x returns 1 when running "git status" if(1 === $returnVar && 0 === strncmp($this->commandString, 'git status', 10)) { // it's ok } else { throw new GitRuntimeException(sprintf( 'Command %s failed with code %s: %s', $commandToRun, $returnVar, $output ), $returnVar); } } return trim($output); } } class GitRuntimeException extends RuntimeException {}
1.835938
2
public_html/wp-content/plugins/optimole-wp/inc/compatibilities/cache_enabler.php
isabelffernandes/assistente_virtual
0
91
<?php /** * Class Optml_cache_enabler. * * @reason Cache_enabler stores the content of the page before Optimole starts replacing url's */ class Optml_cache_enabler extends Optml_compatibility { /** * Should we load the integration logic. * * @return bool Should we load. */ function should_load() { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); return is_plugin_active( 'cache-enabler/cache-enabler.php' ); } /** * Register integration details. */ public function register() { add_filter( 'cache_enabler_before_store', [ Optml_Main::instance()->manager, 'replace_content' ], PHP_INT_MAX, 1 ); } }
1.007813
1
app/Http/Controllers/categoryController.php
aminaminamin93/price-scales
0
99
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; class categoryController extends Controller { public function index(){ $categories = \DB::table('category') ->get(); return $categories; } public function allcategory(){ $categories = \DB::table('products') ->join('category','products.category_id','=','category.id') ->join('condition','products.condition_id','=','condition.id') ->select('products.*','category_title','condition.condition_title') ->get(); $newcategories = array(); foreach ($categories as $category) { $compareproducts = \DB::table('products') ->select(\DB::raw('count(*) as counter')) ->where('id' , '<>', $category->id) ->where('brand_id', '=', $category->brand_id) ->where('category_id','=',$category->category_id) ->whereRaw('MATCH(product_name) AGAINST(? IN BOOLEAN MODE)', array($category->product_name)) ->get(); foreach ($compareproducts as $compareproduct) { if($compareproduct->counter >= 1){ $comparetable = true; }else{ $comparetable = false; } } $newcategories[] = [ 'id'=>$category->id, 'product_name'=>$category->product_name, 'product_price'=>$category->product_price, 'product_price_temp'=>$category->product_price_temp, 'product_favorite'=>$category->product_favorite, 'product_reviews'=>$category->product_reviews, 'picture_link'=>$category->picture_link, 'shopper_link'=>$category->shopper_link, 'comparetable'=>$comparetable ]; } return $newcategories; } public function category(Request $request){ if($request->get('id') == 0){ $categories = \DB::table('products') ->join('category','products.category_id','=','category.id') ->join('condition','products.condition_id','=','condition.id') ->select('products.*','category_title','condition.condition_title') ->get(); $newarr = array(); foreach ($categories as $category) { $compareproducts = \DB::table('products') ->select(\DB::raw('count(*) as counter')) ->where('id' , '<>', $category->id) ->where('brand_id', '=', $category->brand_id) ->where('category_id','=',$category->category_id) ->whereRaw('MATCH(product_name) AGAINST(? IN BOOLEAN MODE)', array($category->product_name)) ->get(); foreach ($compareproducts as $compareproduct) { if($compareproduct->counter >= 1){ $comparetable = true; }else{ $comparetable = false; } } $newarr[] = [ 'id'=>$category->id, 'product_name'=>$category->product_name, 'product_price'=>$category->product_price, 'product_price_temp'=>$category->product_price_temp, 'product_favorite'=>$category->product_favorite, 'product_reviews'=>$category->product_reviews, 'picture_link'=>$category->picture_link, 'shopper_link'=>$category->shopper_link, 'comparetable'=>$comparetable ]; } return $newarr; }else{ $categories = \DB::table('products') ->join('category','products.category_id','=','category.id') ->join('condition','products.condition_id','=','condition.id') ->where('products.category_id','=',$request->get('id')) ->select('products.*','category_title as title','condition.condition_title') ->get(); $newarr = array(); foreach ($categories as $category) { $compareproducts = \DB::table('products') ->select(\DB::raw('count(*) as counter')) ->where('id' , '<>', $category->id) ->where('brand_id', '=', $category->brand_id) ->where('category_id','=',$category->category_id) ->whereRaw('MATCH(product_name) AGAINST(? IN BOOLEAN MODE)', array($category->product_name)) ->get(); foreach ($compareproducts as $compareproduct) { if($compareproduct->counter >= 1){ $comparetable = true; }else{ $comparetable = false; } } $newarr[] = [ 'id'=>$category->id, 'product_name'=>$category->product_name, 'product_price'=>$category->product_price, 'product_price_temp'=>$category->product_price_temp, 'product_favorite'=>$category->product_favorite, 'product_reviews'=>$category->product_reviews, 'picture_link'=>$category->picture_link, 'shopper_link'=>$category->shopper_link, 'comparetable'=>$comparetable ]; } return $newarr; } } }
1.34375
1
vendor/willdurand/hateoas/src/Hateoas/Serializer/JMSSerializerMetadataAwareInterface.php
TestamentsDePoilus/api
1
107
<?php namespace Hateoas\Serializer; use Metadata\MetadataFactoryInterface; /** * @author <NAME> <<EMAIL>> */ interface JMSSerializerMetadataAwareInterface { public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); }
0.847656
1
src/AstuteoPulse.php
astuteo-llc/astuteo-pulse
0
115
<?php /** * Astuteo Pulse plugin for Craft CMS 3.x * * Connecting Astuteo client sites to our monitor. * * @link https://astuteo.com * @copyright Copyright (c) 2020 Astuteo */ namespace astuteo\astuteopulse; use Craft; use craft\base\Plugin; use astuteo\astuteopulse\jobs\services\BroadcastStatusService; use yii\base\Event; /** * @author Astuteo * @package AstuteoPulse * @since 1.0.0 * * @property Settings $settings * @method Settings getSettings() */ class AstuteoPulse extends Plugin { // Static Properties // ========================================================================= /** * Static property that is an instance of this plugin class so that it can be accessed via * AstuteoPulse::$plugin * * @var AstuteoPulse */ public static $plugin; // Public Properties // ========================================================================= public $schemaVersion = '3.0.0'; public $hasCpSettings = false; public $hasCpSection = false; // Public Methods // ========================================================================= public function init() { parent::init(); self::$plugin = $this; } }
1.101563
1
frontend/views/layouts/main.php
Felixatika/Felix-portfolio-landing
0
123
<?php /* @var $this \yii\web\View */ /* @var $content string */ use yii\helpers\Url; use yii\helpers\Html; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use yii\widgets\Breadcrumbs; use frontend\assets\AppAsset; use common\widgets\Alert; AppAsset::register($this); ?> <?php $this->beginPage() ?> <!DOCTYPE html> <html lang="<?= Yii::$app->language ?>"> <head> <meta charset="<?= Yii::$app->charset ?>"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php $this->registerCsrfMetaTags() ?> <title><?= Html::encode($this->title) ?></title> <meta content="Felix-portfolio-landing" name="descriptison"> <meta content="Felix-portfolio-landing" name="keywords"> <!-- Favicons --> <link href="images/favicon.png" rel="icon"> <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon"> <?php $this->head() ?> </head> <body> <?php $this->beginBody() ?> <body id="page-top"> <!-- ======= Header/ Navbar ======= --> <nav class="navbar navbar-b navbar-trans navbar-expand-md fixed-top" id="mainNav"> <div class="container"> <a class="navbar-brand js-scroll" href=""><img src="<?= Yii::$app->request->baseUrl;?>/images/felo1.png" height="70px" width="70px"></a> <button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarDefault" aria-controls="navbarDefault" aria-expanded="false" aria-label="Toggle navigation"> <span></span> <span></span> <span></span> </button> <div class="navbar-collapse collapse justify-content-end" id="navbarDefault"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link js-scroll active" href="<?= Url::to(['site/index'])?>">Home</a> </li> <li class="nav-item"> <a class="nav-link js-scroll" href="#about">About</a> </li> <li class="nav-item"> <a class="nav-link js-scroll" href="#service">Services</a> </li> <li class="nav-item"> <a class="nav-link js-scroll" href="#work">Work</a> </li> <!-- <li class="nav-item"> <a class="nav-link js-scroll" href="#blog">Blog</a> </li> --> <li class="nav-item"> <a class="nav-link js-scroll" href="#contact">Contact</a> </li> </ul> </div> </div> </nav> <?= Breadcrumbs::widget([ 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], ]) ?> <?= Alert::widget() ?> <?= $content ?> <main id="main"> <!-- ======= About Section ======= --> <section id="about" class="about-mf sect-pt4 route"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="box-shadow-full"> <div class="row"> <div class="col-md-6"> <div class="row"> <div class="col-sm-6 col-md-5"> <div class="about-img"> <img src="<?= Yii::$app->request->baseUrl;?>/images/felo.jpg" height="150px" width="150px"> <!-- <img src="images/felo.jpg" class="img-fluid rounded b-shadow-a" alt=""> --> </div> </div> <div class="col-sm-6 col-md-7"> <div class="about-info"> <p><span class="title-s">Name: </span> <span><NAME></span></p> <p><span class="title-s">Profile: </span> <span>full stack developer</span></p> <p><span class="title-s">Email: </span> <span><EMAIL></span></p> <p><span class="title-s">Phone: </span> <span>+254-72-296-5680</span></p> </div> </div> </div> <div class="skill-mf"> <p class="title-s">Skill</p> <span>HTML</span> <span class="pull-right">85%</span> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 85%;" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100"></div> </div> <span>CSS3</span> <span class="pull-right">75%</span> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div> </div> <span>PHP</span> <span class="pull-right">80%</span> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 80%" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div> </div> <span>JAVASCRIPT</span> <span class="pull-right">90%</span> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 90%" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100"></div> </div> <span>MOBILE DEVELOPMENT</span> <span class="pull-right">50%</span> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div> </div> </div> </div> <div class="col-md-6"> <div class="about-me pt-4 pt-md-0"> <div class="title-box-2"> <h5 class="title-left"> About me </h5> </div> <p class="lead"> I am a millenial computer sciencist. I love computing since its a great career field and a nice outlet for my creativity. I spend most of my time coding, surfing the web, listening to reggae music and most recently electronic music. At this point you must be thinking, “Wow! What a nerd!” </p> <p class="lead"> I beg to differ. I am not a nerd. Well, not in the sense of being opinionated and politically acute. I do enjoy doing a couple of other things that don't involve Data structures, vscode and staring at my terminal for a couple of hours. These things are: <b><em><a href= "favoritethings.html"> click here to see</a></em></b>; </p> <p class="lead"> To get to know more about my educational background and my work experience, have a look at my <b><em><a href= "resume.html">résumé.</a></em></b> </p> </div> </div> </div> </div> </div> </div> </div> </section><!-- End About Section --> <!-- ======= Services Section ======= --> <section id="service" class="services-mf pt-5 route"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="title-box text-center"> <h3 class="title-a"> Services </h3> <p class="subtitle-a"> The main goal i strive for is to provide excellency in my services without compromising anything whatsoever. </p> <div class="line-mf"></div> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-monitor"></i></span> </div> <div class="service-content"> <h2 class="s-title">Web Design</h2> <p class="s-description text-center"> Turn your website into elegancy and attract more clients to your site.Web design is a crucial aspect of web development.Making a first impression to the client matters alot. </p> </div> </div> </div> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-code-working"></i></span> </div> <div class="service-content"> <h2 class="s-title">Web Development</h2> <p class="s-description text-center"> I can help turn your ideas into a new driving force of your business to deliver projects on time and maintain top-notch code standards.I stress on quality,elegance and original. </p> </div> </div> </div> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-camera"></i></span> </div> <div class="service-content"> <h2 class="s-title">Photography</h2> <p class="s-description text-center"> I do photography as a part time hobby.Thank God for the great camera quality our phones now come with. It is because of such great technology that I am able to enjoy photography. I love taking photos of sunsets, clouds and food (like the typical millenial that I am!).You Can hire me for beautiful photos. </p> </div> </div> </div> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-android-phone-portrait"></i></span> </div> <div class="service-content"> <h2 class="s-title">Responsive Design</h2> <p class="s-description text-center"> Responsive design is an inevitable part of web design. Do you want your website to fit all device sizes either mobile or large desktopts,Worry no more!Reach out. </p> </div> </div> </div> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-paintbrush"></i></span> </div> <div class="service-content"> <h2 class="s-title">Graphic Design</h2> <p class="s-description text-center"> Need cool graphics for either your business or advertisements,Reach out.Only quality. At a both affordable and discounted price </p> </div> </div> </div> <div class="col-md-4"> <div class="service-box"> <div class="service-ico"> <span class="ico-circle"><i class="ion-stats-bars"></i></span> </div> <div class="service-content"> <h2 class="s-title">Marketing Services</h2> <p class="s-description text-center"> Digital marketing is a special sector for maketing of your products to reach out to as my clients as possible.You can never go wrong by investing in marketing services.Reach out and give your business a boost. </p> </div> </div> </div> </div> </div> </section><!-- End Services Section --> <!-- ======= Counter Section ======= --> <div class="section-counter paralax-mf bg-image" style="background-image: url(assets/img/counters-bg.jpg)"> <div class="overlay-mf"></div> <div class="container"> <div class="row"> <div class="col-sm-3 col-lg-3"> <div class="counter-box counter-box pt-4 pt-md-0"> <div class="counter-ico"> <span class="ico-circle"><i class="ion-checkmark-round"></i></span> </div> <div class="counter-num"> <p class="counter">450</p> <span class="counter-text">WORKS COMPLETED</span> </div> </div> </div> <div class="col-sm-3 col-lg-3"> <div class="counter-box pt-4 pt-md-0"> <div class="counter-ico"> <span class="ico-circle"><i class="ion-ios-calendar-outline"></i></span> </div> <div class="counter-num"> <p class="counter">15</p> <span class="counter-text">YEARS OF EXPERIENCE</span> </div> </div> </div> <div class="col-sm-3 col-lg-3"> <div class="counter-box pt-4 pt-md-0"> <div class="counter-ico"> <span class="ico-circle"><i class="ion-ios-people"></i></span> </div> <div class="counter-num"> <p class="counter">550</p> <span class="counter-text">TOTAL CLIENTS</span> </div> </div> </div> <div class="col-sm-3 col-lg-3"> <div class="counter-box pt-4 pt-md-0"> <div class="counter-ico"> <span class="ico-circle"><i class="ion-ribbon-a"></i></span> </div> <div class="counter-num"> <p class="counter">36</p> <span class="counter-text">AWARD WON</span> </div> </div> </div> </div> </div> </div><!-- End Counter Section --> <!-- ======= Portfolio Section ======= --> <section id="work" class="portfolio-mf sect-pt4 route"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="title-box text-center"> <h3 class="title-a"> Portfolio </h3> <p class="subtitle-a"> Welcome to my portifolio! </p> <div class="line-mf"></div> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="work-box"> <img src="images/work1.jpg" class="img-fluid rounded b-shadow-a" alt=""> <!-- <a href="images/work1.jpg" data-gall="portfolioGallery" class="venobox"> --> <div class="work-img"> <!-- <img src="assets/img/work1.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work1.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title"><NAME></h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2018</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> <div class="col-md-4"> <div class="work-box"> <!-- <a href="images/work2.jpg" data-gall="portfolioGallery" class="venobox"> --> <div class="work-img"> <!-- <img src="images/work2.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work2.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title">Pyramids</h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2018</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> <div class="col-md-4"> <div class="work-box"> <a href="images/work3.jpg" data-gall="portfolioGallery" class="venobox"> <div class="work-img"> <!-- <img src="images/work3.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work3.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title"><NAME></h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2018</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> <div class="col-md-4"> <div class="work-box"> <a href="images/work8.jpg" data-gall="portfolioGallery" class="venobox"> <div class="work-img"> <!-- <img src="images/work8.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work4.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title">Giraffee</h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2018</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> <div class="col-md-4"> <div class="work-box"> <a href="images/work5.jpg" data-gall="portfolioGallery" class="venobox"> <div class="work-img"> <!-- <img src="images/work5.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work5.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title">Have a cool day</h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2018</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> <div class="col-md-4"> <div class="work-box"> <a href="images/work6.jpg" data-gall="portfolioGallery" class="venobox"> <div class="work-img"> <!-- <img src="images/work6.jpg" alt="" class="img-fluid"> --> <img src="<?= Yii::$app->request->baseUrl;?>/images/work6.jpg"> </div> </a> <div class="work-content"> <div class="row"> <div class="col-sm-8"> <h2 class="w-title">Black Studio</h2> <div class="w-more"> <span class="w-ctegory">Web Design</span> / <span class="w-date">18 Sep. 2017</span> </div> </div> <div class="col-sm-4"> <div class="w-like"> <a href="portfolio-details.html"> <span class="ion-ios-plus-outline"></span></a> </div> </div> </div> </div> </div> </div> </div> </div> </section><!-- End Portfolio Section --> <!-- ======= Testimonials Section ======= --> <div class="testimonials paralax-mf bg-image" style="background-image: url(assets/img/overlay-bg.jpg)"> <div class="overlay-mf"></div> <div class="container"> <div class="row"> <div class="col-md-12"> <div id="testimonial-mf" class="owl-carousel owl-theme"> <div class="testimonial-box"> <div class="author-test"> <img src="assets/img/testimonial-2.jpg" alt="" class="rounded-circle b-shadow-a"> <span class="author"><NAME></span> </div> <div class="content-test"> <p class="description lead"> Great work can sound like an understatement!Great Great services! </p> <span class="comit"><i class="fa fa-quote-right"></i></span> </div> </div> <div class="testimonial-box"> <div class="author-test"> <img src="assets/img/testimonial-4.jpg" alt="" class="rounded-circle b-shadow-a"> <span class="author"><NAME></span> </div> <div class="content-test"> <p class="description lead"> Excellent services.I want to be coming for more and more.Thank you. </p> <span class="comit"><i class="fa fa-quote-right"></i></span> </div> </div> </div> </div> </div> </div> </div><!-- End Testimonials Section --> <!-- ======= Blog Section ======= --> <!-- <section id="blog" class="blog-mf sect-pt4 route"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="title-box text-center"> <h3 class="title-a"> Blog </h3> <p class="subtitle-a"> Lorem ipsum, dolor sit amet consectetur adipisicing elit. </p> <div class="line-mf"></div> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="card card-blog"> <div class="card-img"> <a href="blog-single.html"><img src="assets/img/post-1.jpg" alt="" class="img-fluid"></a> </div> <div class="card-body"> <div class="card-category-box"> <div class="card-category"> <h6 class="category">Travel</h6> </div> </div> <h3 class="card-title"><a href="blog-single.html">See more ideas about Travel</a></h3> <p class="card-description"> Proin eget tortor risus. Pellentesque in ipsum id orci porta dapibus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. </p> </div> <div class="card-footer"> <div class="post-author"> <a href="#"> <img src="assets/img/testimonial-2.jpg" alt="" class="avatar rounded-circle"> <span class="author"><NAME></span> </a> </div> <div class="post-date"> <span class="ion-ios-clock-outline"></span> 10 min </div> </div> </div> </div> <div class="col-md-4"> <div class="card card-blog"> <div class="card-img"> <a href="blog-single.html"><img src="assets/img/post-2.jpg" alt="" class="img-fluid"></a> </div> <div class="card-body"> <div class="card-category-box"> <div class="card-category"> <h6 class="category">Web Design</h6> </div> </div> <h3 class="card-title"><a href="blog-single.html">See more ideas about Travel</a></h3> <p class="card-description"> Proin eget tortor risus. Pellentesque in ipsum id orci porta dapibus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. </p> </div> <div class="card-footer"> <div class="post-author"> <a href="#"> <img src="assets/img/testimonial-2.jpg" alt="" class="avatar rounded-circle"> <span class="author"><NAME></span> </a> </div> <div class="post-date"> <span class="ion-ios-clock-outline"></span> 10 min </div> </div> </div> </div> <div class="col-md-4"> <div class="card card-blog"> <div class="card-img"> <a href="blog-single.html"><img src="assets/img/post-3.jpg" alt="" class="img-fluid"></a> </div> <div class="card-body"> <div class="card-category-box"> <div class="card-category"> <h6 class="category">Web Design</h6> </div> </div> <h3 class="card-title"><a href="blog-single.html">See more ideas about Travel</a></h3> <p class="card-description"> Proin eget tortor risus. Pellentesque in ipsum id orci porta dapibus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. </p> </div> <div class="card-footer"> <div class="post-author"> <a href="#"> <img src="assets/img/testimonial-2.jpg" alt="" class="avatar rounded-circle"> <span class="author"><NAME></span> </a> </div> <div class="post-date"> <span class="ion-ios-clock-outline"></span> 10 min </div> </div> </div> </div> </div> </div> --> <!-- </section> --> <!-- End Blog Section --> <!-- ======= Contact Section ======= --> <section class="paralax-mf footer-paralax bg-image sect-mt4 route" style="background-image: url(assets/img/overlay-bg.jpg)"> <div class="overlay-mf"></div> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="contact-mf"> <div id="contact" class="box-shadow-full"> <div class="row"> <div class="col-md-6"> <div class="title-box-2"> <h5 class="title-left"> Send Message Us </h5> </div> <div> <form action="forms/contact.php" method="post" role="form" class="php-email-form"> <div class="row"> <div class="col-md-12 mb-3"> <div class="form-group"> <input type="text" name="name" class="form-control" id="name" placeholder="<NAME>" data-rule="minlen:4" data-msg="Please enter at least 4 chars" /> <div class="validate"></div> </div> </div> <div class="col-md-12 mb-3"> <div class="form-group"> <input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" /> <div class="validate"></div> </div> </div> <div class="col-md-12 mb-3"> <div class="form-group"> <input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" /> <div class="validate"></div> </div> </div> <div class="col-md-12"> <div class="form-group"> <textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea> <div class="validate"></div> </div> </div> <div class="col-md-12 text-center mb-3"> <div class="loading">Loading</div> <div class="error-message"></div> <div class="sent-message">Your message has been sent. Thank you!</div> </div> <div class="col-md-12 text-center"> <button type="submit" class="button button-a button-big button-rouded">Send Message</button> </div> </div> </form> </div> </div> <div class="col-md-6"> <div class="title-box-2 pt-4 pt-md-0"> <h5 class="title-left"> Get in Touch </h5> </div> <div class="more-info"> <p class="lead"> Reach me in any convenient way below,either social media handles.NB:Im lazy in checking my social medias, it can take sometime, if urgent just drop your message in my direct line. </p> <ul class="list-ico"> <li><span class="ion-ios-location"></span> Kenya,Nairobi</li> <li><span class="ion-ios-telephone"></span> +254-72-296-5680</li> <li><span class="ion-email"></span><EMAIL></li> </ul> </div> <div class="socials"> <ul> <li><a href="https://www.facebook.com/felix.atique"><span class="ico-circle"><i class="ion-social-facebook"></i></span></a></li> <li><a href="https://www.instagram.com/felixatique/"><span class="ico-circle"><i class="ion-social-instagram"></i></span></a></li> <li><a href="https://www.linkedin.com/in/felix-atika-47309a124/"><span class="ico-circle"><i class="ion-social-linkedin"></i></span></a></li> <li><a href="https://twitter.com/felix_atika"><span class="ico-circle"><i class="ion-social-twitter"></i></span></a></li> <li><a href="https://github.com/Felixatika"><span class="ico-circle"><i class="ion-social-github"></i></span></a></li> <li><a href="https://www.reddit.com/user/Felixatika"><span class="ico-circle"><i class="ion-social-reddit"></i></span></a></li> </ul> </div> </div> </div> </div> </div> </div> </div> </div> </section><!-- End Contact Section --> </main><!-- End #main --> <!-- ======= Footer ======= --> <footer> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="copyright-box"> <p class="copyright">&copy; Copyright <strong>FelixFolio</strong>. All Rights Reserved</p> <div class="credits"> <!-- All the links in the footer should remain intact. You can delete the links only if you purchased the pro version. Licensing information: https://bootstrapmade.com/license/ Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/buy/?theme=DevFolio --> Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> </div> </div> </div> </div> </div> </footer><!-- End Footer --> <a href="#" class="back-to-top"><i class="fa fa-chevron-up"></i></a> <div id="preloader"></div> <?php $this->endBody() ?> </body> </html> <?php $this->endPage() ?>
1.117188
1
src/PHPCR/Util/Console/Command/WorkspaceCreateCommand.php
Brille24/phpcr-utils
39
131
<?php namespace PHPCR\Util\Console\Command; use PHPCR\RepositoryInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** * A command to create a workspace in the PHPCR repository. * * @license http://www.apache.org/licenses Apache License Version 2.0, January 2004 * @license http://opensource.org/licenses/MIT MIT License * @author <NAME> <<EMAIL>> * @author <NAME> <<EMAIL>> */ class WorkspaceCreateCommand extends BaseCommand { /** * {@inheritdoc} */ protected function configure() { $this ->setName('phpcr:workspace:create') ->addArgument('name', InputArgument::REQUIRED, 'Name of the workspace to create') ->addOption( 'ignore-existing', null, InputOption::VALUE_NONE, 'If set, an existing workspace will return a success code' ) ->setDescription('Create a workspace in the configured repository') ->setHelp( <<<'EOT' The <info>workspace:create</info> command creates a workspace with the specified name. It will fail if a workspace with that name already exists or if the repository implementation does not support the workspace creation operation. EOT ); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $session = $this->getPhpcrSession(); $workspaceName = $input->getArgument('name'); $workspace = $session->getWorkspace(); $repo = $session->getRepository(); if (!$repo->getDescriptor(RepositoryInterface::OPTION_WORKSPACE_MANAGEMENT_SUPPORTED)) { $output->writeln( '<error>Your PHPCR implementation does not support '. 'workspace management. Please refer to the documentation '. 'of your PHPCR implementation to learn how to create a workspace.</error>' ); return 1; } if (in_array($workspaceName, $workspace->getAccessibleWorkspaceNames())) { $output->writeln( sprintf('<comment>This repository already has a workspace called "%s"</comment>', $workspaceName) ); return $input->getOption('ignore-existing') ? 0 : 2; } $workspace->createWorkspace($workspaceName); $output->writeln(sprintf('<info>Created workspace "%s".</info>', $workspaceName)); return 0; } }
1.46875
1
backend/views/menu/update.php
jahongirX/certification
0
139
<?php use yii\helpers\Html; use yii\grid\GridView; use yii\helpers\Url; use yii\widgets\ActiveForm; $this->title = Yii::t('main', 'Update Menu'); $this->params['breadcrumbs'][] = ['label' => Yii::t('main', 'Menu'), 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; $this->params['breadcrumbs']['title'] = $this->title; $session = Yii::$app->session; if( $session->has('tab') ) { $tab = $session->get( 'tab' ); } else { $tab = 0; $session->set( 'tab', 0 ); } $langs = []; $langs[] = [ 'id' => Yii::$app->params['main_language_id'], 'label' => Yii::t('main','На основном языке').' (' . Yii::$app->params['main_language'] . ')', 'content' => $this->render('_form', [ 'id' => Yii::$app->params['main_language_id'], 'model' => $model, 'name' => Yii::$app->params['main_language'], ]), 'active' => $tab == 0 ? 'active' : '', ]; $languages = \common\models\Languages::find()->where('status>-1 AND NOT abb="' . Yii::$app->params['main_language'] . '"')->all(); foreach($languages as $language) { $lang_model = \common\models\MenuLang::find()->andFilterWhere(['parent' => $model->id, 'lang' => $language->id])->one(); if (empty($lang_model) || $lang_model == NULL) { $lang_model = new \common\models\MenuLang(); $action = "/menu-lang/create"; } else { $lang_model = \common\models\MenuLang::findOne($lang_model->id); $action = "/menu-lang/update/" . $lang_model->id; } $lang_model->parent = $model->id; $lang_model->lang = $language->id; $langs[] = [ 'id' => $language->id, 'label' => $language->name, 'content' => $this->render('/menu-lang/_form', [ 'id' => $language->id, 'model' => $lang_model, 'action' => $action, ]), 'active' => $tab == $language->id ? 'active' : '' ]; } ?> <div class="container-fluid container-fixed-lg m-t-20"> <div class="panel panel-transparent"> <div class="panel-heading no-padding"> <div class="panel panel-default"> <div class="panel-body page-header-block"> <h2><?= Html::encode($this->title) ?></h2> </div> </div> </div> <div class="panel-body no-padding row-default"> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <ul class="nav nav-tabs nav-tabs-simple hidden-xs" role="tablist" data-init-reponsive-tabs="collapse"> <?php foreach($langs as $lang){ ?> <li class="<?=$lang['active']?>"> <a href="#lang_<?=$lang['id']?>" data-toggle="tab"><?=$lang['label']?></a> </li> <?php } ?> </ul> </div> </div> <div class="tab-content"> <?php foreach($langs as $lang){ ?> <div class="tab-pane <?=$lang['active']?>" id="lang_<?=$lang['id']?>"> <div class="row column-seperation"> <?=$lang['content'];?> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <?php $session->set('tab',0); ?>
1.242188
1
app/Http/Controllers/QuestionController.php
Strong-Developer/FamilyStoryTeller
0
147
<?php namespace App\Http\Controllers; use App\Invite; use App\Category; use App\Question; use SendGrid; use Illuminate\Http\Request; Use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Session; class QuestionController extends Controller { // public function index () { $storytellers = Invite::where('type', 1)->get(); return view('question', compact('storytellers')); } public function getquery (Request $request) { $category = $request->input("category"); $categoryID = (Category::where('title', $category)-> first())->id; $queries = Category::where('parent', $categoryID)-> get(); return response()->json($queries); } public function sendmail(Request $request) { $category_id = $request->input("selQuery"); $storyteller_id = $request->input("selTeller"); $content = $request->input("tempText"); $to = (Invite::where('id', $storyteller_id)-> first())->email; $storyteller_name = (Invite::where('id', $storyteller_id)-> first())->first_name; $from = Session::get('email'); $collaborator_name = (Invite::where('email', $from)-> first())->first_name; $query = Question::where('storyteller_name', $storyteller_name) ->where('proceed', "0")->first(); if(isset($query->proceed)){ return response()->json(['status'=>$storyteller_name]); die(); } $collaborator_phone = (Invite::where('email', $from)-> first())->phone; if($content == "") { $question = (Category::where('id', $category_id)-> first())->title; } else { $question = $content; } ini_set('display_errors',1); error_reporting(E_ALL); $header = "From:".$from; $message = "Hi! " . $storyteller_name . " There’s a new question for you in your FamilyStoryMaker.io project. Please call ". "+17865162349" ." or reply to the email we sent to answer. '" . $question . "' from " . $collaborator_name; //mail($to,$from,$message,$header); $senderEmail = "<EMAIL>"; $senderName = "A collaborator"; $email = new SendGrid\Mail\Mail(); $email->setFrom($senderEmail, $senderName); $email->setSubject($header); $email->addTo($to); $email->addContent("text/plain", $message); $sendgrid = new SendGrid(getenv('SENDGRID_API_KEY')); try { $response = $sendgrid->send($email); $resultsend = $response->statusCode(); //echo($resultsend) ; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } $question = new Question; $question->category_id = $category_id; $question->storyteller_name = $storyteller_name; $question->collaborator_name = $collaborator_name; $question->content = $content; $question->proceed = "0"; $question->save(); return response()->json(['status'=>'success']); } }
1.148438
1
inf-server-side/organize/rate-rank.php
TianTcl/PathwaySpeechContest
0
155
<?php $dirPWroot = str_repeat("../", substr_count($_SERVER['PHP_SELF'], "/")-1); require($dirPWroot."e/Pathway-Speech-Contest/resource/hpe/init_ps.php"); $header_title = "จัดลำดับ"; $header_desc = "เรียงลำดับผลงานผู้เข้าประกวดตามสาย"; if (!(isset($_SESSION['evt2']) && $_SESSION['evt2']['EventID']==2)) header("Location: ./$my_url"); else if ($_SESSION['evt2']["force_pwd_change"]) header("Location: new-password$my_url"); $permitted = has_perm("judge"); if ($permitted) { } ?> <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php require($dirPWroot."e/Pathway-Speech-Contest/resource/hpe/heading.php"); require($dirPWroot."e/Pathway-Speech-Contest/resource/hpe/init_ss.php"); ?> <style type="text/css"> </style> <style type="text/css" for="lb-submission"> .lightbox .s-wrapper { max-height: calc(100vh - 100px); } .s-wrapper .load { padding: 12.5px 5px; } .s-wrapper .message { font-size: 18.75px; } .s-wrapper .video { margin-bottom: 10px; min-width: 640px; width: 100%; min-height: 360px; height: 360px; } .s-wrapper .video .wrapper { width: 100%; height: 100%; } .s-wrapper .video .wrapper iframe { width: inherit; height: inherit; border: none; } .s-wrapper .mark.table thead { background-color: var(--fade-black-8); } .s-wrapper .mark.table thead:not(:first-child) { border-top: 1.125px solid var(--clr-gg-grey-500); border-bottom: none; } .s-wrapper .mark.table thead:not(:last-child) { border-bottom: 1.125px solid var(--clr-gg-grey-500); } .s-wrapper .mark.table tbody { border: none; } .s-wrapper .mark.table tr > *:nth-child(1) { text-align: left; } .s-wrapper .mark.table :not(:first-child) tr > *:nth-child(2) { text-align: center; } .s-wrapper .mark.table :not(:first-child) tr > *:nth-child(3) { text-align: right; } .s-wrapper .mark.table tr td:nth-child(1) { padding-left: 25px; white-space: pre-wrap; } .s-wrapper .mark.table tr td:nth-child(3) { color: var(--clr-bs-gray); } .s-wrapper .mark.table tr output[type="number"] { color: var(--clr-bs-blue); } .s-wrapper .mark.table thead:last-child tr output[type="number"] { color: var(--clr-bs-green); } .s-wrapper .comment { margin-top: 10px; } .s-wrapper .comment ul { margin: 0px; padding: 0px; } .s-wrapper .comment ul li { list-style-type: none; } @media only screen and (max-width: 768px) { .s-wrapper .message { font-size: 12.5px; } .s-wrapper .video { min-width: 400; min-height: 320px; height: 320px; } } </style> <script type="text/javascript"> var viewCustomSubmission = function() { go_on(); return false; function go_on() { var idobj = document.querySelector('main form.tmp input[name="sbmtID"]'); const rawID = idobj.value.trim(); if (rawID.length) { if (parseInt(rawID) < idobj.min || parseInt(rawID) > idobj.max) app.ui.notify(1, [2, "Invalid submission ID"]); else { app.ui.lightbox.open("top", {title: "<?=$_COOKIE['set_lang']=="th"?"ดูผลงานและคะแนน":"View Submission & Score"?>", allowclose: true, html: '<div class="s-wrapper"><center class="load"><img src="/resource/images/widget-load_spinner.gif" draggable="false" height="50"></center></div>'}); /* $(".lightbox .head label").on("click", function() { history.replaceState(null, null, location.pathname+location.hash.replace(/&view=score$/, "")); }); */ setTimeout(function() { $(".lightbox .s-wrapper").load("/e/Pathway-Speech-Contest/resource/html/judge-grade.html?of=ID"+btoa((parseInt(rawID)*138).toString(36))); // history.replaceState(null, null, location.pathname+location.hash+"&view=score"); }, 750); } } else app.ui.notify(1, [1, "Please enter submission ID"]); } }; </script> </head> <body> <?php require($dirPWroot."e/Pathway-Speech-Contest/resource/hpe/header.php"); ?> <main shrink="<?php echo($_COOKIE['sui_open-nt'])??"false"; ?>"> <?php if (!$permitted) echo '<iframe src="/error/901">901: No Permission</iframe>'; else { ?> <div class="container"> <h2><?=$_COOKIE['set_lang']=="th"?"จัดลำดับสุนทรพจน์":"Rank speech"?></h2> <form class="tmp form inline"><div class="group"> <span><?=$_COOKIE['set_lang']=="th"?"เลขที่รายการรับ":"Submission ID"?></span> <input type="number" name="sbmtID" min="2" max="46"> <button onClick="return viewCustomSubmission()" class="blue" data-title="View" style="display: inline-flex; align-items: center;"><i class="material-icons">toc</i></button> </div></form> </div><?php } ?> </main> <?php require($dirPWroot."resource/hpe/material.php"); ?> <footer> <?php require($dirPWroot."e/Pathway-Speech-Contest/resource/hpe/footer.php"); ?> </footer> </body> </html>
1.234375
1
tests/InvoiceTest.php
voquis/pdfapi
0
163
<?php namespace AppTest; use Laravel\Lumen\Testing\DatabaseMigrations; use Laravel\Lumen\Testing\DatabaseTransactions; use Smalot\PdfParser\Parser; class InvoiceTest extends TestCase { /** * Test GET where POST is only allowed, expect 405 status code * * @return void */ public function testMethodNotAllowed(): void { $this->get('/invoice'); $this->assertEquals( 405, $this->response->getStatusCode() ); } /** * Test missing application/json Content-Type, expect 400 status code * * @return void */ public function testBadRequest(): void { $this->post('/invoice'); $this->assertEquals( 400, $this->response->getStatusCode() ); } /** * Test valid requests that returns PDF * * @return void */ public function testValidRequest(): void { $data = [ 'company' => [ 'name' => 'My Company', 'number' => 'OC123456', 'vatNumber' => 'GB1234567890', 'email' => '<EMAIL>', 'telephone' => '01234567890', 'website' => 'www.example.com', 'address' => [ 'line1' => 'line 1', 'line2' => 'line 2', 'city' => 'City', 'postcode' => 'PO57 C0D', ] ], 'invoice' => [ 'ref' => 'INV-1234', 'summary' => 'Invoice for some service', 'notes' => 'Invoice notes', 'instructions' => 'Invoice payment instructions', 'symbol' => '&pound;', 'net' => 100.0, 'tax' => 20.0, 'gross' => 120.0, 'company' => [ 'name' => 'Customer Company', 'address' => [ 'line1' => 'line 1', 'line2' => 'line 2', 'city' => 'City', 'postcode' => 'PO57 C0D', ] ], 'items' => [ [ 'quantity' => 1, 'description' => 'Description 1', 'net' => 1.5, 'taxPercent' => 20, 'gross' => 1.75, ] ], 'keyValuePairs' => [ [ 'key' => 'k1', 'value' => 'v1', ] ], ], 'logoHeight' => 40, 'emailTelUnderLogo' => true, ]; $this->json('POST', '/invoice', $data); // Assert HTTP status code $this->assertEquals(201, $this->response->getStatusCode()); // Verify PDF contents $parser = new Parser(); $pdf = $parser->parseContent($this->response->getContent()); $pdfText = $pdf->getText(); $this->assertStringContainsString($data['company']['name'], $pdfText); $this->assertStringContainsString($data['company']['telephone'], $pdfText); $this->assertStringContainsString(implode("\n", $data['company']['address']), $pdfText); $this->assertStringContainsString($data['invoice']['notes'], $pdfText); } }
1.328125
1
resources/views/Status/StatusEdit.blade.php
zulaa0722/UABZ
0
171
<div id="modalStatusEdit" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> {{-- modal-lg --}} <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title mt-0">Төлөв нэмэх</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <form id="frmStatusEdit" action="" method="post"> @csrf <input type="hidden" name="rowID" id="rowID"> <div class="form-group row"> <div class="col-md-12"> <label>Төлөв</label> <input class="form-control" type="text" id="estatusName" name="statusName"> </div> </div> <div class="clearfix"></div> </div> <div class="modal-footer"> <button type="submit" id="btnStatusUpdate" class="btn btn-primary">Хадгалах</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Хаах</button> </div> </form> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal -->
0.628906
1
app/Entity/Article.php
railt/railt.org
25
179
<?php /** * This file is part of railt.org package. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace App\Entity; use App\Entity\Article\Content; use App\Entity\Article\Image; use App\Entity\Common\BaseContent; use App\Entity\Common\Identifiable; use App\Entity\Common\Identifier; use App\Entity\Common\ProvidesContent; use App\Entity\Common\Timestampable; use App\Entity\Common\Timestamps; use Illuminate\Support\Str; use Renderer\RendererInterface; /** * Class Article */ class Article implements Identifiable, Timestampable, ProvidesContent { use Identifier; use Timestamps; /** * @var string */ protected $title; /** * @var string */ protected $urn = ''; /** * @var Image */ protected $preview; /** * @var Content */ protected $content; /** * Article constructor. * @param string $title * @param string $content */ public function __construct(string $title, string $content) { $this->title = $title; $this->urn = \str_slug($title); $this->content = new Content($content); $this->preview = new Image(); $this->actualize(); } /** * @return string */ public function getPreviewText(): string { $text = $this->getContent()->getBody(); $text = \strip_tags($text); return Str::words($text, 60); } /** * @return Image */ public function getPreview(): Image { return $this->preview; } /** * @param string $title */ public function rename(string $title): void { $this->title = $title; $this->urn = \str_slug($title); } /** * @return string */ public function getTitle(): string { return $this->title; } /** * @return string */ public function getUrn(): string { return $this->urn; } /** * @return Content */ public function getContent(): BaseContent { return $this->content; } /** * @param RendererInterface $renderer */ public function render(RendererInterface $renderer): void { $result = $renderer->render($this->content->getRawBody()); $this->content->update($result->getContent()); } }
1.5
2
application/app/League/Models/Requests.php
josephmancuso/gbaleague
0
187
<?php namespace App\League\Models; use Mira\Models\Model; class Requests extends Model { public $database = 'gbaleague'; }
0.363281
0
src/Oro/Bundle/WorkflowBundle/Entity/ProcessDefinition.php
umbrella-web/oro-platform
1
195
<?php namespace Oro\Bundle\WorkflowBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config; use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField; use Symfony\Component\Security\Acl\Model\DomainObjectInterface; /** * @ORM\Table("oro_process_definition") * @ORM\Entity() * @ORM\HasLifecycleCallbacks() * @Config( * routeName="oro_process_definition_index", * routeView="oro_process_definition_view", * defaultValues={ * "entity"={ * "icon"="icon-inbox" * }, * "security"={ * "type"="ACL", * "group_name"="" * }, * "note"={ * "immutable"=true * }, * "activity"={ * "immutable"=true * }, * "attachment"={ * "immutable"=true * } * } * ) */ class ProcessDefinition implements DomainObjectInterface { /** * @var string * * @ORM\Id * @ORM\Column(name="name", type="string", length=255) */ protected $name; /** * @var string * * @ORM\Column(name="label", type="string", length=255) */ protected $label; /** * @var boolean * * @ORM\Column(name="enabled", type="boolean") */ protected $enabled = true; /** * @var string * * @ORM\Column(name="related_entity", type="string", length=255) */ protected $relatedEntity; /** * @var integer * * @ORM\Column(name="execution_order", type="smallint") */ protected $executionOrder = 0; /** * @var array * * @ORM\Column(name="exclude_definitions", type="simple_array", nullable=true) */ protected $excludeDefinitions; /** * @var array * * @ORM\Column(name="actions_configuration", type="array") */ protected $actionsConfiguration; /** * @var \DateTime * * @ORM\Column(name="created_at", type="datetime") * @ConfigField( * defaultValues={ * "entity"={ * "label"="oro.ui.created_at" * } * } * ) */ protected $createdAt; /** * @var \DateTime * * @ORM\Column(name="updated_at", type="datetime") * @ConfigField( * defaultValues={ * "entity"={ * "label"="oro.ui.updated_at" * } * } * ) */ protected $updatedAt; /** * @param string $name * @return ProcessDefinition */ public function setName($name) { $this->name = $name; return $this; } /** * @return string */ public function getName() { return $this->name; } /** * @param string $label * @return ProcessDefinition */ public function setLabel($label) { $this->label = $label; return $this; } /** * @return string */ public function getLabel() { return $this->label; } /** * @param boolean $enabled * @return ProcessDefinition */ public function setEnabled($enabled) { $this->enabled = $enabled; return $this; } /** * @return boolean */ public function isEnabled() { return $this->enabled; } /** * @param string $relatedEntity * @return ProcessDefinition */ public function setRelatedEntity($relatedEntity) { $this->relatedEntity = $relatedEntity; return $this; } /** * @return string */ public function getRelatedEntity() { return $this->relatedEntity; } /** * @param integer $executionOrder * @return ProcessDefinition */ public function setExecutionOrder($executionOrder) { $this->executionOrder = $executionOrder; return $this; } /** * @return integer */ public function getExecutionOrder() { return $this->executionOrder; } /** * @param array $excludeDefinitions * @return ProcessDefinition */ public function setExcludeDefinitions(array $excludeDefinitions) { $this->excludeDefinitions = $excludeDefinitions; return $this; } /** * @return array */ public function getExcludeDefinitions() { return (array)$this->excludeDefinitions; } /** * @param array $configuration * @return ProcessDefinition */ public function setActionsConfiguration($configuration) { $this->actionsConfiguration = $configuration; return $this; } /** * @return array */ public function getActionsConfiguration() { return $this->actionsConfiguration; } /** * @param \DateTime $createdAt * @return ProcessDefinition */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @param \DateTime $updatedAt * @return ProcessDefinition */ public function setUpdatedAt($updatedAt) { $this->updatedAt = $updatedAt; return $this; } /** * @return \DateTime */ public function getUpdatedAt() { return $this->updatedAt; } /** * @ORM\PrePersist */ public function prePersist() { $this->createdAt = new \DateTime('now', new \DateTimeZone('UTC')); $this->preUpdate(); } /** * @ORM\PreUpdate */ public function preUpdate() { $this->updatedAt = new \DateTime('now', new \DateTimeZone('UTC')); } /** * @param ProcessDefinition $definition * @return ProcessDefinition */ public function import(ProcessDefinition $definition) { // enabled flag should not be imported $this->setName($definition->getName()) ->setLabel($definition->getLabel()) ->setRelatedEntity($definition->getRelatedEntity()) ->setExecutionOrder($definition->getExecutionOrder()) ->setActionsConfiguration($definition->getActionsConfiguration()) ->setExcludeDefinitions($definition->getExcludeDefinitions()); return $this; } /** * Returns a unique identifier for this domain object. * * @return string */ public function getObjectIdentifier() { return $this->getName(); } }
1.242188
1
backend/views/site/login.php
phamngocson1988/vietnamopening
0
203
<?php /* @var $this yii\web\View */ /* @var $form yii\bootstrap\ActiveForm */ /* @var $model \common\models\LoginForm */ use yii\helpers\Html; use yii\bootstrap\ActiveForm; $this->title = 'Login'; ?> <div> <div class="login_wrapper"> <div class="animate form login_form"> <section class="login_content"> <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> <h1>Login Form</h1> <?= $form->field($model, 'username', [ 'template' => "{input}{error}", ])->textInput(['autofocus' => true, 'class' => 'form-control', 'placeholder' => 'Username']) ?> <?= $form->field($model, 'password', [ 'template' => "{input}{error}", ])->passwordInput(['class' => 'form-control', 'placeholder' => 'Password']) ?> <div> <?= Html::submitButton('Login', ['class' => 'btn btn-default submit', 'name' => 'login-button']) ?> </div> <div class="clearfix"></div> <div class="separator"> <div class="clearfix"></div> <br /> <div> <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1> <p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p> </div> </div> <?php ActiveForm::end(); ?> </section> </div> </div> </div>
1.054688
1
fckeditor/editor/plugins/kfm/scripts/update.1.1.php
WPPlugins/foliopress-wysiwyg
0
211
<?php $version=$kfm_parameters['version']; if($version==''||$version=='7.0'||$version<'1.0')require KFM_BASE_PATH.'scripts/update.1.0.php'; $kfm_parameters['version']='1.1'; $kfmdb->query("delete from ".KFM_DB_PREFIX."parameters where name='version'"); $kfmdb->query("insert into ".KFM_DB_PREFIX."parameters (name,value) values ('version','".$kfm_parameters['version']."')"); ?>
1.140625
1
homepage.php
AmitHasanShuvo/Alif_project
2
219
<!DOCTYPE html> <html> <head> <title>INFINITY SHOP</title> <link rel="stylesheet" href="css/bootstrap.min.css"/> <link rel="stylesheet" href="css/main.css"/> <meta name="viewport" content="width=device-width,initial-scale=1,user-scaleable=no"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-default navbar-fixed-top" id="navbar"> <div class="container"> <a href="#" class="navbar-brand" id="text">INFINITY SHOP</a> <ul class="nav navbar-nav"> <!--DROP DOWN MENU--> </ul> </div> </nav> <!--INSERTING IMAGES--> <div id="background-image"> <div id="image-1"></div> </div> <!--REMOVING SPACE AND CENTERING IMAGES--> <div class="col-md-2"></div> <!--INSERTING FEATURED PRODUCTS--> <div class="col-md-8"> <div class="row"> <h2 class="text-center"><b>LOG IN</b></h2><br /> <div class="col-md-3"> <img src="images/login.jpg" alt="LOG IN" id="images"/> <form action="add_cart.php" method="post"> <div class="form-group"> <div class="form-group"> <label for="size">EMAIL:</label> <input type="text" class="form-control" id="quantity"name="quantity" /> </div><br /> <div class="form-group"> <label for="size">PASSWORD:</label> <input type="text" class="form-control" id="quantity"name="quantity" /> </div> </div> </form> <a href="/project/index.php" <button type="button" class="btn btn-success">LOG IN</button></a> </div> </div> <footer class="text-center" id="footer">&copy;copyright 2018-2019 INFINITY SHOP</footer> </div> </body> </html>
0.925781
1
resources/views/Alumni/daftarperusahaan.blade.php
dendinurmahmudi/smk_pasundan_2_banjaran
0
227
@extends('master') @section('judul','Data perusahaan') @section('class','fa fa-building-o fa-fw') @section('label','Data perusahaan') @extends('Alumni/sidebar') @section('konten') <div class="col-sm-12"> <div class="white-box"> <p class="text-muted m-b-30">Daftar perusahaan yang merekrut pekerja dari lulusan SMK Paundan 2 Banjaran untuk rekomendasi melamar pekerjaan ke perusahaan tersebut.</p> <div class="table-responsive"> <table id="example23" class="display nowrap" cellspacing="0" width="100%"> <thead> <tr> <th>No</th> <th>Perusahaan</th> <th>Alumni bekerja</th> <th>Sesuai kompetensi</th> <th>Merasa puas</th> </tr> </thead> <tbody> <?php $no=1; ?> @foreach($perusahaan as $p) <tr> @if($p->nama_perusahaan==null) @else <td>{{ $no++ }}</td> <td>{{ $p->nama_perusahaan }}</td> <td>{{ $p->jumlah }}</td> <td>{{ $p->kesesuaian }}</td> <td>{{ $p->kepuasan }}</td> @endif </tr> @endforeach </tbody> </table> </div> </div> </div> <script src="{{ asset('assets/templates/plugins/bower_components/datatables/jquery.dataTables.min.js') }}"></script> <!-- start - This is for export functionality only --> <script> $(document).ready(function() { $('#myTable').DataTable(); $(document).ready(function() { var table = $('#example').DataTable({ "columnDefs": [{ "visible": false, "targets": 2 }], "order": [ [2, 'asc'] ], "displayLength": 25, "drawCallback": function(settings) { var api = this.api(); var rows = api.rows({ page: 'current' }).nodes(); var last = null; api.column(2, { page: 'current' }).data().each(function(group, i) { if (last !== group) { $(rows).eq(i).before('<tr class="group"><td colspan="5">' + group + '</td></tr>'); last = group; } }); } }); // Order by the grouping $('#example tbody').on('click', 'tr.group', function() { var currentOrder = table.order()[0]; if (currentOrder[0] === 2 && currentOrder[1] === 'asc') { table.order([2, 'desc']).draw(); } else { table.order([2, 'asc']).draw(); } }); }); }); $('#example23').DataTable({ dom: 'Bfrtip', buttons: [ 's' ] }); </script> @endsection
1.148438
1
app/Model/Entity/LogEntity.php
inspira2015/laravel_inspira2015
1
235
<?php namespace App\Model\Entity; use App\Model\Dao\LogDao; class LogEntity extends LogDao { public $id; public $users_id; public $module; public $action; public $method; public $description; public function exchangeArray(array $valid_data) { $this->id = (isset($valid_data['id'])) ? trim($valid_data['id']) : 0; $this->users_id = (isset($valid_data['users_id'])) ? trim($valid_data['users_id']) : null; $this->module = (isset($valid_data['module'])) ? trim($valid_data['module']) : null; $this->action = (isset($valid_data['action'])) ? trim($valid_data['action']) : null; $this->method = (isset($valid_data['method'])) ? trim($valid_data['method']) : null; $this->description = (isset($valid_data['description'])) ? trim($valid_data['description']) : null; } }
1.15625
1
database/migrations/2021_01_14_134402_create_nota_ventas_table.php
WillanHurtado-Dev-Pent/management_si
0
243
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateNotaVentasTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('nota_ventas', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('descuento'); $table->string('fecha', 100)->default('23/02/2021'); $table->integer('monto'); $table->integer('tipo'); $table->integer('total'); /* $table->unsignedBigInteger('persona_id'); */ $table->unsignedBigInteger('paquete_id'); $table->unsignedBigInteger('bitacora_id'); $table->timestamps(); /* $table->foreign('persona_id')->references('id')->on('personas'); */ $table->foreign('paquete_id')->references('id')->on('paquetes'); $table->foreign('bitacora_id')->references('id')->on('bitacoras'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('nota_ventas'); } }
1.03125
1
resources/views/layouts/one.blade.php
plwebdesigns/bluecrm
0
251
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSRF Token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ config('app.name', 'Laravel') }}</title> <!-- Scripts --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="<KEY>" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <!-- Fonts --> <link rel="dns-prefetch" href="//fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> <!-- Styles --> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('sass/app.scss') }}" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous"> </head> <body> <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <img class="my-0 mr-md-auto" src="{{ asset('images/blue-logo.png') }}" height="95px" /> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse justify-content-end" id="navbarNav"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link text-white" href="{{ url('/') }}">Production</a> </li> <li class="nav-item"> <a class="nav-link text-white" href="{{ url('/#/admin') }}">Admin</a> </li> </ul> </div> </nav> <main class="container-fluid add_sale_main mt-4"> @yield('content') </main> </body> </html>
0.703125
1
Application/Runtime/Cache/Admin/c5e5a590f8def41735c09c7493f535ab.php
Dearzhumengren/TP3_APP
0
259
<?php if (!defined('THINK_PATH')) exit();?><!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--引入顶部--> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <title>明日科技后台</title> <link href="/APP/Public/css/module.css" rel="stylesheet"/> <link href="/APP/Public/css/bootstrap.min.css?v=3.4.0" rel="stylesheet"> <link href="/APP/Public/font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet"> <link href="/APP/Public/css/animate.css" rel="stylesheet"> <link href="/APP/Public/css/admin-style.css?v=2.2.0" rel="stylesheet"> <!-- Mainly scripts --> <script src="/APP/Public/js/jquery-2.1.1.min.js"></script> <script src="/APP/Public/js/bootstrap.min.js?v=3.4.0"></script> <!--Layer--> <script src="/APP/Public/static/layer/layer.js"></script> <script type="text/javascript" src="/APP/Public/js/admin.js"></script> <script src="/APP/Public/js/jquery.metisMenu.js"></script> <!-- Custom and plugin javascript --> <script src="/APP/Public/js/hplus.js?v=2.2.0"></script> </head> <body> <div id="wrapper"> <!--引入左则导航--> <script> $(function(){ var controller_name = "<?php echo CONTROLLER_NAME;?>"; var nav = $('.nav-second-level a'); nav.each(function(){ var url = $(this).attr('href'); console.log(url); if(url.indexOf('/'+controller_name) > 0){ $(this).parent().addClass('active'); return false; } }); }); </script> <nav class="navbar-default navbar-static-side" role="navigation"> <div class="sidebar-collapse"> <ul class="nav" id="side-menu"> <li class="nav-header" style="padding: 25px 20px;"> <div class="dropdown profile-element"> <span> <img alt="image" class="img-circle" height="60px" src="/APP/Public/images/profile_small.jpg" /> </span> <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#"> <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold"><?php echo (session('admin_username')); ?></strong> </span> <span class="text-muted text-xs block"><?php if(($_SESSION['admin_id']) == "1"): ?>超级管理员<?php else: ?>管理员<?php endif; ?> <b class="caret"></b></span> </span> </a> <ul class="dropdown-menu animated fadeInRight m-t-xs"> <li><a href="<?php echo U('Index/changePassword');?>">修改密码</a></li> <li class="divider"></li> <li><a href="<?php echo U('Public/logout');?>">安全退出</a> </li> </ul> </div> <div class="logo-element"> MR </div> </li> <li class="active"> <a href="#"><i class="fa fa-edit" style="width: 18px"></i> <span class="nav-label">管理</span> <span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="<?php echo U('HighLevel/lists');?>">高级分类</a></li> <li><a href="<?php echo U('MiddleLevel/lists');?>">中级分类</a></li> <li><a href="<?php echo U('ElementaryLevel/lists');?>">初级分类</a></li> <li><a href="<?php echo U('Datalist/lists');?>">数据管理</a></li> <li><a href="<?php echo U('Hot/lists');?>">热门管理</a></li> </ul> </li> </ul> </div> </nav> <div id="page-wrapper" class="gray-bg dashbard-1"> <div class="row border-bottom"> <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0"> <div class="navbar-header"> <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"> <i class="fa fa-bars"></i> </a> </div> <ul class="nav navbar-top-links navbar-right"> <li> <span class="m-r-sm text-muted welcome-message"> <a href="<?php echo U('Datalist/lists');?>" title="返回首页"><i class="fa fa-home"></i>欢迎使用明日导航后台</a> </span> </li> <li> <a href="<?php echo U('Public/logout');?>"> <i class="fa fa-sign-out"></i> 退出 </a> </li> </ul> </nav> </div> <!--顶部--> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5>添加分类</h5> </div> <div class="ibox-content"> <form class="form-horizontal m-t " method="post" action="<?php echo U('add');?>"> <input type="hidden" name='id' value="<?php echo ($_GET['id']); ?>"> <div class="form-group"> <label class="col-sm-3 control-label">首页显示位置:</label> <div class="col-sm-3"> <select name="layout"> <option value="left" <?php if(($data["layout"] == 'left')): ?>selected<?php endif; ?>>左侧</option> <option value="bottom" <?php if(($data["layout"] == 'bottom')): ?>selected<?php endif; ?>>底部</option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">名称:</label> <div class="col-sm-3"> <input type="text" id="high_name" class="form-control" name="high_name" value="<?php echo ($data["high_name"]); ?>"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">排序:</label> <div class="col-sm-3"> <input type="text" id="sort" class="form-control" name="sort" value="<?php echo ($data["sort"]); ?>"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">是否显示:</label> <input type="radio" value="0" name="is_display" <?php if(($data["is_display"] != 1)): ?>checked<?php endif; ?> /> 否 <input type="radio" value="1" name="is_display" <?php if(($data["is_display"] == 1)): ?>checked<?php endif; ?> /> 是 </div> <div class="form-group"> <div class="col-sm-4 col-sm-offset-3"> <button class="btn btn-primary" type="submit">提交</button> </div> </div> </form> </div> </div> </div> <!--尾部--> </div> <script> $('form').submit(function(){ var name = $('#high_name').val(); var sort = $("#sort").val(); if(name == ''){ layer.msg('请填写名称',{time:1000}); return false; } if(!sort || isNaN(sort)){ layer.msg('请填写排序,并且为数字',{time:1000}); return false; } }); </script> </div> </body> </html>
0.816406
1
src/Lits/Data/ShelfData.php
BGSU-LITS/depo
0
267
<?php declare(strict_types=1); namespace Lits\Data; use Lits\Database; use Lits\Exception\DuplicateInsertException; use Lits\Exception\InvalidDataException; use Lits\Settings; final class ShelfData extends DatabaseData { public string $module; public string $side; public string $section; public string $shelf; public ?string $tray_id = null; /** * @param mixed[] $row * @throws InvalidDataException */ public static function fromRow( array $row, Settings $settings, Database $database ): self { $shelf = new static($settings, $database); $shelf->module = self::checkString($row, 'module'); $shelf->side = self::checkString($row, 'side'); $shelf->section = self::checkString($row, 'section'); $shelf->shelf = self::checkString($row, 'shelf'); if ( isset($row['tray_id']) && \is_string($row['tray_id']) && $row['tray_id'] !== '' ) { $shelf->tray_id = $row['tray_id']; } return $shelf; } /** * @throws \PDOException * @throws DuplicateInsertException */ public function save(): void { $this->database->delete('shelf', [ 'module' => $this->module, 'side' => $this->side, 'section' => $this->section, 'shelf' => $this->shelf, ]); if (\is_null($this->tray_id)) { return; } $this->database->insert('shelf', [ 'module' => $this->module, 'side' => $this->side, 'section' => $this->section, 'shelf' => $this->shelf, 'tray_id' => $this->tray_id, ]); } /** * @param mixed[] $row * @throws InvalidDataException */ public static function checkString(array $row, string $key): string { if ( !isset($row[$key]) || !\is_string($row[$key]) || $row[$key] === '' ) { throw new InvalidDataException( 'The ' . $key . ' must be specified' ); } return $row[$key]; } }
1.5625
2
src/Captioning/Format/WebvttFile.php
danut007ro/captioning
0
275
<?php namespace Captioning\Format; use Captioning\File; class WebvttFile extends File { const TIMECODE_PATTERN = '#^([0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}) --> ([0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}) ?(.*)$#'; protected $regions = array(); public function parse() { $handle = fopen($this->filename, "r"); $parsing_errors = array(); if ($handle) { $case = 'header'; $i = 1; while (($line = fgets($handle)) !== false) { // checking header if ($case === 'header' && trim($line) != 'WEBVTT') { $parsing_errors[] = 'Missing "WEBVTT" at the beginning of the file'; } elseif ($case === 'header') { $case = 'region'; continue; } if ($case !== 'header') { // parsing regions if ($case === 'region' && substr($line, 0, 7) == 'Region:') { $this->addRegion(WebvttRegion::parseFromString($line)); continue; } if ($case === 'region' && trim($line) === '') { $case = 'body'; continue; } if ($case === 'body') { // parsing notes if (substr($line, 0, 4) === 'NOTE') { if (trim($line) === 'NOTE') { $note = $this->lineEnding; } else { $note = trim(ltrim($line, 'NOTE ')).$this->lineEnding; } // note continues until there is a blank line while (trim($line = fgets($handle)) !== '') { $note .= trim($line).$this->lineEnding; $i++; } continue; } // parsing cues $id_match = !strstr($line, '-->') && trim($line) != ''; $matches = array(); $timecode_match = preg_match(self::TIMECODE_PATTERN, $line, $matches); if ($id_match || $timecode_match) { $id = null; $start = null; $stop = null; $settings = null; $text = ''; if ($id_match) { $id = $line; $line = fgets($handle); $matches = array(); $timecode_match = preg_match(self::TIMECODE_PATTERN, $line, $matches); } if (!$timecode_match) { $parsing_errors[] = 'Malformed cue detected at line '.$i; } else { $start = $matches[1]; $stop = $matches[2]; $settings = trim($matches[3]); } // cue continues until there is a blank line while (trim($line = fgets($handle)) !== '') { $text .= trim($line).$this->lineEnding; } // make the cue object and add it to the file $cue = new WebvttCue($start, $stop, $text); $tmp = explode(' ', trim($settings)); foreach ($tmp as $setting) { $tmp2 = explode(':', $setting); if (count($tmp2) !== 2) { continue; } $cue->setSetting($tmp2[0], $tmp2[1]); } if ($id !== null) { $cue->setIdentifier($id); } if (!empty($note)) { $cue->setNote($note); unset($note); } $this->addCue($cue); unset($cue); continue; } } } $i++; } } else { throw new \Exception('Could not read the file "'.$this->filename.'".'); } fclose($handle); if (count($parsing_errors) > 0) { throw new \Exception('The following errors were found while parsing the file:'."\n".print_r($parsing_errors, true)); } return $this; } public function addRegion(WebvttRegion $_region) { $this->regions[] = $_region; return $this; } public function getRegion($_index) { if (!isset($this->regions[$_index])) { return; } return $this->regions[$_index]; } public function getRegions() { return $this->regions; } public function buildPart($_from, $_to) { $this->sortCues(); $buffer = "WEBVTT".$this->lineEnding; foreach ($this->regions as $region) { $buffer .= $region.$this->lineEnding; } $buffer .= $this->lineEnding; if ($_from < 0 || $_from >= $this->getCuesCount()) { $_from = 0; } if ($_to < 0 || $_to >= $this->getCuesCount()) { $_to = $this->getCuesCount()-1; } for ($j = $_from; $j <= $_to; $j++) { $buffer .= $this->getCue($j).$this->lineEnding; } $this->fileContent = $buffer; return $this; } }
1.921875
2
tests/bson/bug0347.phpt
kvwalker/mongo-php-driver
2
283
--TEST-- Test for PHPC-347: Memory leak decoding empty buffer --FILE-- <?php require_once __DIR__ . '/../utils/tools.php'; try { var_dump(toPHP('')); } catch (MongoDB\Driver\Exception\UnexpectedValueException $e) { echo $e->getMessage(), "\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- Could not read document from BSON reader ===DONE===
0.957031
1
72-acceptance-test/src/Backoffice/Auth/Application/Authenticate/AuthenticateUserCommandHandler.php
mlorente/symfony-maintainable-scalable-course
15
291
<?php declare(strict_types=1); namespace CodelyTv\Backoffice\Auth\Application\Authenticate; use CodelyTv\Backoffice\Auth\Domain\AuthPassword; use CodelyTv\Backoffice\Auth\Domain\AuthUsername; use CodelyTv\Shared\Domain\Bus\Command\CommandHandler; final class AuthenticateUserCommandHandler implements CommandHandler { public function __construct(private UserAuthenticator $authenticator) { } public function __invoke(AuthenticateUserCommand $command): void { $username = new AuthUsername($command->username()); $password = new AuthPassword($command->password()); $this->authenticator->authenticate($username, $password); } }
1.242188
1
routes/web.php
arif98741/dust-management
0
299
<?php use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; Route::get('/', 'HomeController@index'); Route::get('/user-register', 'HomeController@userRegister'); Route::post('/user-register', 'HomeController@saveUser'); Route::get('/see-dust-request', 'HomeController@seeDustRequest'); Route::get('do/logout', function () { Auth::logout(); return redirect('/'); }); /** * Routes For Admin */ Route::namespace('Admin') ->middleware(['admin', 'web']) ->prefix('admin') ->as('admin.') ->group(function () { Route::get('dashboard', 'AdminController@index'); Route::resource('driver', 'DriverController'); Route::resource('driver', 'DriverController'); Route::get('dust-request', 'DustController@Dustrequest'); Route::get('/payment-list', 'DustController@PaymentList'); Route::get('/change-payment-status/{status}', 'DustController@changePaymentStatus'); }); /** * Routes For Driver */ Route::group(['middleware' => 'driver', 'prefix' => 'driver'], function () { Route::get('dashboard', 'Driver\DriverController@index'); Route::get('request', 'Driver\DriverController@request'); Route::get('accept-request/{id}', 'Driver\DriverController@Acceptrequest'); }); /** * Routes For User * @prefix user * @namespace */ Route::group(['middleware' => 'user', 'prefix' => 'user'], function () { Route::get('dashboard', 'User\UserController@index'); Route::get('my-request', 'User\UserController@myRequest'); Route::get('add-new-request', 'User\UserController@addNewRequest'); Route::post('add-new-request', 'User\UserController@saveNewRequest'); Route::match(['get', 'post'], '/add-payment', 'User\UserController@AddPayment'); Route::get('/payment-list', 'User\UserController@PaymentList'); }); Auth::routes(); Route::get('denied', function () { return view('errors.permission-denied'); })->name('denied');
0.859375
1
src/hitchLibrary/Hitch/Mapping/Annotation/XmlList.php
qutub11/Hotstar-Video-Download
17
307
<?php /** * This file is part of the Hitch package * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Hitch\Mapping\Annotation; use Doctrine\Common\Annotations\Annotation; /** * XmlList maps a property to a collection of XML nodes * * @author marc */ class XmlList extends Annotation { public $name; public $type; public $wrapper; }
1
1
backend/models/Transaction.php
SeenSeens/perfumein
0
315
<?php namespace backend\models; use Yii; /** * This is the model class for table "Transaction". * * @property int $ID_Transaction * @property string $Status * @property int $ID_Users * @property string $Full_Name * @property string $Email */ class Transaction extends \yii\db\ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return 'Transaction'; } /** * {@inheritdoc} */ public function rules() { return [ [['ID_Users'], 'integer'], [['Status'], 'string', 'max' => 20], [['Full_Name', 'Email'], 'string', 'max' => 200], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'ID_Transaction' => 'Mã giao dịch', 'Status' => 'Trạng thái', 'ID_Users' => 'Mã người dùng', 'Full_Name' => '<NAME>', 'Email' => 'Thư điện tử', ]; } }
1.234375
1
src/User/HTMLForm/UserLoginForm.php
SpaceLenore/ramverk1-project
0
323
<?php namespace Lenore\User\HTMLForm; use Anax\HTMLForm\FormModel; use Psr\Container\ContainerInterface; use Lenore\User\User; /** * Example of FormModel implementation. */ class UserLoginForm extends FormModel { /** * Constructor injects with DI container. * * @param Psr\Container\ContainerInterface $di a service container */ public function __construct(ContainerInterface $di) { parent::__construct($di); $this->form->create( [ "id" => __CLASS__, "legend" => "User Login" ], [ "user" => [ "type" => "text", "placeholder" => "Username", ], "password" => [ "type" => "password", "placeholder" => "password", ], "submit" => [ "type" => "submit", "value" => "Login", "callback" => [$this, "callbackSubmit"] ], ] ); } /** * Callback for submit-button which should return true if it could * carry out its work and false if something failed. * * @return boolean true if okey, false if something went wrong. */ public function callbackSubmit() { $username = $this->form->value("user"); $password = $this->form->value("password"); $user = new User(); $user->setDb($this->di->get("dbqb")); $res = $user->verifyPassword($username, $password); if (!$res) { $this->form->rememberValues(); $this->form->addOutput("User or password did not match."); return false; } $this->form->addOutput("User " . $user->username . " logged in."); //Set session to active $session = $this->di->get("session"); $response = $this->di->get("response"); $session->set("login", $user->id); $response->redirect("profile"); // return true; } }
1.5625
2
config/setting.php
Socotoly/Stasis
0
331
<?php return [ 'roles' => [ 'owner', 'admin', 'manage_users' ] ];
0.07666
0
app/AwardCategory.php
graspsoftwaresolutions/payroll
0
339
<?php namespace App; use Illuminate\Database\Eloquent\Model; class AwardCategory extends Model { protected $fillable = [ 'created_by', 'award_title', 'publication_status', 'deletion_status', ]; }
0.65625
1
bonfire/Modules/Guides/Language/en/Guides.php
mostafakhudair/Bonfire2
42
347
<?php /** * This file is part of Bonfire. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ return [ 'invalidCollection' => 'The collection is invalid or misconfigured.', 'invalidPage' => 'That page is not valid.', ];
0.464844
0
resources/views/welcome.blade.php
aldirizaldi14/Orbitwebase2
0
355
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <!-- begin::Head --> <head> <meta charset="utf-8" /> <title> {{ env('APP_NAME') }} </title> <meta name="description" content="{{ env('APP_DESC') }}"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!--begin:: Styles --> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/vendors.css') }}" rel="stylesheet"> <link href="{{ asset('themes/metronic/style.bundle.css') }}" rel="stylesheet"> <!--end:: Styles --> <link rel="shortcut icon" href="{{ asset('images/icon.png') }}" /> </head> <!-- end::Head --> <!-- begin::Body --> <body class="m-page--fluid m--skin- m-content--skin-light2 m-header--fixed m-header--fixed-mobile m-aside-left--enabled m-aside-left--skin-dark m-aside-left--offcanvas m-footer--push m-aside--offcanvas-default" > <!-- begin:: Page --> <div class="m-grid m-grid--hor m-grid--root m-page"> <!-- BEGIN: Header --> @include('templates.header') <!-- END: Header --> <!-- begin::Body --> <div class="m-grid__item m-grid__item--fluid m-grid m-grid--ver-desktop m-grid--desktop m-body"> <!-- BEGIN: Left Aside --> @include('templates.sidebar') <!-- END: Left Aside --> @yield('content') </div> <!-- end:: Body --> <!-- begin::Footer --> @include('templates.footer') <!-- end::Footer --> </div> <!-- end:: Page --> <!-- begin::Scroll Top --> <div id="m_scroll_top" class="m-scroll-top"> <i class="la la-arrow-up"></i> </div> <!-- end::Scroll Top --> <!--begin::Base Scripts --> <script src="{{ asset('js/app.js') }}" type="text/javascript"></script> <script src="{{ asset('js/vendors.js') }}" type="text/javascript"></script> <!--end::Base Scripts --> </body> <!-- end::Body --> </html>
0.734375
1
src/RESTFul/RESTService.php
PHPPlatform/restful
0
363
<?php /** * User: Raaghu * Date: 20-10-2015 * Time: PM 10:51 */ namespace PhpPlatform\RESTFul; interface RESTService{ }
0.380859
0
helper.createTransaction.php
eiriarte-mendez/php-sdk
0
371
<?php require __DIR__ . '/vendor/autoload.php'; require_once "ratepay_credentials.php"; // Helper opens a new transaction (PaymentInit & PaymentRequest) to use it in further requests. $mbHead = new RatePAY\ModelBuilder(); $mbHead->setArray([ 'SystemId' => "Example", 'Credential' => [ 'ProfileId' => PROFILE_ID, 'Securitycode' => SECURITYCODE ], ]); $rb = new RatePAY\RequestBuilder(true); $paymentInit = $rb->callPaymentInit($mbHead); if (!$paymentInit->isSuccessful()) die("PaymentInit not successful"); $transactionId = $paymentInit->getTransactionId(); $mbHead->setTransactionId($transactionId); $mbHead->setCustomerDevice( $mbHead->CustomerDevice()->setDeviceToken("<PASSWORD>") ); $mbContent = new RatePAY\ModelBuilder('Content'); $mbContent->setArray([ 'Customer' => [ 'Gender' => "f", 'FirstName' => "Alice", 'LastName' => "Nobodyknows", 'DateOfBirth' => "1975-12-17", 'IpAddress' => "127.0.0.1", 'Addresses' => [ [ 'Address' => [ 'Type' => "billing", 'Street' => "Hive Street 12", 'ZipCode' => "12345", 'City' => "Raccoon City", 'CountryCode' => "de", ] ] ], 'Contacts' => [ 'Email' => "<EMAIL>", 'Phone' => [ 'DirectDial' => "012 3456789" ], ], ], 'ShoppingBasket' => [ 'Items' => [ [ 'Item' => [ 'Description' => "Test product 1", 'ArticleNumber' => "ArtNo1", 'Quantity' => 1, 'UnitPriceGross' => 300, 'TaxRate' => 19, ] ], [ 'Item' => [ 'Description' => "Test product 2", 'ArticleNumber' => "ArtNo2", 'Quantity' => 2, 'UnitPriceGross' => 100, 'TaxRate' => 19, 'Discount' => 10 ] ] ] ], 'Payment' => [ 'Method' => "invoice", 'Amount' => 480 ] ]); $rb = new RatePAY\RequestBuilder(true); $paymentRequest = $rb->callPaymentRequest($mbHead, $mbContent); if (!$paymentRequest->isSuccessful()) die("PaymentRequest not successful");
1.453125
1
vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php
hasanbasri2307/tata
0
379
<?php namespace Mockery\Adapter\Phpunit; /** * Integrates Mockery into PHPUnit. Ensures Mockery expectations are verified * for each test and are included by the assertion counter. */ trait MockeryPHPUnitIntegration { /** * Performs assertions shared by all tests of a test case. This method is * called before execution of a test ends and before the tearDown method. */ protected function assertPostConditions() { parent::assertPostConditions(); // Add Mockery expectations to assertion count. if (($container = \Mockery::getContainer()) !== null) { $this->addToAssertionCount($container->mockery_getExpectationCount()); } // Verify Mockery expectations. \Mockery::close(); } }
1.21875
1
aula-06/exercicio-04.php
NicoCassio/cursoemvideo-php
0
387
<html> <head> <meta charset="utf-8" /> <title>Aprendendo PHP</title> <link rel="stylesheet" href="../_css/estilo.css" /> </head> <body> <div id="interface"> <header id="cabecalho"> <h1>Aprendendo novidades em PHP</h1> </header> <section id="corpo"> <?php $x = "abc"; $$x = "def"; echo "Conteúdo de 'x': $x"; echo "<br />Conteúde de 'abc': $abc"; ?> </section> </div> </body> </html>
0.710938
1
rules/DeadCode/Contract/ConditionInterface.php
echo511/rector-src
37
395
<?php declare(strict_types=1); namespace Rector\DeadCode\Contract; interface ConditionInterface { }
0.566406
1
resources/views/frontend/sliders/slider.blade.php
neyamulkn/ecom-multi
0
403
<div class="container-fluid page-builder-ltr"> <div class="row row_a90w row-style "> <!--- SLider right--> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 col_dg1b slider-right"> <div class="module sohomepage-slider so-homeslider-ltr "> <div class="modcontent"> <div id="sohomepage-slider1"> <div class="so-homeslider sohomeslider-inner-1"> @foreach($sliders as $slider) <div class="item"> <a href="{{$slider->btn_link}}" target="_self"> <img style="max-height: 350px" class="responsive" src="{{asset('upload/images/slider/'.$slider->phato)}}" alt="slider image"> </a> <div class="slider-details"> <div class="slider-content-5 slider-animated-1 text-{{$slider->text_position}}"> <h1><strong style="font-size:{{$slider->title_size}}px; color:{{$slider->title_color}}; font-family: {{$slider->title_style}}"> {{ $slider->title }} </strong></h1> <p style="font-size:{{$slider->title_size}}px; color:{{$slider->title_color}}; font-family: {{$slider->title_style}}">{{$slider->subtitle}}</p> @if($slider->btn_text) <a href="{{$slider->btn_link}}" class="btn btn-info">{{($slider->btn_text) ? $slider->btn_text : 'SHOP NOW'}}</a>@endif </div> </div> </div> @endforeach </div> </div> </div> </div> </div> </div> </div> </section>
1.015625
1
tests/Feature/Page/MemberPasswordChangeTest.php
elrichuang/meedu
1
411
<?php namespace Tests\Feature\Page; use App\Services\Member\Models\User; use Illuminate\Support\Facades\Hash; use Tests\TestCase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; class MemberPasswordChangeTest extends TestCase { public function test_member_password_change() { $user = factory(User::class)->create(); $this->actingAs($user) ->visit(route('member.password_reset')) ->assertResponseStatus(200); } public function test_member_password_change_action() { $password = '<PASSWORD>'; $user = factory(User::class)->create([ 'password' => <PASSWORD>($password), ]); $newPassword = '<PASSWORD>'; $this->actingAs($user) ->visit(route('member.password_reset')) ->type($newPassword, 'new_password') ->type($newPassword, 'new_password_confirmation') ->type($password, 'old_password') ->press('修改密码') ->assertResponseStatus(200); // 断言密码修改成功 $user->refresh(); $this->assertTrue(Hash::check($newPassword, $user->password)); } }
1.320313
1
src/datasource/vector.php
trialforce/blend
7
419
<?php namespace DataSource; /** * Query datasource */ class Vector extends DataSource { /** * Data * * @var array */ protected $data; protected $fullData; public function __construct($data) { if ($data instanceof \Db\Collection) { $data = $data->getData(); } $this->setData($data); } public function getCount() { return count($this->fullData); } public function setData($data) { $this->data = $data; $this->fullData = $data; } public function getData() { //make order if needed if (!is_null($this->getOrderBy())) { usort($this->fullData, array($this, "compareToOrder")); } //make pagination work on array if ($this->getLimit() && $this->getOffset() || $this->getOffset() == '0') { $this->data = array_slice($this->fullData, $this->getOffset(), $this->getLimit()); } return $this->data; } public function compareToOrder($first, $second) { $columnName = $this->getOrderBy(); $orderWay = $this->getOrderWay(); $firstl = ''; $secondl = ''; if (isset($first->$columnName)) { $firstl = strtolower($first->$columnName); //obtém só os caracteres numéricos caso seja um valor numérico if (\Type\Integer::isNumeric($firstl)) { $firstl = \Type\Integer::onlyNumbers($firstl); } } if (isset($second->$columnName)) { $secondl = strtolower($second->$columnName); if (\Type\Integer::isNumeric($secondl)) { $secondl = \Type\Integer::onlyNumbers($secondl); } } if ($firstl == $secondl) { return 0; } else if (strtoupper($orderWay) == \Db\Model::ORDER_ASC) { return ($firstl > $secondl) ? +1 : -1; } else { return ($firstl > $secondl) ? -1 : +1; } } public function executeAggregator(Aggregator $aggregator) { $data = $this->fullData; $columnName = $aggregator->getColumnName(); $money = false; $total = 0; if (is_array($data)) { //TODO make other aggregation methods if ($aggregator->getMethod() == Aggregator::METHOD_SUM) { foreach ($data as $item) { $value = $item->$columnName; if ($value instanceof \Type\Generic) { $value = $value->toDb(); } //add suporte for braizilian real if (stripos($value, 'R$') === 0) { $money = true; $value = \Type\Money::get($value)->toDb(); } else { $value = \Type\Decimal::get($value)->toDb(); } $total += $value; } } else if ($aggregator->getMethod() == Aggregator::METHOD_COUNT) { $total = count($data); } } if ($money) { $total = \Type\Money::get($total); } else { $total = \Type\Decimal::get($total); } return $aggregator->getLabelledValue($total); } }
1.617188
2
src/Snippets/MethodSignatures/ExecTrait.php
dereuromark/upgrade
21
427
<?php /** * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 3.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ namespace Cake\Upgrade\Snippets\MethodSignatures; trait ExecTrait { /** * @param string $string * @param array $replacements * * @return string */ protected function exec(string $string, array $replacements): string { return $this->_updateContents($string, $replacements); } }
1.085938
1
tests/swoole_http_server_coro/rawContent_get_big_data.phpt
luolaifa000/swoole-src
18,795
435
--TEST-- swoole_http_server_coro: rawContent get big data --SKIPIF-- <?php require __DIR__ . '/../include/skipif.inc'; ?> --FILE-- <?php require __DIR__ . '/../include/bootstrap.php'; use Swoole\Coroutine\Http\Server; use Swoole\Http\Request; use Swoole\Http\Response; use function Swoole\Coroutine\run; $pm = new SwooleTest\ProcessManager; $pm->initRandomData(1, 64 * 1024); $pm->parentFunc = function () use ($pm) { run(function () use($pm) { httpRequest("http://127.0.0.1:{$pm->getFreePort()}/", [ 'method' => 'POST', 'data' => $pm->getRandomData(), ]); }); $pm->kill(); }; $pm->childFunc = function () use ($pm) { run(function () use($pm) { $server = new Server('127.0.0.1', $pm->getFreePort()); $server->handle('/', function (Request $request, Response $response) use ($pm) { Assert::assert($request->rawContent() === $pm->getRandomData()); Assert::length($request->rawContent(), 64 * 1024); }); $server->start(); }); }; $pm->childFirst(); $pm->run(); ?> --EXPECT--
1.445313
1
functions.php
soup-bowl/wordpress-headless-theme
1
443
<?php add_action( 'login_enqueue_scripts', function() { wp_enqueue_style( 'notheme-login-style', trailingslashit( get_stylesheet_directory_uri() ) . 'admin.css' ); }); add_action( 'admin_menu', function() { remove_menu_page( 'edit.php' ); remove_menu_page( 'edit.php?post_type=page' ); remove_menu_page( 'edit-comments.php' ); remove_menu_page( 'upload.php' ); }); add_action( 'wp_dashboard_setup', function() { global $wp_meta_boxes; unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] ); }); add_action( 'wp_before_admin_bar_render', function() { global $wp_admin_bar; $wp_admin_bar->remove_menu( 'site-name' ); $wp_admin_bar->remove_menu( 'view-site' ); $wp_admin_bar->remove_menu( 'comments' ); $wp_admin_bar->remove_menu( 'new-post' ); $wp_admin_bar->remove_menu( 'new-media' ); $wp_admin_bar->remove_menu( 'new-page' ); });
0.746094
1
tests/CodePageTest.php
karlerss/detect-encoding
18
451
<?php namespace Onnov\DetectEncoding\Tests; use Onnov\DetectEncoding\CodePage; use Onnov\DetectEncoding\EncodingDetector; use PHPUnit\Framework\TestCase; class CodePageTest extends TestCase { public function testInstance() { $codePage = new CodePage(); $this->assertInstanceOf(CodePage::class, $codePage); } public function testGetRange() { $cyrillicUppercase = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФЧЦЧШЩЪЫЬЭЮЯ'; $cyrillicLowercase = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'; $codePage = new CodePage(); $this->assertSame( [ EncodingDetector::IBM866 => [ 'upper' => '128-148, 150-159, 240', 'lower' => '160-175, 224-239, 241', ] ], $codePage->getRange( $cyrillicUppercase, $cyrillicLowercase, EncodingDetector::IBM866 ) ); $this->assertSame( [ EncodingDetector::KOI8_R => [ 'upper' => '179, 224-231, 233-255', 'lower' => '163, 192-223' ] ], $codePage->getRange( $cyrillicUppercase, $cyrillicLowercase, EncodingDetector::KOI8_R ) ); } }
1.3125
1
src/SuiviBundle/Controller/SuiviController.php
malekboussaa/PIDEV2020
0
459
<?php namespace SuiviBundle\Controller; use Doctrine\ORM\EntityRepository; use SuiviBundle\Entity\Classe; use SuiviBundle\Entity\ListeAppel; use SuiviBundle\Form\ListeAppelType; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use UserBundle\Entity\User; use UserBundle\Form\RegistrationType; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; class SuiviController extends Controller { function AfficherCAction(){ $classe=new Classe(); $cl=$this->getDoctrine()->getRepository(Classe::class)->findAll(); return $this->render('@Suivi/Suivi/afficherc.html.twig',array('cl'=>$cl)); } function AjoutLAAction($id,Request $request){ $la=new ListeAppel(); $eleve=$this->getDoctrine()->getRepository(User::class)->FindCl($id); $classe=$this->getDoctrine()->getRepository(Classe::class)->find($id); return $this->render('@Suivi/Suivi/ajoutla.html.twig',array('e'=>$eleve,'cl'=>$classe,'la'=>$la)); } function AjoutAAction(Request $request,$ide,$idc){ $la=new ListeAppel(); $eleve1=$this->getDoctrine()->getRepository(User::class)->Find($ide); $classe=$this->getDoctrine()->getRepository(Classe::class)->find($idc); $Form=$this->createFormBuilder($la) ->add('eleve', EntityType::class, [ 'class' => User::class, 'query_builder' => function (EntityRepository $er) use ($ide) { return $er->createQueryBuilder('u') ->where('u.id =:id')->setParameter('id',$ide); }, 'choice_label' => 'nom', ] ) ->add('date') ->add('Ajout',SubmitType::class,['attr'=>['formnovalidate'=>'formnovalidate']]) ->getForm(); $Form->handleRequest($request); $em=$this->getDoctrine()->getManager(); if($Form->isSubmitted() && $Form->isValid()) { $la->setEleve($eleve1); $la->setClasse($classe); $la->setEtat('Absent'); $em->persist($la); $em->flush(); return $this->redirectToRoute('affichela', array('id' => $idc)); } return $this->render('@Suivi/Suivi/ajoutabsence.html.twig',array('form'=>$Form->createView())); } function AfficherLAAction($id){ $la=$this->getDoctrine()->getRepository(ListeAppel::class)->findC($id); return $this->render('@Suivi/Suivi/afficherla.html.twig',array('la'=>$la)); } function DeleteAction($id){ $em=$this->getDoctrine()->getManager(); $la = $em->getRepository(ListeAppel::class)->find($id); $em->remove($la); $em->flush(); $cl=$la->getClasse(); $idc=$cl->getId(); return $this->redirectToRoute('affichela',array('id'=>$idc)); } function UpdateAction(Request $request,$id){ $em=$this->getDoctrine()->getManager(); $la = $em->getRepository(ListeAppel::class)->find($id); $Form=$this->createForm(ListeAppelType::class,$la); $Form->handleRequest($request); if($Form->isSubmitted() && $Form->isValid()) { $em->flush(); $cl=$la->getClasse(); $idc=$cl->getId(); return $this->redirectToRoute('affichela',array('id'=>$idc)); } return $this->render('@Suivi/Suivi/update.html.twig',array('form'=>$Form->createView())); } public function searchAction(Request $request) { $em =$this->getDoctrine()->getManager(); $requestString = $request->get('q'); $rec=$em->getRepository(User::class)->ChercherNom($requestString); if(!$rec) { $result['rec']['error'] = "Eleve Non Trouvé :( "; } else { $result['rec'] = $this->getRealEntities($rec); } return new Response(json_encode($result)); } public function getRealEntities($rec){ foreach ($rec as $rec){ $realEntities[$rec->getId()] = [$rec->getNom(),$rec->getPrenom(),$rec->getId(),$rec->getClasse()->getId()]; } return $realEntities; } }
1.5
2
kontakt.php
artlessmaster/ostseebibelkonferenz
0
467
<?php if ($_POST['inputName']!="" and $_POST['inputEmail']!="") { $empf = "<EMAIL>"; $betreff = "Neue Anmeldung"; $from = "From: "; $from .= $_POST['inputName']; $from .= " <"; $from .= $_POST['inputEmail']; $from .= ">\n"; $from .= "Reply-To: " $from .= $_POST['inputEmail']; $from .= "\n"; $from .= "Content-Type: test/html\n"; $text = "<h1>Neue Anmeldung von</h1><p>"; $text .= $_POST['inputName']; $text .= "für <strong>"; $text .= $_POST['inputAnzahlErwachsene']; $text .= "Erwachsene</strong> und für <strong>"; $text .= $_POST['inputAnzahlKinder']; $text .= "Kinder</strong>."; mail($empf, $betreff, $text, $from); echo "Vielen Dank!"; } else { echo "Bitte alle Felder ausfüllen."; } ?>
1.398438
1
knowledgebase/wp-includes/customize/class-wp-customize-nav-menu-setting.php
praveen2207/ZingUpLifeRepo
23
475
<?php /** * Customize API: WP_Customize_Nav_Menu_Setting class * * @package WordPress * @subpackage Customize * @since 4.4.0 */ /** * Customize Setting to represent a nav_menu. * * Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and * the IDs for the nav_menu_items associated with the nav menu. * * @since 4.3.0 * * @see wp_get_nav_menu_object() * @see WP_Customize_Setting */ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting { const ID_PATTERN = '/^nav_menu\[(?P<id>-?\d+)\]$/'; const TAXONOMY = 'nav_menu'; const TYPE = 'nav_menu'; /** * Setting type. * * @since 4.3.0 * @access public * @var string */ public $type = self::TYPE; /** * Default setting value. * * @since 4.3.0 * @access public * @var array * * @see wp_get_nav_menu_object() */ public $default = array( 'name' => '', 'description' => '', 'parent' => 0, 'auto_add' => false, ); /** * Default transport. * * @since 4.3.0 * @access public * @var string */ public $transport = 'postMessage'; /** * The term ID represented by this setting instance. * * A negative value represents a placeholder ID for a new menu not yet saved. * * @since 4.3.0 * @access public * @var int */ public $term_id; /** * Previous (placeholder) term ID used before creating a new menu. * * This value will be exported to JS via the customize_save_response filter * so that JavaScript can update the settings to refer to the newly-assigned * term ID. This value is always negative to indicate it does not refer to * a real term. * * @since 4.3.0 * @access public * @var int * * @see WP_Customize_Nav_Menu_Setting::update() * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() */ public $previous_term_id; /** * Whether or not update() was called. * * @since 4.3.0 * @access protected * @var bool */ protected $is_updated = false; /** * Status for calling the update method, used in customize_save_response filter. * * When status is inserted, the placeholder term ID is stored in $previous_term_id. * When status is error, the error is stored in $update_error. * * @since 4.3.0 * @access public * @var string updated|inserted|deleted|error * * @see WP_Customize_Nav_Menu_Setting::update() * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() */ public $update_status; /** * Any error object returned by wp_update_nav_menu_object() when setting is updated. * * @since 4.3.0 * @access public * @var WP_Error * * @see WP_Customize_Nav_Menu_Setting::update() * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() */ public $update_error; /** * Constructor. * * Any supplied $args override class property defaults. * * @since 4.3.0 * @access public * * @param WP_Customize_Manager $manager Bootstrap Customizer instance. * @param string $id An specific ID of the setting. Can be a * theme mod or option name. * @param array $args Optional. Setting arguments. * * @throws Exception If $id is not valid for this setting type. */ public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) { if ( empty( $manager->nav_menus ) ) { throw new Exception( 'Expected WP_Customize_Manager::$nav_menus to be set.' ); } if ( ! preg_match( self::ID_PATTERN, $id, $matches ) ) { throw new Exception( "Illegal widget setting ID: $id" ); } $this->term_id = intval( $matches['id'] ); parent::__construct( $manager, $id, $args ); } /** * Get the instance data for a given widget setting. * * @since 4.3.0 * @access public * * @see wp_get_nav_menu_object() * * @return array Instance data. */ public function value() { if ( $this->is_previewed && $this->_previewed_blog_id === get_current_blog_id() ) { $undefined = new stdClass(); // Symbol. $post_value = $this->post_value( $undefined ); if ( $undefined === $post_value ) { $value = $this->_original_value; } else { $value = $post_value; } } else { $value = false; // Note that a term_id of less than one indicates a nav_menu not yet inserted. if ( $this->term_id > 0 ) { $term = wp_get_nav_menu_object( $this->term_id ); if ( $term ) { $value = wp_array_slice_assoc( (array) $term, array_keys( $this->default ) ); $nav_menu_options = (array) get_option( 'nav_menu_options', array() ); $value['auto_add'] = false; if ( isset( $nav_menu_options['auto_add'] ) && is_array( $nav_menu_options['auto_add'] ) ) { $value['auto_add'] = in_array( $term->term_id, $nav_menu_options['auto_add'] ); } } } if ( ! is_array( $value ) ) { $value = $this->default; } } return $value; } /** * Handle previewing the setting. * * @since 4.3.0 * @since 4.4.0 Added boolean return value * @access public * * @see WP_Customize_Manager::post_value() * * @return bool False if method short-circuited due to no-op. */ public function preview() { if ( $this->is_previewed ) { return false; } $undefined = new stdClass(); $is_placeholder = ( $this->term_id < 0 ); $is_dirty = ( $undefined !== $this->post_value( $undefined ) ); if ( ! $is_placeholder && ! $is_dirty ) { return false; } $this->is_previewed = true; $this->_original_value = $this->value(); $this->_previewed_blog_id = get_current_blog_id(); add_filter( 'wp_get_nav_menus', array( $this, 'filter_wp_get_nav_menus' ), 10, 2 ); add_filter( 'wp_get_nav_menu_object', array( $this, 'filter_wp_get_nav_menu_object' ), 10, 2 ); add_filter( 'default_option_nav_menu_options', array( $this, 'filter_nav_menu_options' ) ); add_filter( 'option_nav_menu_options', array( $this, 'filter_nav_menu_options' ) ); return true; } /** * Filter the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed. * * @since 4.3.0 * @access public * * @see wp_get_nav_menus() * * @param array $menus An array of menu objects. * @param array $args An array of arguments used to retrieve menu objects. * @return array */ public function filter_wp_get_nav_menus( $menus, $args ) { if ( get_current_blog_id() !== $this->_previewed_blog_id ) { return $menus; } $setting_value = $this->value(); $is_delete = ( false === $setting_value ); $index = -1; // Find the existing menu item's position in the list. foreach ( $menus as $i => $menu ) { if ( (int) $this->term_id === (int) $menu->term_id || (int) $this->previous_term_id === (int) $menu->term_id ) { $index = $i; break; } } if ( $is_delete ) { // Handle deleted menu by removing it from the list. if ( -1 !== $index ) { array_splice( $menus, $index, 1 ); } } else { // Handle menus being updated or inserted. $menu_obj = (object) array_merge( array( 'term_id' => $this->term_id, 'term_taxonomy_id' => $this->term_id, 'slug' => sanitize_title( $setting_value['name'] ), 'count' => 0, 'term_group' => 0, 'taxonomy' => self::TAXONOMY, 'filter' => 'raw', ), $setting_value ); array_splice( $menus, $index, ( -1 === $index ? 0 : 1 ), array( $menu_obj ) ); } // Make sure the menu objects get re-sorted after an update/insert. if ( ! $is_delete && ! empty( $args['orderby'] ) ) { $this->_current_menus_sort_orderby = $args['orderby']; usort( $menus, array( $this, '_sort_menus_by_orderby' ) ); } // @todo add support for $args['hide_empty'] === true return $menus; } /** * Temporary non-closure passing of orderby value to function. * * @since 4.3.0 * @access protected * @var string * * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() * @see WP_Customize_Nav_Menu_Setting::_sort_menus_by_orderby() */ protected $_current_menus_sort_orderby; /** * Sort menu objects by the class-supplied orderby property. * * This is a workaround for a lack of closures. * * @since 4.3.0 * @access protected * @param object $menu1 * @param object $menu2 * @return int * * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() */ protected function _sort_menus_by_orderby( $menu1, $menu2 ) { $key = $this->_current_menus_sort_orderby; return strcmp( $menu1->$key, $menu2->$key ); } /** * Filter the wp_get_nav_menu_object() result to supply the previewed menu object. * * Requesting a nav_menu object by anything but ID is not supported. * * @since 4.3.0 * @access public * * @see wp_get_nav_menu_object() * * @param object|null $menu_obj Object returned by wp_get_nav_menu_object(). * @param string $menu_id ID of the nav_menu term. Requests by slug or name will be ignored. * @return object|null */ public function filter_wp_get_nav_menu_object( $menu_obj, $menu_id ) { $ok = ( get_current_blog_id() === $this->_previewed_blog_id && is_int( $menu_id ) && $menu_id === $this->term_id ); if ( ! $ok ) { return $menu_obj; } $setting_value = $this->value(); // Handle deleted menus. if ( false === $setting_value ) { return false; } // Handle sanitization failure by preventing short-circuiting. if ( null === $setting_value ) { return $menu_obj; } $menu_obj = (object) array_merge( array( 'term_id' => $this->term_id, 'term_taxonomy_id' => $this->term_id, 'slug' => sanitize_title( $setting_value['name'] ), 'count' => 0, 'term_group' => 0, 'taxonomy' => self::TAXONOMY, 'filter' => 'raw', ), $setting_value ); return $menu_obj; } /** * Filter the nav_menu_options option to include this menu's auto_add preference. * * @since 4.3.0 * @access public * * @param array $nav_menu_options Nav menu options including auto_add. * @return array (Kaybe) modified nav menu options. */ public function filter_nav_menu_options( $nav_menu_options ) { if ( $this->_previewed_blog_id !== get_current_blog_id() ) { return $nav_menu_options; } $menu = $this->value(); $nav_menu_options = $this->filter_nav_menu_options_value( $nav_menu_options, $this->term_id, false === $menu ? false : $menu['auto_add'] ); return $nav_menu_options; } /** * Sanitize an input. * * Note that parent::sanitize() erroneously does wp_unslash() on $value, but * we remove that in this override. * * @since 4.3.0 * @access public * * @param array $value The value to sanitize. * @return array|false|null Null if an input isn't valid. False if it is marked for deletion. * Otherwise the sanitized value. */ public function sanitize( $value ) { // Menu is marked for deletion. if ( false === $value ) { return $value; } // Invalid. if ( ! is_array( $value ) ) { return null; } $default = array( 'name' => '', 'description' => '', 'parent' => 0, 'auto_add' => false, ); $value = array_merge( $default, $value ); $value = wp_array_slice_assoc( $value, array_keys( $default ) ); $value['name'] = trim( esc_html( $value['name'] ) ); // This sanitization code is used in wp-admin/nav-menus.php. $value['description'] = sanitize_text_field( $value['description'] ); $value['parent'] = max( 0, intval( $value['parent'] ) ); $value['auto_add'] = ! empty( $value['auto_add'] ); if ( '' === $value['name'] ) { $value['name'] = _x( '(unnamed)', 'Missing menu name.' ); } /** This filter is documented in wp-includes/class-wp-customize-setting.php */ return apply_filters( "customize_sanitize_{$this->id}", $value, $this ); } /** * Storage for data to be sent back to client in customize_save_response filter. * * @access protected * @since 4.3.0 * @var array * * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() */ protected $_widget_nav_menu_updates = array(); /** * Create/update the nav_menu term for this setting. * * Any created menus will have their assigned term IDs exported to the client * via the customize_save_response filter. Likewise, any errors will be exported * to the client via the customize_save_response() filter. * * To delete a menu, the client can send false as the value. * * @since 4.3.0 * @access protected * * @see wp_update_nav_menu_object() * * @param array|false $value { * The value to update. Note that slug cannot be updated via wp_update_nav_menu_object(). * If false, then the menu will be deleted entirely. * * @type string $name The name of the menu to save. * @type string $description The term description. Default empty string. * @type int $parent The id of the parent term. Default 0. * @type bool $auto_add Whether pages will auto_add to this menu. Default false. * } * @return null|void */ protected function update( $value ) { if ( $this->is_updated ) { return; } $this->is_updated = true; $is_placeholder = ( $this->term_id < 0 ); $is_delete = ( false === $value ); add_filter( 'customize_save_response', array( $this, 'amend_customize_save_response' ) ); $auto_add = null; if ( $is_delete ) { // If the current setting term is a placeholder, a delete request is a no-op. if ( $is_placeholder ) { $this->update_status = 'deleted'; } else { $r = wp_delete_nav_menu( $this->term_id ); if ( is_wp_error( $r ) ) { $this->update_status = 'error'; $this->update_error = $r; } else { $this->update_status = 'deleted'; $auto_add = false; } } } else { // Insert or update menu. $menu_data = wp_array_slice_assoc( $value, array( 'description', 'parent' ) ); $menu_data['menu-name'] = $value['name']; $menu_id = $is_placeholder ? 0 : $this->term_id; $r = wp_update_nav_menu_object( $menu_id, wp_slash( $menu_data ) ); $original_name = $menu_data['menu-name']; $name_conflict_suffix = 1; while ( is_wp_error( $r ) && 'menu_exists' === $r->get_error_code() ) { $name_conflict_suffix += 1; /* translators: 1: original menu name, 2: duplicate count */ $menu_data['menu-name'] = sprintf( __( '%1$s (%2$d)' ), $original_name, $name_conflict_suffix ); $r = wp_update_nav_menu_object( $menu_id, wp_slash( $menu_data ) ); } if ( is_wp_error( $r ) ) { $this->update_status = 'error'; $this->update_error = $r; } else { if ( $is_placeholder ) { $this->previous_term_id = $this->term_id; $this->term_id = $r; $this->update_status = 'inserted'; } else { $this->update_status = 'updated'; } $auto_add = $value['auto_add']; } } if ( null !== $auto_add ) { $nav_menu_options = $this->filter_nav_menu_options_value( (array) get_option( 'nav_menu_options', array() ), $this->term_id, $auto_add ); update_option( 'nav_menu_options', $nav_menu_options ); } if ( 'inserted' === $this->update_status ) { // Make sure that new menus assigned to nav menu locations use their new IDs. foreach ( $this->manager->settings() as $setting ) { if ( ! preg_match( '/^nav_menu_locations\[/', $setting->id ) ) { continue; } $post_value = $setting->post_value( null ); if ( ! is_null( $post_value ) && $this->previous_term_id === intval( $post_value ) ) { $this->manager->set_post_value( $setting->id, $this->term_id ); $setting->save(); } } // Make sure that any nav_menu widgets referencing the placeholder nav menu get updated and sent back to client. foreach ( array_keys( $this->manager->unsanitized_post_values() ) as $setting_id ) { $nav_menu_widget_setting = $this->manager->get_setting( $setting_id ); if ( ! $nav_menu_widget_setting || ! preg_match( '/^widget_nav_menu\[/', $nav_menu_widget_setting->id ) ) { continue; } $widget_instance = $nav_menu_widget_setting->post_value(); // Note that this calls WP_Customize_Widgets::sanitize_widget_instance(). if ( empty( $widget_instance['nav_menu'] ) || intval( $widget_instance['nav_menu'] ) !== $this->previous_term_id ) { continue; } $widget_instance['nav_menu'] = $this->term_id; $updated_widget_instance = $this->manager->widgets->sanitize_widget_js_instance( $widget_instance ); $this->manager->set_post_value( $nav_menu_widget_setting->id, $updated_widget_instance ); $nav_menu_widget_setting->save(); $this->_widget_nav_menu_updates[ $nav_menu_widget_setting->id ] = $updated_widget_instance; } } } /** * Updates a nav_menu_options array. * * @since 4.3.0 * @access protected * * @see WP_Customize_Nav_Menu_Setting::filter_nav_menu_options() * @see WP_Customize_Nav_Menu_Setting::update() * * @param array $nav_menu_options Array as returned by get_option( 'nav_menu_options' ). * @param int $menu_id The term ID for the given menu. * @param bool $auto_add Whether to auto-add or not. * @return array (Maybe) modified nav_menu_otions array. */ protected function filter_nav_menu_options_value( $nav_menu_options, $menu_id, $auto_add ) { $nav_menu_options = (array) $nav_menu_options; if ( ! isset( $nav_menu_options['auto_add'] ) ) { $nav_menu_options['auto_add'] = array(); } $i = array_search( $menu_id, $nav_menu_options['auto_add'] ); if ( $auto_add && false === $i ) { array_push( $nav_menu_options['auto_add'], $this->term_id ); } elseif ( ! $auto_add && false !== $i ) { array_splice( $nav_menu_options['auto_add'], $i, 1 ); } return $nav_menu_options; } /** * Export data for the JS client. * * @since 4.3.0 * @access public * * @see WP_Customize_Nav_Menu_Setting::update() * * @param array $data Additional information passed back to the 'saved' event on `wp.customize`. * @return array Export data. */ public function amend_customize_save_response( $data ) { if ( ! isset( $data['nav_menu_updates'] ) ) { $data['nav_menu_updates'] = array(); } if ( ! isset( $data['widget_nav_menu_updates'] ) ) { $data['widget_nav_menu_updates'] = array(); } $data['nav_menu_updates'][] = array( 'term_id' => $this->term_id, 'previous_term_id' => $this->previous_term_id, 'error' => $this->update_error ? $this->update_error->get_error_code() : null, 'status' => $this->update_status, 'saved_value' => 'deleted' === $this->update_status ? null : $this->value(), ); $data['widget_nav_menu_updates'] = array_merge( $data['widget_nav_menu_updates'], $this->_widget_nav_menu_updates ); $this->_widget_nav_menu_updates = array(); return $data; } }
1.109375
1
application/views/calendar.php
temilolakutelu/PlatinumVine
0
483
<link rel="stylesheet" href="http://fullcalendar.io/releases/fullcalendar/3.10.0/fullcalendar.min.css"> <script src='http://fullcalendar.io/releases/fullcalendar/3.10.0/lib/moment.min.js'></script> <script src='http://fullcalendar.io/releases/fullcalendar/3.10.0/lib/jquery.min.js'></script> <script src='http://fullcalendar.io/releases/fullcalendar/3.10.0/fullcalendar.min.js'></script> <div class="container"> <div class="row"> <div class="col-md-12"> <h2>Events Calendar</h2> <div id="calendar"> </div> </div> </div> </div> <style> /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 100px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ } /* Modal Content */ .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; } /* The Close Button */ .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; outline: none !important; } #calendar>.fc-toolbar>.fc-left>*, #calendar>.fc-toolbar>.fc-left>.btn-group>*, #calendar>.fc-toolbar>.fc-right>*, #calendar>.fc-toolbar>.fc-right>.btn-group>* { color: white; background: #080c12; outline: none!important; border: 1px solid; } #calendar>.fc-toolbar>.fc-left>.btn-group>*:hover, #calendar>.fc-toolbar>.fc-left>.btn-group>*:active, #calendar>.fc-toolbar>.fc-right>.btn-group>*:hover, #calendar>.fc-toolbar>.fc-right>.btn-group>*:active, { background: grey; outline: none !important; } </style> <div class="modal" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="myModalLabel"></h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> </div> <div class="modal-body"> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { var date_last_clicked = null; $('#calendar').fullCalendar({ themeSystem: 'bootstrap4', header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay,listMonth' }, weekNumbers: true, eventLimit: true, eventSources: [{ events: function(start, end, timezone, callback) { $.ajax({ url: '<?php echo base_url() ?>event/get_events', dataType: 'json', data: { // our hypothetical feed requires UNIX timestamps start: start.unix(), end: end.unix() }, success: function(msg) { var events = msg.events; callback(events); } }); } }, ], eventClick: function(event, jsEvent, view) { $('.modal-title').html(event.title); $('.modal-body').html(event.description); // Get the modal $('#editModal').css('display', 'block'); $('.close').click(function() { $('#editModal').css('display', 'none'); }) // When the user clicks anywhere outside of the modal, close it $(document).on("click", function(event) { if ($(event.target).has(".modal-content").length) { $('#editModal').css('display', 'none'); } }); }, }); }); </script>
1.03125
1
_OldExams/Exams/TODO-List/PHP/src/AppBundle/Controller/TaskController.php
lapd87/SoftUniSoftwareTechnologies
0
491
<?php namespace AppBundle\Controller; use AppBundle\Entity\Task; use AppBundle\Form\TaskType; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; class TaskController extends Controller { /** * @param Request $request * @Route("/", name="index") * @return \Symfony\Component\HttpFoundation\Response */ public function index(Request $request) { $taskRepo = $this->getDoctrine()->getRepository(Task::class); $tasks = $taskRepo->findAll(); return $this->render('task/index.html.twig', ['tasks' => $tasks]); } /** * @param Request $request * @Route("/create", name="create") * @return \Symfony\Component\HttpFoundation\Response */ public function create(Request $request) { $task = new Task(); $form = $this->createForm(TaskType::class, $task); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { if ($task->getTitle() !== null && $task->getComments() !== null) { $em = $this->getDoctrine()->getManager(); $em->persist($task); $em->flush(); } return $this->redirectToRoute('index'); } return $this->render('task/create.html.twig', ['form' => $form->createView()]); } /** * @Route("/delete/{id}", name="delete") * * @param $id * @param Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function delete($id, Request $request) { $taskRepository = $this->getDoctrine()->getRepository(Task::class); $task = $taskRepository->find($id); if ($task == null) { return $this->redirectToRoute('index'); } $form = $this->createForm(TaskType::class, $task); $form->handleRequest($request); if ($form->isValid() && $form->isSubmitted()) { $em = $this->getDoctrine()->getManager(); $em->remove($task); $em->flush(); return $this->redirectToRoute('index'); } return $this->render('task/delete.html.twig', ['task' => $task, 'form' => $form->createView()]); } }
1.335938
1
tests/Fixtures/CustomParameter.php
dmt-software/jms-parameter-bag-handler
0
499
<?php namespace DMT\Test\Serializer\Fixtures; use DMT\Serializer\ParameterInterface; class CustomParameter implements ParameterInterface { /** * @var string */ protected $name; /** * @var bool|float|int|string */ protected $value; /** * @return string */ public function getName(): string { return $this->name; } /** * @param string $name */ public function setName(string $name) { $this->name = $name; } /** * @return bool|float|int|string */ public function getValue() { return $this->value; } /** * @param bool|float|int|string $value */ public function setValue($value) { $this->value = $value; } }
1.414063
1
models/Notify.php
AnderUR/Device-Borrowing-System
1
507
<?php class notify extends CI_Model { /** * Emails existing user. * This templates current ussage does not cover every situation. For example, if ion_auth is used to create a new user, ion_auth's email settings are used. This could be changed, however... */ function email_user($uid, $senderMsg, $subject = false) { $user = webuser::getUser($uid); if (isset($user)) { $this->email->clear(); $this->email->from($this->config->item('admin_email', 'ion_auth'), 'DBS'); $this->email->to($user['email']); $msg = str_replace('%20', ' ', $senderMsg); $message = $msg; if ($subject == false) { $this->email->subject("DBS Account Information"); } else { $this->email->subject($subject); } $this->email->message($message); $this->email->send(); set_time_limit(0); } else { echo "No such user exists. Email not sent."; } } function emailDeviceLoanReceipt($email, $senderMsg, $subject=false) { $this->email->clear(); $this->email->from($this->config->item('admin_email', 'ion_auth') , 'DBS'); $this->email->to($email); $msg = str_replace('%20', ' ', $senderMsg); $message = $msg; if ($subject == false){ $this->email->subject("Device Borrowing System"); }else{ $this->email->subject($subject); } $this->email->message($message); $this->email->send(); set_time_limit(0); } }
1.523438
2
resources/views/back/jefe/ayudantias/ordinarias/registrarRenovacionAyudantiasOrdinarias.blade.php
miguelcar18/sicdeudo
0
515
@extends('back.layouts.base') @section('titulo') <title>Registrar renovación ayudantía ordinaria - Sicdeudo</title> @stop @section('content') @include('back.layouts.content-title', ['titulo' => 'Verificación de Requisitos de Ayudantía Ordinaria']) <div class="row"> <div class="col-xs-12"> <div class="card-box"> <div class="row"> <div class="col-sm-12 col-xs-12 col-md-12"> {!! Form::open(['route' => 'registrarRequisitosRenovacionAT', 'method' => 'post', 'id' => 'requisitosRenovacionAOForm', 'name' => 'requisitosRenovacionAOForm', 'class' => '', 'novalidate' => 'novalidate', 'role' => 'form']) !!} @include('back.secretaria.datosEstudiante') @include('back.secretaria.form.requisitosRenovacionAOFormType') {!! Form::close()!!} </div> </div> <!-- end row --> </div> </div><!-- end col--> </div> <!-- end row --> @stop
0.949219
1
application/controllers/Auth.php
jamesphijak/Lost-and-Found-KMITL
0
523
<?php // require_once APPPATH.'/vendor/autoload.php'; class Auth extends CI_Controller { public function __construct() { parent::__construct(); //$this->load->library('facebook'); } // สมัครสมาชิก public function register() { $input = $this->input->post(); // if(isset($_POST['register'])){ if(!empty($input)){ if($this->form_validation->run('auth/register')){ // $verification_key = md5(rand()); // Email verification key // $encrypted_password = $this->encrypt->encode($this->input->post('password')); // $decrypted_password = $this->encrypt->decode(encrypted_password); $encrypted_password = $this->tb_user->hash($this->input->post('password')); $value = array( 'user_email' => $this->input->post('email'), 'user_password' => $<PASSWORD>, 'user_mobile' => $this->input->post('mobile') ); $result = $this->tb_user->user_register($value); if($result){ $this->session->set_flashdata('success','สมัครสมาชิกสำเร็จ'); redirect(base_url('auth/register'),'refresh'); }else{ $this->session->set_flashdata('error','สมัครสมาชิกไม่สำเร็จ'); } } } $this->tb_user->already_login(); $this->template->setTemplate('สมัครสมาชิก', 'auth/register'); $this->template->loadTemplate(); } public function login() { $input = $this->input->post(); if(!empty($input)){ if($this->form_validation->run('auth/login')){ $encrypted_password = $this->tb_user->hash($this->input->post('password')); $value = array( 'user_email' => $this->input->post('email'), 'user_password' => $<PASSWORD> ); $user = $this->tb_user->user_login($value); if($user){ if($user->user_status == 'Active') { $this->session->set_flashdata('success', 'เข้าสู่ระบบสำเร็จ'); $this->tb_user->user_session_set($user->user_id, $user->user_email, $user->user_type, $user->user_mobile,$user->user_status); redirect(base_url('main'), 'refresh'); }else{ $this->session->set_flashdata('error','สมาชิกนี้ถูกระงับการใช้งานอยู่'); } }else{ $this->session->set_flashdata('error','เข้าสู่ระบบไม่สำเร็จ กรุณาลองใหม่อีกครั้ง'); } } } $this->tb_user->already_login(); $this->template->setTemplate('เข้าสู่ระบบ', 'auth/login'); $this->template->loadTemplate(); } // ออกจากระบบ public function logout(){ $this->tb_user->user_session_destroy(); // ทำลาย session redirect(base_url('auth/login'),'refresh'); } // เข้าสู่ระบบผ่าน Facebook public function facebook(){ $fb = new Facebook\Facebook([ 'app_id' => "2359331964290771", // Replace {app-id} with your app id 'app_secret' => '<KEY>', 'default_graph_version' => 'v2.2', ]); if (isset($_SESSION['fb_access_token'])) { $token = $_SESSION['fb_access_token']; try { // Returns a `Facebook\FacebookResponse` object $response = $fb->get('/me?fields=id,name,email', $token); } catch(Facebook\Exceptions\FacebookResponseException $e) { echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } // Store data in database $facebook = $response->getGraphUser(); // echo 'ID: ' . $facebook['id'] .'<br>'; // echo 'Name: ' . $facebook['name'] .'<br>'; // echo 'E-mail: ' . $facebook['email'] .'<br>'; $user = $this->tb_user->get_user_by_email($facebook['email']); //var_dump($user); //var_dump($_SESSION); if($user){ // ถ้าเจอ Email ในระบบ // เก็บ Facebook id if(empty($user->user_facebook_id)){ // Facebook id ว่าง // เก็บค่า facebook id เข้าฐานข้อมูล $value = array('user_facebook_id' => $facebook['id']); $result = $this->tb_user->update_user($user->user_id, $value); // อัพเดทเข้าฐานข้อมูล if($result){ // ทำการ Login if($user->user_status == 'Active') { $this->session->set_flashdata('success', 'เข้าสู่ระบบด้วย Facebook สำเร็จ / ทำการรวมเข้ากับบัญชีเดิมเรียบร้อยแล้ว'); $this->tb_user->user_session_set($user->user_id, $user->user_email, $user->user_type, $user->user_mobile,$user->user_status); // Redirect ไปหน้าแรก $this->tb_user->check_password(); }else{ $this->session->set_flashdata('error','สมาชิกนี้ถูกระงับการใช้งานอยู่'); redirect(base_url('auth/login')); } // เสร็จกระบวนการ... }else{ $this->session->set_flashdata('error','เข้าสู่ระบบด้วย Facebook ไม่สำเร็จ'); } }else{ // Facebook มี id อยู่แล้ว // Login ได้เลย if($user->user_status == 'Active') { $this->tb_user->user_session_set($user->user_id, $user->user_email, $user->user_type, $user->user_mobile,$user->user_status); $this->tb_user->check_password(); }else{ $this->session->set_flashdata('error','สมาชิกนี้ถูกระงับการใช้งานอยู่'); redirect(base_url('auth/login')); } } }else{ // ไม่เจอ user // สร้าง Account ใหม่ $value = array( 'user_email' => $facebook['email'], 'user_facebook_id' => $facebook['id'] ); $created_user_id = $this->tb_user->user_register_id($value); // สร้าง Account พร้อม return id if($created_user_id > 0){ // สร้าง Account สำเร็จ $this->session->set_flashdata('success','เข้าสู่ระบบด้วย Facebook สำเร็จ / สร้าง Account ใหม่เรียบร้อยแล้ว'); // ทำการดึงข้อมูลมาสร้าง session $user = $this->tb_user->get_user_by_id($created_user_id); // ดึงข้อมูลมา $this->tb_user->user_session_set($user->user_id, $user->user_email, $user->user_type, $user->user_mobile,$user->user_status); $this->tb_user->check_password(); }else{ $this->session->set_flashdata('error','เข้าสู่ระบบด้วย Facebook ไม่สำเร็จ'); } } } else { $helper = $fb->getRedirectLoginHelper(); $permissions = ['email']; // Optional permissions $loginUrl = $helper->getLoginUrl(base_url('auth/fbcallback'), $permissions); redirect($loginUrl); //echo '<a href="' . htmlspecialchars($loginUrl) . '">Log in with Facebook!</a>'; } } function fbcallback(){ ob_start(); $appid = "2359331964290771"; $fb = new Facebook\Facebook([ 'app_id' => "2359331964290771", // Replace {app-id} with your app id 'app_secret' => '<KEY>', 'default_graph_version' => 'v2.2', ]); $helper = $fb->getRedirectLoginHelper(); if (isset($_GET['state'])) { $helper->getPersistentDataHandler()->set('state', $_GET['state']); } try { $accessToken = $helper->getAccessToken(); } catch(Facebook\Exceptions\FacebookResponseException $e) { // When Graph returns an error echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { // When validation fails or other local issues echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } if (! isset($accessToken)) { if ($helper->getError()) { header('HTTP/1.0 401 Unauthorized'); echo "Error: " . $helper->getError() . "\n"; echo "Error Code: " . $helper->getErrorCode() . "\n"; echo "Error Reason: " . $helper->getErrorReason() . "\n"; echo "Error Description: " . $helper->getErrorDescription() . "\n"; } else { header('HTTP/1.0 400 Bad Request'); echo 'Bad request'; } exit; } // Logged in echo '<h3>Access Token</h3>'; var_dump($accessToken->getValue()); // The OAuth 2.0 client handler helps us manage access tokens $oAuth2Client = $fb->getOAuth2Client(); // Get the access token metadata from /debug_token $tokenMetadata = $oAuth2Client->debugToken($accessToken); echo '<h3>Metadata</h3>'; var_dump($tokenMetadata); // Validation (these will throw FacebookSDKException's when they fail) $tokenMetadata->validateAppId($appid); // Replace {app-id} with your app id // If you know the user ID this access token belongs to, you can validate it here //$tokenMetadata->validateUserId('123'); $tokenMetadata->validateExpiration(); if (! $accessToken->isLongLived()) { // Exchanges a short-lived access token for a long-lived one try { $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); } catch (Facebook\Exceptions\FacebookSDKException $e) { echo "<p>Error getting long-lived access token: " . $e->getMessage() . "</p>\n\n"; exit; } echo '<h3>Long-lived</h3>'; var_dump($accessToken->getValue()); } $_SESSION['fb_access_token'] = (string) $accessToken; // User is logged in with a long-lived access token. // You can redirect them to a members-only page. header('Location: '.base_url('auth/facebook')); ob_end_flush(); } } ?>
1.398438
1
resources/views/admin/userprofiles/index.blade.php
anuruddha-thennakoon/abc-api
0
531
@extends('admin.layouts.admin') @section('title','User Profiles') @section('content') <div class="row"> <div class="row"> <div class="col-sm-4 pull-right"> {{ Form::open(['route'=>['admin.profiles'],'method' => 'get']) }} <div class="input-group"> <input type="text" class="form-control" placeholder="Search Name or User ID" name="search" value="{{ app('request')->input('search') }}"> <span class="input-group-btn"> <button class="btn btn-default" type="button">Go!</button> </span> </div> {{ Form::close() }} </div> </div> <table class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%"> <thead> <tr> <th>@sortablelink('name', 'Name', ['page' => $profiles->currentPage()])</th> <th>Gender</th> <th>User ID(Firebase)</th> <th>Created At</th> <th>Update At</th> <th>Actions</th> </tr> </thead> <tbody> @foreach($profiles as $profile) <tr> <td>{{ $profile->name }}</td> <td>{{ $profile->gender }}</td> <td>{{ $profile->user_id }}</td> <td>{{ $profile->created_at }}</td> <td>{{ $profile->updated_at }}</td> <td> <a class="btn btn-xs btn-primary" href="{{ route('admin.profiles.show', [$profile->id]) }}" data-toggle="tooltip" data-placement="top" data-title="View"> <i class="fa fa-eye"></i> </a> <a class="btn btn-xs btn-info" href="{{ route('admin.profiles.edit', [$profile->id]) }}" data-toggle="tooltip" data-placement="top" data-title="Edit"> <i class="fa fa-pencil"></i> </a> <a class="btn btn-xs btn-danger" href="{{ route('admin.profiles.destroy', [$profile->id]) }}" data-toggle="tooltip" data-placement="top" data-title="Delete"> <i class="fa fa-trash"></i> </a> </td> </tr> @endforeach </tbody> </table> <div class="pull-right"> {{ $profiles->links() }} </div> </div> @endsection
1.242188
1
vistas/contenidos/es/dashboard-product-search.php
denis98-byte/Proyectoqa
11
539
<h3 class="text-start roboto-condensed-regular text-uppercase"> <i class="fas fa-search fa-fw"></i> &nbsp; Buscar producto </h3> </div> <div class="container-fluid"> <ul class="nav nav-tabs nav-justified mb-4" role="tablist"> <?php if($_SESSION['cargo_sto']=="Administrador"){ ?> <li class="nav-item" role="presentation"> <a class="nav-link" href="<?php echo SERVERURL.DASHBOARD; ?>/product-new/" ><i class="fas fa-plus fa-fw"></i> &nbsp; Agregar producto</a> </li> <?php } ?> <li class="nav-item" role="presentation"> <a class="nav-link" href="<?php echo SERVERURL.DASHBOARD; ?>/product-list/" ><i class="fas fa-boxes fa-fw"></i> &nbsp; Inventario de productos</a> </li> <li class="nav-item" role="presentation"> <a class="nav-link" href="<?php echo SERVERURL.DASHBOARD; ?>/product-minimum/" ><i class="fas fa-stopwatch-20 fa-fw"></i> &nbsp; Productos en stock mínimo</a> </li> <li class="nav-item" role="presentation"> <a class="nav-link active" href="<?php echo SERVERURL.DASHBOARD; ?>/product-search/" ><i class="fas fa-search fa-fw"></i> &nbsp; Buscar producto</a> </li> </ul> </div> <div class="container-fluid"> <?php if(!isset($_SESSION['busqueda_producto']) && empty($_SESSION['busqueda_producto'])){ ?> <form class="dashboard-container mb-4 FormularioAjax" action="<?php echo SERVERURL; ?>ajax/buscadorAjax.php" data-form="default" data-lang="<?php echo LANG; ?>" method="POST" autocomplete="off" style="padding-top: 40px"> <input type="hidden" name="modulo" value="producto"> <div class="container-fluid"> <div class="row d-flex justify-content-center"> <div class="col-12 col-md-6"> <div class="form-outline mb-4"> <input type="text" pattern="[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ ]{1,30}" class="form-control" name="busqueda_inicial" id="busqueda_inicial" maxlength="30"> <label for="busqueda_inicial" class="form-label">¿Qué producto estás buscando?</label> </div> <p class="text-center"> <button class="btn btn-primary"><i class="fas fa-search"></i> &nbsp; Buscar</button> </p> </div> </div> </div> </form> <?php }else{ ?> <div class="dashboard-container mb-4"> <form class="mb-4 FormularioAjax" action="<?php echo SERVERURL; ?>ajax/buscadorAjax.php" data-form="search" data-lang="<?php echo LANG; ?>" method="POST"> <input type="hidden" name="modulo" value="producto"> <input type="hidden" name="eliminar_busqueda" value="eliminar"> <p class="lead text-center roboto-condensed-regular">Resultados de la búsqueda <span class="font-weight-bold">“<?php echo $_SESSION['busqueda_producto']; ?>”</span></p> <p class="text-center"> <button type="submit" class="btn btn-danger"><i class="far fa-trash-alt"></i> &nbsp; Eliminar búsqueda</button> </p> </form> <?php require_once "./controladores/productoControlador.php"; $ins_producto = new productoControlador(); echo $ins_producto->administrador_paginador_producto_controlador($pagina[2],15,$pagina[1],$_SESSION['busqueda_producto']); ?> </div> <?php } ?> </div>
0.613281
1
src/extractors/DeleteExtractor.php
haafidz-jp/sql-to-ci
15
547
<?php namespace RexShijaku\SQLToCIBuilder\extractors; /** * This class extracts and compiles SQL query parts for the following Query Builder methods : * * delete * * @author <NAME> <<EMAIL>> * */ class DeleteExtractor extends AbstractExtractor implements Extractor { public function extract(array $value, array $parsed = array()) { $parts = array(); $parts['table'] = $parsed['FROM'][0]['base_expr']; if (isset($parsed['WHERE'])) { $criterion_ = new CriterionExtractor($this->options); if ($this->options['group']) $criterion_->extractAsArray(isset($parsed['WHERE']) ? $parsed['WHERE'] : array(), $where); else $where = false; $parts['where'] = array('single' => ($where !== false), 'value' => $where); } return $parts; } }
1.4375
1
application/admin/controller/UserController.php
huyang0826/lingke
0
555
<?php namespace app\admin\controller; use think\Controller; use think\Db; use think\Request; use think\Validate; class UserController extends AdminController { /** * [user_list 用户列表] * @param string $value [description] * @return [type] [description] */ public function user_list_pt() { return view(); } /** * [index_ajax ajax获取列表] * @param string $value [description] * @return [type] [description] */ public function user_ajax_pt($search='') { $where = ['type'=>1]; if($search){ $where['name|mobilephone'] = array('like',"%$search%"); } $count = Db::name('member')->where($where)->count(); $offset = input('offset')?:0; $pagesize =input('limit')?:20; $data = Db::name('member')->where($where)->field("id,mobilephone,name,addtime,case when status =1 then '正常' when status =2 then '禁用' end status") ->limit($offset,$pagesize) ->order('id desc') ->select(); return json(['rows'=>$data,'total'=>$count]); } public function user_add_pt($value='') { if($_POST){ $data = input('post.'); $data['password'] = <PASSWORD>(input('password')); $data['addtime'] = date('Y-m-d H:i:s',time()); $check = validate('memberadd') -> check($data); if($check){ $rs = Db::table('th_member')->insert($data); if($rs){ $this->success('添加成功',url('user_list_pt')); }else{ $this->error('添加失败',url('user_list_pt')); } }else{ $this->error('添加失败',url('user_list_pt')); } }else{ return view(); } } public function user_edit_pt($id='') { if($_POST){ $data = input('post.'); $data['addtime'] = date('Y-m-d H:i:s',time()); $check = validate('memberedit') -> check($data); if($check){ $rs = Db::table('th_member')->where('id',$id)->update($data); if($rs){ $this->success('修改成功',url('user_list_pt')); }else{ $this->error('修改失败',url('user_list_pt')); } }else{ $this->error($check,url('user_list_pt')); } }else{ $data = Db::name('member')->where('id',$id)->find(); $this->assign('data',$data); return view(); } } //删除用户 /** * [ad_del 删除用户] * @param string $id [用户id] * @return [type] [description] */ public function user_del_pt($id='') { $rs = Db::name('member')->where('id',$id)->delete(); if($rs){ return json(['status'=>1]); } } public function user_details_pt($id='') { $rs = Db::name('member')->where('id',$id)->find(); $this->assign('data',$rs); return view(); } public function user_list_tg() { if($_GET){ $this->assign('sh',$_GET['sh']); }else{ $this->assign('sh',''); } return view(); } /** * [index_ajax ajax获取列表] * @param string $value [description] * @return [type] [description] */ public function user_ajax_tg($search='',$sh='') { $where = ['type'=>2]; if($search){ $where['mobilephone'] = array('like',"%$search%"); } if($sh){ $where['sh'] = array('eq',$sh); } $count = Db::name('member')->where($where)->count(); $offset = input('offset')?:0; $pagesize =input('limit')?:20; $data = Db::name('member m') ->join('tgmember_info mt','m.id = mt.uid','left') ->where($where) ->field("m.id,m.mobilephone,mt.name,m.addtime,case when status =1 then '正常' when status =2 then '禁用' end status") ->limit($offset,$pagesize) ->order('id desc') ->select(); return json(['rows'=>$data,'total'=>$count]); } public function user_add_tg($value='') { if($_POST){ $data = input('post.'); $data['password'] = <PASSWORD>(input('password')); $data['addtime'] = date('Y-m-d H:i:s',time()); $check = validate('memberadd') -> check($data); if($check){ $rs = Db::table('th_member')->insert($data); if($rs){ $this->success('添加成功',url('user_list_tg')); }else{ $this->error('添加失败',url('user_list_tg')); } }else{ $this->error('添加失败',url('user_list_tg')); } }else{ return view(); } } public function user_edit_tg($id='') { if($_POST){ $data = input('post.'); $data['addtime'] = date('Y-m-d H:i:s',time()); $check = validate('memberedit') -> check($data); if($check){ $rs = Db::table('th_member')->where('id',$id)->update($data); if($rs){ $this->success('修改成功',url('user_list_tg')); }else{ $this->error('修改失败',url('user_list_tg')); } }else{ $this->error('修改失败',url('user_list_tg')); } }else{ $data = Db::name('member')->where('id',$id)->find(); $this->assign('data',$data); return view(); } } //删除用户 /** * [ad_del 删除用户] * @param string $id [用户id] * @return [type] [description] */ public function user_del_tg($id='') { $rs = Db::name('member')->where('id',$id)->delete(); if($rs){ return json(['status'=>1]); } } public function user_details_tg($id='') { $rs = Db::name('member m') ->join('th_tgmember_info t','m.id = t.uid') ->where('m.id',$id) ->field('t.* ,m.mobilephone,m.status,m.addtime') ->find(); $this->assign('data',$rs); return view(); } }
1.5
2
ess-20140828/src/Models/DescribeLimitationResponseBody.php
CircleCurve/alibabacloud-php-sdk
0
563
<?php // This file is auto-generated, don't edit it. Thanks. namespace AlibabaCloud\SDK\Ess\V20140828\Models; use AlibabaCloud\Tea\Model; class DescribeLimitationResponseBody extends Model { /** * @var int */ public $maxNumberOfLifecycleHooks; /** * @var int */ public $maxNumberOfScalingRules; /** * @var int */ public $maxNumberOfScalingInstances; /** * @var int */ public $maxNumberOfScheduledTasks; /** * @var int */ public $maxNumberOfVServerGroups; /** * @var int */ public $maxNumberOfLoadBalancers; /** * @var int */ public $maxNumberOfMinSize; /** * @var int */ public $maxNumberOfScalingGroups; /** * @var int */ public $maxNumberOfNotificationConfigurations; /** * @var int */ public $maxNumberOfMaxSize; /** * @var int */ public $maxNumberOfDBInstances; /** * @var int */ public $maxNumberOfScalingConfigurations; protected $_name = [ 'maxNumberOfLifecycleHooks' => 'MaxNumberOfLifecycleHooks', 'maxNumberOfScalingRules' => 'MaxNumberOfScalingRules', 'maxNumberOfScalingInstances' => 'MaxNumberOfScalingInstances', 'maxNumberOfScheduledTasks' => 'MaxNumberOfScheduledTasks', 'maxNumberOfVServerGroups' => 'MaxNumberOfVServerGroups', 'maxNumberOfLoadBalancers' => 'MaxNumberOfLoadBalancers', 'maxNumberOfMinSize' => 'MaxNumberOfMinSize', 'maxNumberOfScalingGroups' => 'MaxNumberOfScalingGroups', 'maxNumberOfNotificationConfigurations' => 'MaxNumberOfNotificationConfigurations', 'maxNumberOfMaxSize' => 'MaxNumberOfMaxSize', 'maxNumberOfDBInstances' => 'MaxNumberOfDBInstances', 'maxNumberOfScalingConfigurations' => 'MaxNumberOfScalingConfigurations', ]; public function validate() { } public function toMap() { $res = []; if (null !== $this->maxNumberOfLifecycleHooks) { $res['MaxNumberOfLifecycleHooks'] = $this->maxNumberOfLifecycleHooks; } if (null !== $this->maxNumberOfScalingRules) { $res['MaxNumberOfScalingRules'] = $this->maxNumberOfScalingRules; } if (null !== $this->maxNumberOfScalingInstances) { $res['MaxNumberOfScalingInstances'] = $this->maxNumberOfScalingInstances; } if (null !== $this->maxNumberOfScheduledTasks) { $res['MaxNumberOfScheduledTasks'] = $this->maxNumberOfScheduledTasks; } if (null !== $this->maxNumberOfVServerGroups) { $res['MaxNumberOfVServerGroups'] = $this->maxNumberOfVServerGroups; } if (null !== $this->maxNumberOfLoadBalancers) { $res['MaxNumberOfLoadBalancers'] = $this->maxNumberOfLoadBalancers; } if (null !== $this->maxNumberOfMinSize) { $res['MaxNumberOfMinSize'] = $this->maxNumberOfMinSize; } if (null !== $this->maxNumberOfScalingGroups) { $res['MaxNumberOfScalingGroups'] = $this->maxNumberOfScalingGroups; } if (null !== $this->maxNumberOfNotificationConfigurations) { $res['MaxNumberOfNotificationConfigurations'] = $this->maxNumberOfNotificationConfigurations; } if (null !== $this->maxNumberOfMaxSize) { $res['MaxNumberOfMaxSize'] = $this->maxNumberOfMaxSize; } if (null !== $this->maxNumberOfDBInstances) { $res['MaxNumberOfDBInstances'] = $this->maxNumberOfDBInstances; } if (null !== $this->maxNumberOfScalingConfigurations) { $res['MaxNumberOfScalingConfigurations'] = $this->maxNumberOfScalingConfigurations; } return $res; } /** * @param array $map * * @return DescribeLimitationResponseBody */ public static function fromMap($map = []) { $model = new self(); if (isset($map['MaxNumberOfLifecycleHooks'])) { $model->maxNumberOfLifecycleHooks = $map['MaxNumberOfLifecycleHooks']; } if (isset($map['MaxNumberOfScalingRules'])) { $model->maxNumberOfScalingRules = $map['MaxNumberOfScalingRules']; } if (isset($map['MaxNumberOfScalingInstances'])) { $model->maxNumberOfScalingInstances = $map['MaxNumberOfScalingInstances']; } if (isset($map['MaxNumberOfScheduledTasks'])) { $model->maxNumberOfScheduledTasks = $map['MaxNumberOfScheduledTasks']; } if (isset($map['MaxNumberOfVServerGroups'])) { $model->maxNumberOfVServerGroups = $map['MaxNumberOfVServerGroups']; } if (isset($map['MaxNumberOfLoadBalancers'])) { $model->maxNumberOfLoadBalancers = $map['MaxNumberOfLoadBalancers']; } if (isset($map['MaxNumberOfMinSize'])) { $model->maxNumberOfMinSize = $map['MaxNumberOfMinSize']; } if (isset($map['MaxNumberOfScalingGroups'])) { $model->maxNumberOfScalingGroups = $map['MaxNumberOfScalingGroups']; } if (isset($map['MaxNumberOfNotificationConfigurations'])) { $model->maxNumberOfNotificationConfigurations = $map['MaxNumberOfNotificationConfigurations']; } if (isset($map['MaxNumberOfMaxSize'])) { $model->maxNumberOfMaxSize = $map['MaxNumberOfMaxSize']; } if (isset($map['MaxNumberOfDBInstances'])) { $model->maxNumberOfDBInstances = $map['MaxNumberOfDBInstances']; } if (isset($map['MaxNumberOfScalingConfigurations'])) { $model->maxNumberOfScalingConfigurations = $map['MaxNumberOfScalingConfigurations']; } return $model; } }
0.953125
1
index.php
tluu9/dating3
0
571
<?php //Require autoload file require_once('vendor/autoload.php'); session_start(); ini_set('display_errors', true); error_reporting(E_ALL); //validate file require_once('model/validate.php'); //Create an instance of the Base class $f3 = Base::instance(); /** * set arrays */ //states $f3->set('states', array('Alabama','Alaska','Arizona','Arkansas','California', 'Colorado','Connecticut','Delaware','District of Columbia','Florida','Georgia', 'Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana', 'Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri', 'Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York', 'North Carolina','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Rhode Island', 'South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virginia','Washington', 'West Virginia','Wisconsin','Wyoming')); //in-door $f3->set("indoorInterests", array('tv', 'puzzles', 'movies', 'reading', 'cooking', 'playing cards', 'board games', 'video games')); //out-door $f3->set("outdoorInterests", array('hiking', 'walking', 'biking', 'climbing', 'swimming', 'collecting')); //define a default route/home page $f3->route('GET /', function () { $view = new Template(); echo $view->render('views/home.html'); }); //Route to information form1 - personal $f3->route('GET|POST /personal', function ($f3) { if(!empty($_POST)) { //Get data $first = $_POST['first']; $last = $_POST['last']; $age = $_POST['age']; $gender = $_POST['gender']; $phone = $_POST['phone']; $membership = $_POST['membership']; //Add to hive $f3->set('first', $first); $f3->set('last', $last); $f3->set('age', $age); $f3->set('gender', $gender); $f3->set('phone', $phone); $f3->set('membership', $membership); //Validate form 1-personal if (form1()) { //Session $_SESSION['first'] = $first; $_SESSION['last'] = $last; $_SESSION['age'] = $age; $_SESSION['phone'] = $phone; if (empty($gender)) { $_SESSION['gender'] = "No gender selected"; } else { $_SESSION['gender'] = $gender; } //get data from classes if($membership === "premium") { $member = new PremiumMember($first, $last, $age, $gender, $phone); } else { $member = new Member($first, $last, $age, $gender, $phone); } $_SESSION['member'] = $member; //reroute to profile $f3->reroute('/profile'); } } $view = new Template(); echo $view->render('views/personal.html'); }); //Route to information form2 - profile $f3->route('GET|POST /profile', function ($f3) { if(!empty($_POST)) { //Get data $email = $_POST['email']; $state = $_POST['state']; $bio = $_POST['bio']; $seeking = $_POST['seeking']; //Add data to hive $f3->set('email', $email); $f3->set('state', $state); $f3->set('bio', $bio); $f3->set('seeking', $seeking); //validate form 2 if (form2()) { //Write data to Session $_SESSION['email'] = $email; $_SESSION['state'] = $state; if (empty($bio)) { $_SESSION['bio'] = "No biography"; } else { $_SESSION['bio'] = $bio; } if (empty($seeking)) { $_SESSION['seeking'] = "Not seeking any"; } else { $_SESSION['seeking'] = $seeking; } $member = $_SESSION['member']; $member->setEmail($email); $member->setState($state); $member->setBio($bio); $member->setSeeking($seeking); $_SESSION['member'] = $member; if($member instanceof PremiumMember) { $f3->reroute('/interests'); } //reroute to summary $f3->reroute('/summary'); } } $view = new Template(); echo $view->render('views/profile.html'); }); //Route to interest $f3->route('GET|POST /interests', function ($f3) { if(!empty($_POST)) { //Get data $indoor = $_POST['indoor']; $outdoor = $_POST['outdoor']; //Add to hive $f3->set('indoor', $indoor); $f3->set('outdoor', $outdoor); //interests validation if (validInterest()) { //Session //indoor if (empty($indoor)) { $_SESSION['indoor'] = ["no indoor interests"]; } else { $_SESSION['indoor'] = $indoor; } //outdoor if (empty($outdoor)) { $_SESSION['outdoor'] = ["no outdoor interests"]; } else { $_SESSION['outdoor'] = $outdoor; } $_SESSION['member']->setInDoorInterests($indoor); $_SESSION['member']->setOutDoorInterests($outdoor); //reroute to summary $f3->reroute('/summary'); } } $view = new Template(); echo $view->render('views/interest.html'); }); //Route to summary $f3->route('GET|POST /summary', function () { $view = new Template(); echo $view->render('views/summary.html'); }); //Run fat-free $f3->run(); ?>
1.265625
1
app/models/model/UserAttentionModel.php
rocboss/rocboss-api
25
579
<?php namespace model; /** * UserAttentionModel * @author ROC <<EMAIL>> */ class UserAttentionModel extends Model { // The table name. const TABLE = 'rocboss_user_attention'; // Columns the model expects to exist const COLUMNS = ['id', 'user_id', 'attentioned_user_id', 'created_at', 'updated_at', 'is_deleted']; // List of columns which have a default value or are nullable const OPTIONAL_COLUMNS = ['created_at']; // Primary Key const PRIMARY_KEY = ['id']; // List of columns to receive the current timestamp automatically const STAMP_COLUMNS = [ 'updated_at' => 'datetime', ]; // It defines the column affected by the soft delete const SOFT_DELETE = 'is_deleted'; }
1.125
1
vendor/phalcon/devtools/scripts/Phalcon/Db/Adapter/Pdo/PostgresqlExtended.php
guanhui07/phalcon_test
4
587
<?php /* +------------------------------------------------------------------------+ | Phalcon Framework | +------------------------------------------------------------------------+ | Copyright (c) 2011-2017 Phalcon Team (http://www.phalconphp.com) | +------------------------------------------------------------------------+ | This source file is subject to the New BSD License that is bundled | | with this package in the file LICENSE.txt. | | | | 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 <EMAIL> so we can send you a copy immediately. | +------------------------------------------------------------------------+ | Authors: <NAME> <<EMAIL>> | | | +------------------------------------------------------------------------+ */ namespace Phalcon\Db\Adapter\Pdo; use Phalcon\Db\ReferenceInterface; use Phalcon\Db\Reference; use Phalcon\Db\Exception; use Phalcon\Db; /** * Phalcon\Db\Dialect\Postgresql * * @package Phalcon\Db\Adapter\Pdo */ class PostgresqlExtended extends Postgresql { /** * Lists table references * * @param string $table * @param string $schema * @return ReferenceInterface[] * */ public function describeReferences($table, $schema = NULL) { $references = []; foreach ($this->fetchAll($this->_dialect->describeReferences($table, $schema),Db::FETCH_NUM) as $reference) { $constraintName = $reference[2]; if (!isset($references[$constraintName])) { $referencedSchema = $reference[3]; $referencedTable = $reference[4]; $referenceUpdate = $reference[6]; $referenceDelete = $reference[7]; $columns = []; $referencedColumns = []; } else { $referencedSchema = $references[$constraintName]["referencedSchema"]; $referencedTable = $references[$constraintName]["referencedTable"]; $columns = $references[$constraintName]["columns"]; $referencedColumns = $references[$constraintName]["referencedColumns"]; $referenceUpdate = $references[$constraintName]["onUpdate"]; $referenceDelete = $references[$constraintName]["onDelete"]; } $columns[] = $reference[1]; $referencedColumns[] = $reference[5]; $references[$constraintName] = [ "referencedSchema" => $referencedSchema, "referencedTable" => $referencedTable, "columns" => $columns, "referencedColumns" => $referencedColumns, "onUpdate" => $referenceUpdate, "onDelete" => $referenceDelete ]; } $referenceObjects = []; foreach ($references as $name => $arrayReference) { $referenceObjects[$name] = new Reference($name, [ "referencedSchema" => $arrayReference["referencedSchema"], "referencedTable" => $arrayReference["referencedTable"], "columns" => $arrayReference["columns"], "referencedColumns" => $arrayReference["referencedColumns"], "onUpdate" => $arrayReference["onUpdate"], "onDelete" => $arrayReference["onDelete"] ]); } return $referenceObjects; } }
0.964844
1
resources/views/articles/index.blade.php
matheus21/learning_laravel_laracasts
0
595
@extends('layouts.app') @section('content') <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <div class="card card-default"> <div class="card-header">Articles</div> <div class="card-body"> @foreach($articles as $article) <article> <a href="{{ url('/articles', $article->id) }}"><h2>{{ $article->title }}</h2></a> <div class="body">{{ $article->body }}</div> </article> @endforeach </div> </div> </div> </div> </div> @endsection
0.90625
1
src/component/form/field/input/Input.php
rocky-git/ex-admin-ui
0
603
<?php namespace ExAdmin\ui\component\form\field\input; use ExAdmin\ui\component\Component; use ExAdmin\ui\component\form\Field; /** * 输入框 * Class Input * @link https://next.antdv.com/components/input-cn 输入框组件 * @method $this addonAfter(mixed $content) 带标签的 input,设置后置标签 string|slot * @method $this addonBefore(mixed $content) 带标签的 input,设置前置标签 string|slot * @method $this bordered(bool $bordered = true) 是否有边框 boolean * @method $this placeholder(string $text) 输入框占位文本 * @method $this disabled(bool $disabled = false) 是否禁用状态,默认为 false boolean * @method $this id(string $id) 输入框的 id string * @method $this maxlength(int $num) 最大长度 number * @method $this prefix(mixed $prefix) 带有前缀图标的 input string|slot * @method $this size(string $size = 'default') 控件大小。注:标准表单内的输入框大小限制为 large。可选 large default small string|slot * @method $this suffix(mixed $suffix) 带有后缀图标的 input string|slot * @method $this type(string $type = 'text') 声明 input 类型,同原生 input 标签的 type 属性。 string * @method $this allowClear(bool $is_allow) 可以点击清除图标删除内容 boolean * @package ExAdmin\ui\component\form\field */ class Input extends Field { protected $slot = [ 'addonAfter', 'addonBefore', 'prefix', 'suffix', ]; /** * 组件名称 * @var string */ protected $name = 'AInput'; public function __construct($field = null,$value = '') { parent::__construct($field, $value); $this->allowClear(); } }
1.4375
1
includes/Devices/BaseEffectDevice.php
RouNNdeL/smart-home
1
611
<?php /** * MIT License * * Copyright (c) 2019 Krzysztof "RouNdeL" Zdulski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ namespace App\Devices; use App\Database\DbUtils; use App\Effects\Effects\Effect; use App\Utils; use UnexpectedValueException; /** * Created by PhpStorm. * User: Krzysiek * Date: 2018-05-16 * Time: 14:15 */ abstract class BaseEffectDevice extends SimpleRgbDevice { const ACTIONS_TOGGLE_EFFECT = "effect"; const TOGGLE_EFFECT_BIT = 0; /** @var Effect[] */ private $effects; /** @var bool */ private $effects_enabled; /** @var int */ private $max_color_count; /** @var int */ private $max_effect_count; /** @var int */ private $max_active_effect_count; private $effect_indexes = []; /** * RgbEffectDevice constructor. * @param string $device_id * @param string $device_name * @param array $synonyms * @param bool $home_actions * @param bool $will_report_state * @param bool $smart_things * @param int $color * @param int $brightness * @param bool $on * @param int $toggles * @param null $max_color_count * @param null $max_effect_count * @param null $max_active_effect_count */ public function __construct(string $device_id, string $device_name, array $synonyms, bool $home_actions, bool $will_report_state, bool $smart_things, int $color = 0xffffff, int $brightness = 100, bool $on = true, int $toggles = 0, $max_color_count = null, $max_effect_count = null, $max_active_effect_count = null ) { parent::__construct($device_id, $device_name, $synonyms, $home_actions, $will_report_state, $smart_things, $color, $brightness, $on); $this->effects_enabled = $toggles & (1 << BaseEffectDevice::TOGGLE_EFFECT_BIT); $this->max_color_count = $max_color_count; $this->max_effect_count = $max_effect_count; $this->max_active_effect_count = $max_active_effect_count; $this->loadEffects(); $this->loadEffectIndexes(); } private function loadEffects() { $this->effects = Effect::forDevice($this->device_id); } private function loadEffectIndexes() { $conn = DbUtils::getConnection(); $sql = "SELECT effect_id, device_index FROM devices_effect_join WHERE device_id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("s", $this->device_id); $stmt->bind_result($effect_id, $index); $stmt->execute(); while($stmt->fetch()) { if($index !== null && $index < $this->max_active_effect_count) $this->effect_indexes[$index] = $effect_id; } $stmt->close(); } public function handleSaveJson($json) { parent::handleSaveJson($json); $this->effects_enabled = $json["effects_enabled"]; } public function handleAssistantAction($command) { if($command["command"] == VirtualDevice::DEVICE_COMMAND_SET_TOGGLES) { if(isset($command["params"]) && isset($command["params"]["updateToggleSettings"])) { $this->effects_enabled = $command["params"]["updateToggleSettings"][BaseEffectDevice::ACTIONS_TOGGLE_EFFECT]; } } parent::handleAssistantAction($command); } public function getStateJson(bool $online = false) { $json = parent::getStateJson($online); $json["currentToggleSettings"][BaseEffectDevice::ACTIONS_TOGGLE_EFFECT] = $this->effects_enabled; return $json; } public function getActionsTraits() { $array = parent::getActionsTraits(); array_push($array, self::DEVICE_TRAIT_TOGGLES); return $array; } public function getActionsAttributes() { $attributes = parent::getActionsAttributes(); $name_values = []; $name_values[] = ["lang" => "en", "name_synonym" => ["effect", "Effects", "light effect", "light Effects", "led Effects"]]; $attributes[self::DEVICE_ATTRIBUTE_AVAILABLE_TOGGLES] = [ ["name" => self::ACTIONS_TOGGLE_EFFECT, "name_values" => $name_values] ]; return $attributes; } /** * @param string $header_name * @param string $footer_html * @return string */ public function toHtml($header_name = null, $footer_html = "") { if($header_name !== null) $name = $header_name; else $name = $this->device_name; $id = urlencode($this->device_id); $display_name = urlencode($this->device_name); $checked = $this->on ? "checked" : ""; $checked_effects = $this->effects_enabled ? "checked" : ""; $color = "#" . str_pad(dechex($this->color), 6, '0', STR_PAD_LEFT); $center_row = strlen($footer_html) === 0 ? "justify-content-center" : ""; $center_col = strlen($footer_html) === 0 ? "col-auto" : "col"; return <<<HTML <form> <div class="card-header"> <div class="row"> <div class="col text-center-vertical"><h6 class="mb-0">$name</h6></div> <div class="col-auto float-right pl-0"> <input data-input-class="base-effect-state" class="checkbox-switch change-listen" type="checkbox" name="state" $checked data-size="small" data-label-width="10" id="state-$this->device_id"> </div> </div> </div> <div class="card-body"> <div class="row $center_row"> <div class="$center_col"> <p class="mb-2">Brightness</p> <div class="slider-container"> <input data-input-class="base-effect-brightness" class="slider change-listen" type="text" name="brightness" id="brightness-$this->device_id" value="$this->brightness"> </div> <div class="input-group mt-3"> <label for="Effects-$this->device_id">Effects enabled <div class="ml-3 d-inline"> <input data-input-class="base-effect-Effects" class="checkbox-switch change-listen" type="checkbox" name="effects_enabled" $checked_effects data-size="mini" data-label-width="10" id="Effects-$this->device_id"> </label> </div> </div> <div class="color-container row"> <div class="col"> <div data-input-class="base-effect-color" class="color-picker-init" > <input id="color-$this->device_id" name="color" type="text change-listen" class="form-control color-input" value="$color"/> </div> </div> </div> </div> </div> </div> <div class="card-footer py-2"> <div class="row"> <div class="col text-center-vertical"> <a href="/effect/$display_name/$id" class="mb-1"><small class="align-middle text-muted">Effect settings</small></a> </div> $footer_html </div> </div> </form> HTML; } public function effectHtml(int $effect_id) { $device = $this->device_id; $profile_colors = Utils::getString("profile_colors"); $profile_effect = Utils::getString("profile_effect"); $profile_name = Utils::getString("effect_name"); $profile_add_color = Utils::getString("profile_add_color"); $max_colors = $this->max_color_count; $current_effect = $this->getEffectById($effect_id); $effect_name = htmlspecialchars($current_effect->getName()); $max_colors = $current_effect->getMaxColors() === Effect::COLOR_COUNT_UNLIMITED ? $max_colors : min($max_colors, $current_effect->getMaxColors()); $min_colors = $current_effect->getMinColors(); $disabled = sizeof($current_effect->getColors()) >= $max_colors ? "disabled" : ""; $color_template = Effect::getColorTemplateLocalized(); $colors_html_e = $current_effect->colorsHtml($max_colors); $colors_html = $colors_html_e === null ? "" : "<div class=\"row\"> <div class=\"col pr-0\"><h4 class=\"header-colors\">$profile_colors</h4></div> <div class=\"col-auto pr-3\"> <button class=\"add-color-btn btn btn-primary btn-sm color-swatch\" type=\"button\" $disabled>$profile_add_color</button> </div> </div> <div class=\"swatch-container\" data-color-limit=\"$max_colors\"> $colors_html_e </div><div class='color-swatch-template d-none'>$color_template</div> "; $effects_html = ""; $html = "<form data-effect-id=\"$effect_id\" data-max-colors=\"$max_colors\" data-min-colors=\"$min_colors\">"; foreach($this->getAvailableEffects() as $id => $effect_id) { $string = Utils::getString("profile_effect_" . $effect_id); $effects_html .= "<option value=\"$id\" " . ($id == $current_effect->getEffectId() ? " selected" : "") . ">$string</option>"; } $name_placeholder = Utils::getString("effect_default_name") . " $effect_id"; $html .= "<div class=\"row mt-2\"> <div class=\"col-24 col-sm-12 col-lg-8 col-xl-6 mb-3 mb-lg-0\"> <div class=\"form-group\"> <h4>$profile_name</h4> <input class='form-control effect-name-input' name='effect_name' value=\"$effect_name\" placeholder='$name_placeholder'> </div> <div class=\"form-group\"> <h4>$profile_effect</h4> <select class=\"form-control effect-select\" name=\"effect\" id=\"effect-select-$device\"> $effects_html </select> </div> $colors_html </div>"; $html .= $current_effect->timingArgHtml(); $html .= "</div></form>"; return $html; } public function getEffectById(int $effect_id) { foreach($this->effects as $effect) { if($effect->getId() === $effect_id) return $effect; } return null; } public abstract function getAvailableEffects(); public function updateEffect(Effect $effect) { foreach($this->effects as $i => $e) { if($e->getId() === $effect->getId()) { $this->effects[$i] = $effect; $effect->toDatabase(); return $this->updateEffectIndexes($effect->getId()); } } return $this->addEffect($effect); } /** * Attempts to find room for new effect_id, if indexes exceed max effect count * removes the least recently modified effect and inserts the new one in it's place * * @param int $effect_id * @return int */ private function updateEffectIndexes(int $effect_id) { /* Effect already indexed */ if(($key = array_search($effect_id, $this->effect_indexes)) !== false) { return $key; } if(sizeof($this->effect_indexes) < $this->max_active_effect_count) { $this->effect_indexes[] = $effect_id; return sizeof($this->effect_indexes) - 1; } $oldest = $this->getOldestEffectId(); if(($key = array_search($oldest, $this->effect_indexes)) !== false) { $this->effect_indexes[$key] = $effect_id; return $key; } throw new UnexpectedValueException("$oldest key is not present in effect_indexes"); } private function getOldestEffectId() { $old = time(); $id = -1; foreach($this->effect_indexes as $effect_id) { $effect = $this->getEffectById($effect_id); $d = $effect->getLastModificationDate(); if($d <= $old) { $old = $d; $id = $effect_id; } } return $id; } public function addEffect(Effect $effect) { $this->effects[] = $effect; $effect->toDatabase(); $this->updateEffectIndexes($effect->getId()); return sizeof($this->effects) - 1; } public function getEffectIdByIndex(int $index) { return $this->effects[$index]->getId(); } public abstract function getDefaultEffect(); public function toDatabase() { $conn = DbUtils::getConnection(); $state = $this->on ? 1 : 0; $toggles = (($this->effects_enabled ? 1 : 0) << BaseEffectDevice::TOGGLE_EFFECT_BIT); $sql = "UPDATE devices_virtual SET color = ?, brightness = ?, state = ?, toggles = ? WHERE id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("iiiis", $this->color, $this->brightness, $state, $toggles, $this->device_id); $stmt->execute(); $changes = $stmt->affected_rows > 0 ? true : false; $stmt->close(); foreach($this->effects as $effect) { $effect->toDatabase(); } $this->saveEffectIndexes(); return $changes; } public function saveEffectIndexes() { $conn = DbUtils::getConnection(); $sql = "UPDATE devices_effect_join SET device_index = NULL WHERE device_id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("s", $this->device_id); $stmt->execute(); $stmt->close(); $sql = /** @lang MySQL */ "INSERT devices_effect_join SET effect_id = ?, device_index = ?, device_id = ? ON DUPLICATE KEY UPDATE device_index = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("iisi", $effect_id, $index, $this->device_id, $index); foreach($this->effect_indexes as $index => $effect_id) { $stmt->execute(); } $stmt->close(); } /** * @return bool */ public function areEffectsEnabled(): bool { return $this->effects_enabled; } /** * @param bool $effects_enabled */ public function setEffectsEnabled(bool $effects_enabled) { $this->effects_enabled = $effects_enabled; } /** * @return Effect[] */ public function getEffects(): array { return $this->effects; } public function setEffect(int $index, Effect $effect) { $this->effects[$index] = $effect; } }
1.632813
2
resources/views/edit.blade.php
wtransporter/video-catalogue
0
619
@extends('layouts.main') @section('content') @if (Session::has('status')) <div class="container flex flex-col md:flex-row w-1/3 justify-center mx-auto px-2 py-2"> <p class="w-full h-full py-2 px-2 border-1 border-green-700 text-green-200 bg-green-500 rounded italic">{{ Session::get('status') }}</p> </div> @endif <div class="container flex flex-col md:flex-row justify-center mx-auto px-4 py-4"> <form class="w-full max-w-lg" action="{{ route('article.update', $article->slug) }}" method="POST" enctype="multipart/form-data"> @csrf @method('PATCH') <div class="flex flex-wrap -mx-3 mb-6"> <div class="w-full px-3 mb-6 md:mb-0"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="title"> Title </label> <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white" id="title" name="title" type="text" placeholder="Title" value="{{ $article->title }}"> @if ($errors->has('title')) <p class="text-red-500 text-xs italic">{{ $errors->first('title') }}</p> @endif </div> <div class="w-full px-3"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="description"> Description </label> <textarea class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="description" name="description" type="text" placeholder="Description" rows="10">{{ $article->description }}</textarea> @if ($errors->has('description')) <p class="text-red-500 text-xs italic">{{ $errors->first('description') }}</p> @endif </div> </div> <div class="flex flex-wrap -mx-3 mb-2"> <div class="w-full px-3"> <div class="w-full bg-grey-lighter"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="file_path"> File path </label> <input type="file" name="file_path" id="file_path" class="appearance-none block bg-orange-500 mt-2 rounded px-1 py-1 text-gray-900 focus:outline-none hover:bg-orange-600 cursor-pointer"> </div> @if ($errors->has('path')) <p class="text-red-500 text-xs italic">{{ $errors->first('path') }}</p> @endif </div> </div> <div class="flex flex-wrap -mx-3 mb-2"> <div class="w-full md:w-2/3 px-3 mb-6 md:mb-0"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="image_path"> Image path </label> <input class="appearance-none block bg-orange-500 mt-2 rounded px-1 py-1 text-gray-900 focus:outline-none hover:bg-orange-600 cursor-pointer" type="file" name="image_path" id="image_path"> </div> <div class="w-full md:w-1/3 px-3 mb-6 md:mb-0"> <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="type"> Type </label> <div class="relative"> <select class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-2 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id="type" name="type"> <option {{ $article->type == 'Text' ? 'selected' : '' }}>Text</option> <option {{ $article->type == 'Video' ? 'selected' : '' }}>Video</option> </select> <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700"> <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg> </div> </div> </div> </div> <div class="w-1/3 -mx-3 px-3 pt-4 mb-6 md:mb-0"> <button class="flex items-center bg-orange-500 text-gray-900 rounded font-semibold px-3 py-2 hover:bg-orange-600 transition ease-in-out duration-150"> <span>Submit</span> </button> </div> </form> </div> @endsection
1.140625
1
includes/templates/header.php
drendonr3/bienesraicesPOO_WO_MCV
0
627
<?php if (!isset($_SESSION)){ session_start(); } $auth = $_SESSION['login'] ?? false; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Bienes Raices</title> <link rel="stylesheet" href="/build/css/app.css"> </head> <body> <header class="header <?php echo $inicio ? 'inicio' :'';?>"> <div class="contenedor contenido-header"> <div class="barra"> <a href="/"> <img src="/build/img/logo.svg" alt="Logotipo de Bienes Raices"> </a> <div class="mobile-menu"> <img src="/build/img/barras.svg" alt="Icono Menu Responsive" srcset=""> </div> <div class="navegacion"> <a href="nosotros.php">Nosotros</a> <a href="anuncios.php">Anuncios</a> <a href="blog.php">Blog</a> <a href="contacto.php">Contacto</a> <?php if($auth){?> <a href="cerrarSesion.php">Cerrar Sesion</a> <?php }?> </div> </div> <?php echo $inicio ? ' <h1>Venta de Casas y Departamentos Explusivos de Lujo</h1> ' : '';?> </div> </header>
0.859375
1
SMT2-WEBPRO/TP-04/form.php
harisfi/TP_ALPRO
1
635
<body class="ui three column grid" style="display: grid; align-content: center; background-color: mintcream;"> <div class="column centered"> <div class="ui fluid card"> <div class="content"> <div class="center aligned ui huge header">Log In</div> <form class="ui form" action="cekLogin.php" method="POST"> <div class="required field"> <label>Username</label> <div class="ui left icon input"> <input type="text" name="username" placeholder="Username" required> <i class="user icon"></i> </div> </div> <div class="required field"> <label>Password</label> <div class="ui left icon input"> <input type="password" name="password" placeholder="Password" required> <i class="lock icon"></i> </div> </div> <div class="ui divider"></div> <button class="fluid ui blue animated button" tabindex="0" type="submit"> <div class="visible content">Login</div> <div class="hidden content"> <i class="right arrow icon"></i> </div> </button> </form><br> <div class="ui inverted segment"> <div class="ui inverted accordion"> <div class="title"> <i class="dropdown icon"></i> Akun yang bisa login </div> <div class="content"> <ul class="list"> <li>username: admin</li> <li>password: <PASSWORD></li> </ul> </div> </div> </div> <?php if (isset($_GET['error'])) { echo " <div class='ui negative message'> <div class='header'>Oops!</div> <p>Maaf username atau password Anda salah</p> </div>"; } ?> </div> </div> </div> </body> <script> $('.ui.accordion').accordion('refresh'); </script>
0.9375
1
database/migrations/2017_12_30_211327_create_parts_table.php
rogwild/arparser
1
643
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePartsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('parts', function (Blueprint $table) { $table->increments('id'); $table->text('models')->nullable(); $table->string('category'); $table->integer('user_id'); $table->integer('store_id')->nullable(); $table->boolean('visibility')->default(true); $table->string('avito_category')->nullable(); $table->text('description')->nullable(); $table->text('main_description')->nullable(); $table->text('part_description')->nullable(); $table->text('additional_description_1')->nullable(); $table->text('additional_description_2')->nullable(); $table->text('additional_description_3')->nullable(); $table->string('titleOfAd'); $table->integer('price'); $table->string('parsed_engine'); $table->string('number'); $table->string('link'); $table->integer('price_main'); $table->string('image'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('parts'); } }
1.25
1
tests/BusinessTest.php
micahcourey/w
0
651
<?php /** * @backupGlobals disabled * @backupStaticAttributes disabled */ //All tests passed require_once 'src/Business.php'; require_once 'src/Category.php'; require_once 'src/User.php'; require_once 'src/Activity.php'; $server = 'mysql:host=localhost;dbname=walk_in_test'; $username = 'root'; $password = '<PASSWORD>'; $DB = new PDO($server, $username, $password); class BusinessTest extends PHPUnit_Framework_TestCase { protected function tearDown() { Business::deleteAll(); // Category::deleteAll(); // User::deleteAll(); Activity::deleteAll(); } ////////////////////////////////////TESTS/////////////////////////////////// ///////////////////////////////// GET SET BUSINESS NAME //////////////////// function testGetBusinessName() { //Arrange $business_name ="IBM"; $business_phone = "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $business_login = "username1"; $business_password= "<PASSWORD>"; $id =3; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $business_login, $business_password, $id=null); //Act $result = $test_business->getBusinessName(); //Assert $this->assertEquals ($business_name, $result); } function testSetBusinessName() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessName("IBM"); $result = $test_business->getBusinessName(); //Assert $this->assertEquals ("IBM", $result); } ////////////////////////// GET SET PHONE ////////////////////////////////////// function testGetBusinessPhone() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $result = $test_business->getBusinessPhone(); //Assert $this->assertEquals ("5033133131", $result); } function testSetBusinessPhone() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessPhone("5033133131"); $result = $test_business->getBusinessPhone(); //Assert $this->assertEquals ("5033133131", $result); } /////////////////////////// GET SET BUS CONTACT ///////////////////////////////// function testGetBusinessContact() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $result = $test_business->getBusinessContact(); //Assert $this->assertEquals ("john", $result); } function testSetBusinessContact() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessContact("john"); $result = $test_business->getBusinessContact(); //Assert $this->assertEquals ("john", $result); } //////////////////////// GET SET BUS WEBSITE //////////////////////////////////// function testGetBusinessWebsite() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $result = $test_business->getBusinessWebsite(); //Assert $this->assertEquals ("walkins.com", $result); } function testSetBusinessWebsite() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessWebsite("walk-ins.com"); $result = $test_business->getBusinessWebsite(); //Assert $this->assertEquals ("walk-ins.com", $result); } /////////////////////////// GET SET BUS ADDRESS /////////////////////////////// function testGetBusinessAddress() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st."; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $result = $test_business->getBusinessAddress(); //Assert $this->assertEquals ("123 fake st.", $result); } function testSetBusinessAddress() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessAddress("123 fake st"); $result = $test_business->getBusinessAddress(); //Assert $this->assertEquals ("123 fake st", $result); } /////////////////////// GET SET BUS CONTACT EMAIL ////////////////////////////// function testGetBusinessContactEmail() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $result = $test_business->getBusinessContactEmail(); //Assert $this->assertEquals ("<EMAIL>", $result); } function testSetBusinessContactEmail() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 5; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->setBusinessContactEmail("<EMAIL>"); $result = $test_business->getBusinessContactEmail(); //Assert $this->assertEquals ("<EMAIL>", $result); } // //////////////////Save, GetAll, DeleteAll, Find, Update////////////// // ///////////////////////////////////////////////////////////////////// function testSave() { //Arrange $business_name="Apple"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id = null); //Act $test_business->save(); // var_dump($test_business); //Assert $result = Business::getAll(); // var_dump($result); $this->assertEquals($test_business, $result[0]); } ////////////////////////// TEST GET ALL /////////////////////////////////////// function testGetAll() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); $business_name2="<NAME>"; $business_phone2= "5033139999"; $business_contact2 = "Theo"; $business_website2 = "Signal.com"; $business_address2 ="123 getreal st"; $business_contact_email2 = "<EMAIL>"; $id2= 2; $test_business2 = new Business($business_name2, $business_phone2, $business_contact2, $business_website2, $business_address2, $business_contact_email2, $id2); $test_business2->save(); //Act $result = Business::getAll(); //Assert $this->assertEquals([$test_business, $test_business2], $result); } // // function testDeleteAll() // { // //Arrange // // //Act // // //Assert // } // function testFind() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); $business_name2="Smoke Signals"; $business_phone2= "5033139999"; $business_contact2 = "Theo"; $business_website2 = "Signal.com"; $business_address2 ="123 getreal st"; $business_contact_email2 = "<EMAIL>"; $id2= 2; $test_business2 = new Business($business_name2, $business_phone2, $business_contact2, $business_website2, $business_address2, $business_contact_email2, $id2); $test_business2->save(); //Act $result = Business::find($test_business->getId()); //Assert $this->assertEquals($test_business, $result); } function testBusinessContactUpdate() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); //Act $new_business_contact = "mary"; $test_business->updateContact($new_business_contact); //Assert $this->assertEquals("mary",$test_business->getBusinessContact()); } function testBusinessPhone() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); //Act $new_business_phone = "4445555"; $test_business->updatePhone($new_business_phone); //Assert $this->assertEquals("4445555",$test_business->getBusinessPhone()); } function testBusinessWebsite() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); //Act $new_business_website = "ibm.con"; $test_business->updateWebsite($new_business_website); //Assert $this->assertEquals("ibm.con",$test_business->getBusinessWebsite()); } function testBusinessContactEmail() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); //Act $new_business_contact_email = "<EMAIL>"; $test_business->updateContactEmail($new_business_contact_email); //Assert $this->assertEquals("<EMAIL>",$test_business->getBusinessContactEmail()); } // //////////////////////////Join Table Getters///////////////////////// // ///////////////////////////////////////////////////////////////////// // function testGetCategoryId() // { // //Arrange // // //Act // // //Assert // } // function testAddActivity() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); $activity_name = "Activity One"; $activity_date = '2016-01-01'; $activity_location = "Location"; $activity_description = "Description of Activity One"; $activity_price = "Price of Activity One"; $activity_quantity = 10; $business_id = 11; $id = 1; $test_activity = new Activity($activity_name, $activity_date, $activity_location, $activity_description, $activity_price, $activity_quantity, $business_id, $id = null); $test_activity->save(); //Act $test_business->addActivity($test_activity); //Assert $this->assertEquals([$test_activity], $test_business->getActivities()); } function testGetActivities() { //Arrange $business_name="IBM"; $business_phone= "5033133131"; $business_contact = "john"; $business_website = "walkins.com"; $business_address ="123 fake st"; $business_contact_email = "<EMAIL>"; $id= 1; $test_business = new Business ($business_name, $business_phone, $business_contact, $business_website, $business_address, $business_contact_email, $id); $test_business->save(); $activity_name = "Activity One"; $activity_date = '2016-01-01'; $activity_location = "Location"; $activity_description = "Description of Activity One"; $activity_price = "Price of Activity One"; $activity_quantity = 10; $business_id = 11; $id = 1; $test_activity = new Activity($activity_name, $activity_date, $activity_location, $activity_description, $activity_price, $activity_quantity, $business_id, $id = null); $test_activity->save(); $activity_name2 = "Activity Two"; $activity_date2 = '2016-02-02'; $activity_location2 = "Location Two"; $activity_description2 = "Description of Activity Two"; $activity_price2 = "Price of Activity Two"; $activity_quantity2 = 20; $business_id2 = 21; $id2 = 2; $test_activity2 = new Activity($activity_name2, $activity_date2, $activity_location2, $activity_description2, $activity_price2, $activity_quantity2, $business_id2, $id2 = null); $test_activity2->save(); //Act $test_business->addActivity($test_activity); $test_business->addActivity($test_activity2); $result = $test_business->getActivities(); //Assert $this->assertEquals([$test_activity, $test_activity2], $result); } } ?>
1.445313
1
src/Facades/Tools/Replace.php
TheDragonCode/support
2
659
<?php /* * This file is part of the "dragon-code/support" project. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author <NAME> <<EMAIL>> * * @copyright 2022 <NAME> * * @license MIT * * @see https://github.com/TheDragonCode/support */ namespace DragonCode\Support\Facades\Tools; use DragonCode\Support\Facades\Facade; use DragonCode\Support\Tools\Replace as Tool; /** * @method static string toFormat(string $value, string $format = null) * @method static string toFormatArray(array $values, string $format = null) */ class Replace extends Facade { protected static function getFacadeAccessor(): string { return Tool::class; } }
1.234375
1
backend/resources/views/question_choices/index.blade.php
satoshohei/docker_laravel
0
667
@extends('question_choices.layout') @section('content') <div class="card mt-5"> <div class="card-header"> <h2>回答管理</h2> </div> <div class="card-body"> <div class="row"> <div class="col-lg-12 mt-1 mr-1"> <div class="float-right"> <a class="btn btn-success" href="{{ route('questions.index') }}"> Create New Post</a> </div> </div> </div> <div class="row mt-2"> <div class="col-lg-12"> @if ($message = Session::get('success')) <div class="alert alert-success"> <p>{{ $message }}</p> </div> @endif </div> <div class="col-lg-12"> <table class="table table-bordered"> <tr> <th>No</th> <th>回答</th> <th>正解</th> <th width="280px">操作</th> </tr> @foreach ($question_choices as $question_choice) <tr> <td>{{ ++$i }}</td> <td>{{ $question_choice->title }}</td> <td>{{ \Str::limit($question_choice->description, 50) }}</td> <td> <form action="{{ route('question_choices.destroy',$question_choice->id) }}" method="POST"> <a class="btn btn-info" href="{{ route('question_choices.show',$question_choice->id) }}">Show</a> <a class="btn btn-primary" href="{{ route('question_choices.edit',$question_choice->id) }}">Edit</a> @csrf @method('DELETE') <button type="submit" class="btn btn-danger">Delete</button> </form> </td> </tr> @endforeach </table> {!! $question_choices->links() !!} </div> </div> </div> </div> @endsection
1.289063
1
addons/default/paralenz/catalog-module/tests/Unit/Product/ProductCollectionTest.php
mo-paralenz/pyrocms-test
0
675
<?php namespace Paralenz\CatalogModule\Test\Unit\Product; class ProductCollectionTest extends \TestCase { }
0.542969
1
source/site/module/xyo/xyo-app-user-group-x-user-group/model/table-toggle.php
g-stefan/xyo-cloud
2
683
<?php // // Copyright (c) 2020-2021 <NAME> <<EMAIL>> // Created by <NAME> <<EMAIL>> // // MIT License (MIT) <http://opensource.org/licenses/MIT> // defined("XYO_CLOUD") or die("Access is denied"); $toggle = trim($this->getRequestInstance("toggle")); if (!strlen($toggle)) { return; }; $this->ds->clear(); $this->ds->{$this->primaryKey} = $this->primaryKeyValue; for ($this->ds->load(); $this->ds->isValid(); $this->ds->loadNext()) { $value = $this->ds->$toggle; if (1 * $value) { $value = 0; } else { $value = 1; }; $this->ds->$toggle = $value; $this->ds->save(); };
1.148438
1
resources/views/pages/admin/jurusan/index.blade.php
yarhamfp/laravel-blog
0
691
@extends('layouts.admin') @section('title') Pendaftar | BakeBlog @endsection @section('content') <div class="page-header pb-10 page-header-dark bg-gradient-primary-to-secondary bg-img-repeat" style="background-image: url('{{ url('backend/assets/img/pattern-shapes.png')}}');"> <div class="container-fluid"> <div class="page-header-content"> <h1 class="page-header-title"> <div class="page-header-icon"> <i data-feather="filter"></i> </div> <span>Data Jurusan</span> </h1> <div class="page-header-subtitle">Data jurusan ini akan ditampilkan pada Frontend Website </div> </div> </div> </div> <div class="container-fluid mt-n10"> <div class="row"> <div class="col-lg-6"> <div class="card mb-4"> <div class="card-header">Tambah Jurusan</div> <div class="card-body"> <div class="sbp-preview"> <div class="sbp-preview-content"> <form action="{{route('jurusan.store')}}" method="POST"> @csrf <div class="form-group "> <label for="jurusan">Jurusan *</label> <input class="form-control shadow-right {{$errors->has('jurusan') ? ' border-danger' : ''}}" id="jurusan" name="jurusan" type="text" value="{{old('jurusan')}}" placeholder="Enter jurusan..."> @if($errors->any()) @foreach ($errors->all() as $error) <span class="text-danger">{{$error}}</span> @endforeach @endif </div> <div class="text-right"> <button type="submit" class="btn btn-primary btn-sm shadow-lg">Simpan</button> </div> </form> </div> </div> </div> </div> </div> <div class="col-lg-6"> <div class="card mb-4"> <div class="card-header">Data Jurusan</div> <div class="card-body"> <div class="datatable table-responsive"> <table class="table table-bordered table-striped" width="100%" cellspacing="0"> <thead> <tr> <th>ID</th> <th>Jurusan</th> <th>Actions</th> </tr> </thead> <tfoot> <tr> <th>ID</th> <th>Jurusan</th> <th>Actions</th> </tr> </tfoot> <tbody> @forelse ($item as $item) <tr> <td>{{$item->id}}</td> <td>{{$item->jurusan}}</td> <td> <form action="{{route('jurusan.destroy',$item->id)}}" method="POST"> @csrf @method('delete') <button type="submit" class="btn btn-datatable btn-icon btn-transparent-dark" onclick="return confirm('Yakin ingin hapus data ini?')"><i data-feather="trash-2"></i> </button> </form> </td> </tr> @empty <tr> <td colspan="3" class="text-center">Data Jurusan Kosong</td> </tr> @endforelse </tbody> </table> </div> </div> </div> </div> </div> </div> @endsection @push('prepend-style') <link href="{{ url('toastr/build/toastr.css')}}" rel="stylesheet"/> @endpush @push('prepend-script') <script src="{{ url('toastr/toastr.js')}}"></script> <script> @if(Session::has('sukses')) toastr.success("Sukses! {{Session::get('sukses')}}") @endif @if(Session::has('error')) toastr.error("Error! {{Session::get('error')}}") @endif @if(Session::has('warning')) toastr.warning("Warning! {{Session::get('warning')}}") @endif </script> @endpush
1.046875
1
vendor/fzaninotto/faker/src/Faker/Provider/Base.php
allen2022/yii2.0blog
0
699
<?php namespace Faker\Provider; use Faker\Generator; use Faker\DefaultGenerator; use Faker\UniqueGenerator; class Base { /** * @var \Faker\Generator */ protected $generator; /** * @var \Faker\UniqueGenerator */ protected $unique; /** * @param \Faker\Generator $generator */ public function __construct(Generator $generator) { $this->generator = $generator; } /** * Returns a random number between 0 and 9 * * @return integer */ public static function randomDigit() { return mt_rand(0, 9); } /** * Returns a random number between 1 and 9 * * @return integer */ public static function randomDigitNotNull() { return mt_rand(1, 9); } /** * Returns a random integer with 0 to $nbDigits digits. * * The maximum value returned is mt_getrandmax() * * @param integer $nbDigits Defaults to a random number between 1 and 9 * @param boolean $strict Whether the returned number should have exactly $nbDigits * @example 79907610 * * @return integer */ public static function randomNumber($nbDigits = null, $strict = false) { if (!is_bool($strict)) { throw new \InvalidArgumentException('randomNumber() generates numbers of fixed width. To generate numbers between two boundaries, use numberBetween() instead.'); } if (null === $nbDigits) { $nbDigits = static::randomDigitNotNull(); } $max = pow(10, $nbDigits) - 1; if ($max > mt_getrandmax()) { throw new \InvalidArgumentException('randomNumber() can only generate numbers up to mt_getrandmax()'); } if ($strict) { return mt_rand(pow(10, $nbDigits - 1), $max); } return mt_rand(0, $max); } /** * Return a random float number * * @param int $nbMaxDecimals * @param int|float $min * @param int|float $max * @example 48.8932 * * @return float */ public static function randomFloat($nbMaxDecimals = null, $min = 0, $max = null) { if (null === $nbMaxDecimals) { $nbMaxDecimals = static::randomDigit(); } if (null === $max) { $max = static::randomNumber(); } if ($min > $max) { $tmp = $min; $min = $max; $max = $tmp; } return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); } /** * Returns a random number between $min and $max * * @param integer $min default to 0 * @param integer $max defaults to 32 bit max integer, ie 2147483647 * @example 79907610 * * @return integer */ public static function numberBetween($min = 0, $max = 2147483647) { return mt_rand($min, $max); } /** * Returns a random letter from a to z * * @return string */ public static function randomLetter() { return chr(mt_rand(97, 122)); } /** * Returns a random ASCII character (excluding accents and special chars) */ public static function randomAscii() { return chr(mt_rand(33, 126)); } /** * Returns random elements from a provided array * * @param array $array Array to take elements from. Defaults to a-f * @param integer $count Number of elements to take. * @throws \LengthException When requesting more elements than provided * * @return array New array with $count elements from $array */ public static function randomElements(array $array = array('a', 'b', 'c'), $count = 1) { $allKeys = array_keys($array); $numKeys = count($allKeys); if ($numKeys < $count) { throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys)); } $highKey = $numKeys - 1; $keys = $elements = array(); $numElements = 0; while ($numElements < $count) { $num = mt_rand(0, $highKey); if (isset($keys[$num])) { continue; } $keys[$num] = true; $elements[] = $array[$allKeys[$num]]; $numElements++; } return $elements; } /** * Returns a random element from a passed array * * @param array $array * @return mixed */ public static function randomElement($array = array('a', 'b', 'c')) { if (!$array) { return null; } $elements = static::randomElements($array, 1); return $elements[0]; } /** * Returns a random key from a passed associative array * * @param array $array * @return int|string|null */ public static function randomKey($array = array()) { if (!$array) { return null; } $keys = array_keys($array); $key = $keys[mt_rand(0, count($keys) - 1)]; return $key; } /** * Returns a shuffled version of the argument. * * This function accepts either an array, or a string. * * @example $faker->shuffle([1, 2, 3]); // [2, 1, 3] * @example $faker->shuffle('hello, world'); // 'rlo,h eold!lw' * * @see shuffleArray() * @see shuffleString() * * @param array|string $arg The set to shuffle * @return array|string The shuffled set */ public static function shuffle($arg = '') { if (is_array($arg)) { return static::shuffleArray($arg); } if (is_string($arg)) { return static::shuffleString($arg); } throw new \InvalidArgumentException('shuffle() only supports strings or arrays'); } /** * Returns a shuffled version of the array. * * This function does not mutate the original array. It uses the * Fisher–Yates algorithm, which is unbiaised, together with a Mersenne * twister random generator. This function is therefore more random than * PHP's shuffle() function, and it is seedable. * * @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle * * @example $faker->shuffleArray([1, 2, 3]); // [2, 1, 3] * * @param array $array The set to shuffle * @return array The shuffled set */ public static function shuffleArray($array = array()) { $shuffledArray = array(); $i = 0; reset($array); while (list($key, $value) = each($array)) { if ($i == 0) { $j = 0; } else { $j = mt_rand(0, $i); } if ($j == $i) { $shuffledArray[]= $value; } else { $shuffledArray[]= $shuffledArray[$j]; $shuffledArray[$j] = $value; } $i++; } return $shuffledArray; } /** * Returns a shuffled version of the string. * * This function does not mutate the original string. It uses the * Fisher–Yates algorithm, which is unbiaised, together with a Mersenne * twister random generator. This function is therefore more random than * PHP's shuffle() function, and it is seedable. Additionally, it is * UTF8 safe if the mb extension is available. * * @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle * * @example $faker->shuffleString('hello, world'); // 'rlo,h eold!lw' * * @param string $string The set to shuffle * @param string $encoding The string encoding (defaults to UTF-8) * @return string The shuffled set */ public static function shuffleString($string = '', $encoding = 'UTF-8') { if (function_exists('mb_strlen')) { // UTF8-safe str_split() $array = array(); $strlen = mb_strlen($string, $encoding); for ($i = 0; $i < $strlen; $i++) { $array []= mb_substr($string, $i, 1, $encoding); } } else { $array = str_split($string, 1); } return join('', static::shuffleArray($array)); } /** * Replaces all hash sign ('#') occurrences with a random number * Replaces all percentage sign ('%') occurrences with a not null number * * @param string $string String that needs to bet parsed * @return string */ public static function numerify($string = '###') { // instead of using randomDigit() several times, which is slow, // count the number of hashes and generate once a large number $toReplace = array(); for ($i = 0, $count = strlen($string); $i < $count; $i++) { if ($string[$i] === '#') { $toReplace []= $i; } } if ($nbReplacements = count($toReplace)) { $maxAtOnce = strlen((string) mt_getrandmax()) - 1; $numbers = ''; $i = 0; while ($i < $nbReplacements) { $size = min($nbReplacements - $i, $maxAtOnce); $numbers .= str_pad(static::randomNumber($size), $size, '0', STR_PAD_LEFT); $i += $size; } for ($i = 0; $i < $nbReplacements; $i++) { $string[$toReplace[$i]] = $numbers[$i]; } } $string = preg_replace_callback('/\%/u', 'static::randomDigitNotNull', $string); return $string; } /** * Replaces all question mark ('?') occurrences with a random letter * * @param string $string String that needs to bet parsed * @return string */ public static function lexify($string = '????') { return preg_replace_callback('/\?/u', 'static::randomLetter', $string); } /** * Replaces hash signs and question marks with random numbers and letters * * @param string $string String that needs to bet parsed * @return string */ public static function bothify($string = '## ??') { return static::lexify(static::numerify($string)); } /** * Replaces * signs with random numbers and letters and special characters * * @example $faker->asciify(''********'); // "s5'G!uC3" * * @param string $string String that needs to bet parsed * @return string */ public static function asciify($string = '****') { return preg_replace_callback('/\*/u', 'static::randomAscii', $string); } /** * Transforms a basic regular expression into a random string satisfying the expression. * * @example $faker->regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // <EMAIL> * * Regex delimiters '/.../' and begin/end markers '^...$' are ignored. * * Only supports a small subset of the regex syntax. For instance, * unicode, negated classes, unbouned ranges, subpatterns, back references, * assertions, recursive patterns, and comments are not supported. Escaping * support is extremely fragile. * * This method is also VERY slow. Use it only when no other formatter * can generate the fake data you want. For instance, prefer calling * `$faker->email` rather than `regexify` with the previous regular * expression. * * Also note than `bothify` can probably do most of what this method does, * but much faster. For instance, for a dummy email generation, try * `$faker->bothify('?????????@???.???')`. * * @see https://github.com/icomefromthenet/ReverseRegex for a more robust implementation * * @param string $regex A regular expression (delimiters are optional) * @return string */ public static function regexify($regex = '') { // ditch the anchors $regex = preg_replace('/^\/?\^?/', '', $regex); $regex = preg_replace('/\$?\/?$/', '', $regex); // All {2} become {2,2} $regex = preg_replace('/\{(\d+)\}/', '{\1,\1}', $regex); // Single-letter quantifiers (?, *, +) become bracket quantifiers ({0,1}, {0,rand}, {1, rand}) $regex = preg_replace('/(?<!\\\)\?/', '{0,1}', $regex); $regex = preg_replace('/(?<!\\\)\*/', '{0,' . static::randomDigitNotNull() . '}', $regex); $regex = preg_replace('/(?<!\\\)\+/', '{1,' . static::randomDigitNotNull() . '}', $regex); // [12]{1,2} becomes [12] or [12][12] $regex = preg_replace_callback('/(\[[^\]]+\])\{(\d+),(\d+)\}/', function ($matches) { return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3]))); }, $regex); // (12|34){1,2} becomes (12|34) or (12|34)(12|34) $regex = preg_replace_callback('/(\([^\)]+\))\{(\d+),(\d+)\}/', function ($matches) { return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3]))); }, $regex); // A{1,2} becomes A or AA or \d{3} becomes \d\d\d $regex = preg_replace_callback('/(\\\?.)\{(\d+),(\d+)\}/', function ($matches) { return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3]))); }, $regex); // (this|that) becomes 'this' or 'that' $regex = preg_replace_callback('/\((.*?)\)/', function ($matches) { return Base::randomElement(explode('|', str_replace(array('(', ')'), '', $matches[1]))); }, $regex); // All A-F inside of [] become ABCDEF $regex = preg_replace_callback('/\[([^\]]+)\]/', function ($matches) { return '[' . preg_replace_callback('/(\w|\d)\-(\w|\d)/', function ($range) { return join(range($range[1], $range[2]), ''); }, $matches[1]) . ']'; }, $regex); // All [ABC] become B (or A or C) $regex = preg_replace_callback('/\[([^\]]+)\]/', function ($matches) { return Base::randomElement(str_split($matches[1])); }, $regex); // replace \d with number and \w with letter and . with ascii $regex = preg_replace_callback('/\\\w/', 'static::randomLetter', $regex); $regex = preg_replace_callback('/\\\d/', 'static::randomDigit', $regex); $regex = preg_replace_callback('/(?<!\\\)\./', 'static::randomAscii', $regex); // remove remaining backslashes $regex = str_replace('\\', '', $regex); // phew return $regex; } /** * Converts string to lowercase. * Uses mb_string extension if available. * * @param string $string String that should be converted to lowercase * @return string */ public static function toLower($string = '') { return extension_loaded('mbstring') ? mb_strtolower($string, 'UTF-8') : strtolower($string); } /** * Converts string to uppercase. * Uses mb_string extension if available. * * @param string $string String that should be converted to uppercase * @return string */ public static function toUpper($string = '') { return extension_loaded('mbstring') ? mb_strtoupper($string, 'UTF-8') : strtoupper($string); } /** * Chainable method for making any formatter optional. * * @param float $weight Set the probability of receiving a null value. * "0" will always return null, "1" will always return the generator. * @return Generator|DefaultGenerator */ public function optional($weight = 0.5, $default = null) { if (mt_rand() / mt_getrandmax() <= $weight) { return $this->generator; } return new DefaultGenerator($default); } /** * Chainable method for making any formatter unique. * * <coder> * // will never return twice the same value * $faker->unique()->randomElement(array(1, 2, 3)); * </coder> * * @param boolean $reset If set to true, resets the list of existing values * @param integer $maxRetries Maximum number of retries to find a unique value, * After which an OverflowException is thrown. * @throws \OverflowException When no unique value can be found by iterating $maxRetries times * * @return UniqueGenerator A proxy class returning only non-existing values */ public function unique($reset = false, $maxRetries = 10000) { if ($reset || !$this->unique) { $this->unique = new UniqueGenerator($this->generator, $maxRetries); } return $this->unique; } }
1.90625
2
3.1.5/sk/search_synonyms.php
Pepe73Lopez/phpBB_SK_translations
1
707
<?php /** * * @package language * @copyright (c) 2007 phpBB Group * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ if (!defined('IN_PHPBB')) { exit; } $synonyms = array( 'abcense' => 'absence', 'abridgement' => 'abridgment', 'accomodate' => 'accommodate', 'acknowledgment' => 'acknowledgement', 'airplane' => 'aeroplane', 'allright' => 'alright ', 'andy' => 'andrew', 'anemia' => 'anaemia', 'anemic' => 'anaemic', 'anesthesia' => 'anaesthesia', 'apologize' => 'apologise', 'archean' => 'archaean', 'archeology' => 'archaeology', 'archeozoic' => 'archaeozoic', 'armor' => 'armour', 'artic' => 'arctic', 'attachment' => 'attachement', 'attendence' => 'attendance', 'barbecue' => 'barbeque', 'behavior' => 'behaviour', 'biassed' => 'biased', 'biol' => 'biology', 'buletin' => 'bulletin', 'calender' => 'calendar', 'canceled' => 'cancelled', 'car' => 'automobile', 'catalog' => 'catalogue', 'cenozoic' => 'caenozoic', 'center' => 'centre', 'check' => 'cheque', 'color' => 'colour', 'comission' => 'commission', 'comittee' => 'committee', 'commitee' => 'committee', 'conceed' => 'concede', 'creating' => 'createing', 'curiculum' => 'curriculum', 'defense' => 'defence', 'develope' => 'develop', 'discription' => 'description', 'dulness' => 'dullness', 'encyclopedia' => 'encyclopaedia', 'enroll' => 'enrol', 'esthetic' => 'aesthetic', 'etiology' => 'aetiology', 'exhorbitant' => 'exorbitant', 'exhuberant' => 'exuberant', 'existance' => 'existence', 'favorite' => 'favourite', 'fetus' => 'foetus', 'ficticious' => 'fictitious', 'flavor' => 'flavour', 'flourescent' => 'fluorescent', 'foriegn' => 'foreign', 'fourty' => 'forty', 'gage' => 'gauge', 'geneology' => 'genealogy', 'grammer' => 'grammar', 'gray' => 'grey', 'guerilla' => 'guerrilla', 'gynecology' => 'gynaecology', 'harbor' => 'harbour', 'heighth' => 'height', 'hemaglobin' => 'haemaglobin', 'hematin' => 'haematin', 'hematite' => 'haematite', 'hematology' => 'haematology', 'honor' => 'honour', 'innoculate' => 'inoculate', 'installment' => 'instalment', 'irrelevent' => 'irrelevant', 'irrevelant' => 'irrelevant', 'jeweler' => 'jeweller', 'judgment' => 'judgement', 'labeled' => 'labelled', 'labor' => 'labour', 'laborer' => 'labourer', 'laborers' => 'labourers', 'laboring' => 'labouring', 'licence' => 'license', 'liesure' => 'leisure', 'liquify' => 'liquefy', 'maintainance' => 'maintenance', 'maintenence' => 'maintenance', 'medieval' => 'mediaeval', 'meter' => 'metre', 'milage' => 'mileage', 'millipede' => 'millepede', 'miscelaneous' => 'miscellaneous', 'morgage' => 'mortgage', 'noticable' => 'noticeable', 'occurence' => 'occurrence', 'offense' => 'offence', 'ommision' => 'omission', 'ommission' => 'omission', 'optimize' => 'optimise', 'organize' => 'organise', 'pajamas' => 'pyjamas', 'paleography' => 'palaeography', 'paleolithic' => 'palaeolithic', 'paleontological' => 'palaeontological', 'paleontologist' => 'palaeontologist', 'paleontology' => 'palaeontology', 'paleozoic' => 'palaeozoic', 'pamplet' => 'pamphlet', 'paralell' => 'parallel', 'parl' => 'parliament', 'parlt' => 'parliament', 'pediatric' => 'paediatric', 'pediatrician' => 'paediatrician', 'pediatrics' => 'paediatrics', 'pedodontia' => 'paedodontia', 'pedodontics' => 'paedodontics', 'personel' => 'personnel', 'practise' => 'practice', 'program' => 'programme', 'psych' => 'psychology', 'questionaire' => 'questionnaire', 'rarify' => 'rarefy', 'reccomend' => 'recommend', 'recieve' => 'receive', 'resistence' => 'resistance', 'restaraunt' => 'restaurant', 'savior' => 'saviour', 'sep' => 'september', 'seperate' => 'separate', 'sept' => 'september', 'sieze' => 'seize', 'summarize' => 'summarise', 'summerize' => 'summarise', 'superceed' => 'supercede', 'superintendant' => 'superintendent', 'supersede' => 'supercede', 'suprise' => 'surprise', 'surprize' => 'surprise', 'synchronise' => 'synchronize', 'temperary' => 'temporary', 'theater' => 'theatre', 'threshhold' => 'threshold', 'transfered' => 'transferred', 'truely' => 'truly', 'truley' => 'truly', 'useable' => 'usable', 'valor' => 'valour', 'vigor' => 'vigour', 'vol' => 'volume', 'whack' => 'wack', 'withold' => 'withhold', 'yeild' => 'yield', );
1.226563
1
resources/views/frontend/master.blade.php
litonbairaggi/laravelsalon
0
715
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Favicon --> <link rel="shortcut icon" href="favicon.ico"> <!-- Bootstrap CSS --> <link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet"> <link href="{{ asset('assets/css/all.css') }}" rel="stylesheet"> <link href="{{ asset('assets/css/owl.carousel.css') }}" rel="stylesheet"> <!-- <link rel="stylesheet" href="css/switcher.css"> --> <link rel="stylesheet" href="{{ asset('assets/rs-plugin/css/settings.css') }}"> <!-- Jquery Fancybox CSS --> <link rel="stylesheet" href="{{ asset('assets/css/jquery.fancybox.min.css') }}" media="screen" /> <link href="{{ asset('assets/css/style.css') }}" rel="stylesheet" id="colors"> <title>Scissors Salon | HTML Template by Medialinkers</title> </head> <body> <!--Header Start--> <div class="custom-navbar wow fadeInDown" data-wow-duration="2s" role="navigation" id="header"> <div class="header-wrap"> <div class="container"> <div class="row"> <div class="col-lg-4 col-md-12 navbar-light"> <div class="atlanta_logo"><img alt="" class="logo-default" src="images/salon_logo.png"></div> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> </div> <div class="col-lg-8 col-md-12"> <div class="navigation-wrap" id="filters"> <nav class="navbar navbar-expand-lg navbar-light"> <a class="navbar-brand" href="#">Menu</a> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <button class="close-toggler" type="button" data-toggle="offcanvas"> <span><i class="fas fa-times-circle" aria-hidden="true"></i></span> </button> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" href="{{URL::to('/')}}">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/about')}}">About</a></li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/services')}}">Services</a> <i class="fas fa-caret-down"></i> <ul class="submenu"> <li><a href="{{URL::to('/services')}}">Services</a></li> <li><a href="{{URL::to('/services_details')}}">Service Details</a></li> </ul> </li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/gallery')}}">Gallery</a> <i class="fas fa-caret-down"></i> <ul class="submenu"> <li><a href="{{URL::to('/gallery')}}">Gallery Style 01</a></li> <li><a href="{{URL::to('/gallery_02')}}">Gallery Style 02</a></li> <li><a href="{{URL::to('/gallery_03')}}">Gallery Style 03</a></li> </ul> </li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/blog')}}">Blog</a> <i class="fas fa-caret-down"></i> <ul class="submenu"> <li><a href="{{URL::to('/blog')}}">Blog</a></li> <li><a href="{{URL::to('/blog_grid')}}">Blog Grid</a></li> <li><a href="{{URL::to('/blog_list')}}">Blog List</a></li> <li><a href="{{URL::to('/blog_details')}}">Blog Details</a></li> </ul> </li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/testimonials')}}">Testimonials</a></li> <li class="nav-item"><a class="nav-link" href="{{URL::to('/contact')}}">Contact</a></li> </ul> </div> </nav> </div> </div> </div> </div> </div> </div> <!--Header End--> @yield('content') <!-- Footer Start --> <div class="footer-wrap"> <div class="container"> <div class="row"> <div class="col-lg-3"> <div class="footer_logo"><img alt="" class="footer-default" src="images/salon_logo.png"></div> <p>Lorem ipsum dolor sit amet, adipiscing elit. Sed tempor, urna eu scelerisque maximus, urna nibh semper lectus, ut interdum nunc ligula et magna. In ac mauris vehicula, vulputate sem at, placerat nisl. Etiam laoreet erat magna, at hendrerit lorem vulputate non. Nam facilisis congue convallis.</p> </div> <div class="col-lg-2 col-md-3"> <h3>Quick links</h3> <ul class="footer-links"> <li> <a href="{{URL::to('/')}}">Home</a></li> <li> <a href="{{URL::to('/about')}}">About</a></li> <li> <a href="{{URL::to('/services')}}">Services</a></li> <li> <a href="{{URL::to('/gallery')}}">Gallery</a></li> <li> <a href="{{URL::to('/blog')}}">Blog</a></li> <li> <a href="{{URL::to('/testimonials')}}">Testimonials</a></li> <li> <a href="{{URL::to('/contact')}}">Contact Us</a></li> </ul> </div> <div class="col-lg-3 col-md-4"> <h3>Opening Hours</h3> <ul class="unorderList hourswrp"> <li>Monday <span>08:00 - 17:00</span></li> <li>Tuesday <span>08:00 - 17:00</span></li> <li>Wednesday <span>08:00 - 17:00</span></li> <li>Thursday <span>08:00 - 17:00</span></li> <li>Friday <span>08:00 - 17:00</span></li> <li>Saturday <span>08:00 - 17:00</span></li> <li>Sunday <span>Closed</span></li> </ul> </div> <div class="col-lg-3 col-md-4 offset-1"> <div class="footer_info"> <h3>Get in Touch</h3> <ul class="footer-adress"> <li class="footer_address"> <i class="fas fa-map-signs"></i> <span>{{$settingProfile->address}}</span> </li> <li class="footer_email"> <i class="fas fa-envelope" aria-hidden="true"></i> <span><a href="mailto:{{$settingProfile->email}}"> {{$settingProfile->email}} </a></span> </li> <li class="footer_phone"> <i class="fas fa-phone-alt"></i> <span><a href="tel:7704282433">{{$settingProfile->phone}}</a></span> </li> </ul> <div class="social-icons footer_icon"> <ul> <li><a href="https://www.facebook.com/"><i class="fab fa-facebook-f" aria-hidden="true"></i></a></li> <li><a href="https://www.linkedin.com/"><i class="fab fa-linkedin" aria-hidden="true"></i></a></li> <li><a href="https://twitter.com/"><i class="fab fa-twitter" aria-hidden="true"></i></a></li> <li><a href="https://www.instagram.com/"><i class="fab fa-instagram" aria-hidden="true"></i></a></li> <li><a href="https://www.youtube.com/"><i class="fab fa-youtube" aria-hidden="true"></i></a></li> </ul> </div> </div> </div> </div> </div> </div> <!-- Footer End --> <div class="copyright-wrap"> <div class="container"> <div class="row"> <div class="col-lg-6"> <div class="copyright">Copyright © 2020 Scissors Salon. All Rights Reserved.</div> </div> <div class="col-lg-6"> <div class="credits">Site Credits: <a href="https://www.medialinkers.com/" target="_blank" rel="nofollow">MediaLinkers</a></div> </div> </div> </div> </div> <!-- Js --> <script src="{{ asset('assets/js/jquery.min.js')}}"></script> <script src="{{ asset('assets/js/bootstrap.min.js')}}"></script> <script src="{{ asset('assets/js/popper.min.js')}}"></script> <script type="text/javascript" src="{{ asset('assets/rs-plugin/js/jquery.themepunch.tools.min.js')}}"></script> <script type="text/javascript" src="{{ asset('assets/rs-plugin/js/jquery.themepunch.revolution.min.js')}}"></script> <!-- Jquery Fancybox --> <script src="{{ asset('assets/js/jquery.fancybox.min.js')}}"></script> <!-- general script file --> <script src="{{ asset('assets/js/owl.carousel.js')}}"></script> <script src="{{ asset('assets/js/script.js')}}"></script> </body> </html>
0.660156
1
resources/views/admin/modals.blade.php
luizasenna/Liber
0
723
@extends('admin/layouts/default') {{-- Page title --}} @section('title') Modals @parent @stop {{-- page level styles --}} @section('header_styles') <link href="{{ asset('css/pages/advmodals.css') }}" rel="stylesheet"/> @stop {{-- Page content --}} @section('content') <section class="content-header advanced_modals"> <h1>Advanced Modals</h1> <ol class="breadcrumb"> <li> <a href="{{ route('admin.dashboard') }}"> <i class="livicon" data-name="home" data-size="14" data-color="#000"></i> Dashboard </a> </li> <li> <a href="#">UI features</a> </li> <li class="active">Advanced Modals</li> </ol> </section> <!-- Main content --> <section class="content pr-3 pl-3"> <div class="row"> <div class="col-md-12 col-lg-12 col-sm-12 col-12 my-3"> <div class="card "> <div class="card-header bg-primary text-white"> <span> <i class="livicon" data-name="rocket" data-loop="true" data-color="#fff" data-hovercolor="white" data-size="16"></i> Modals </span> <span class="float-right "> <i class="fa fa-chevron-up clickable"></i> </span> </div> <div class="card-body"> <div class="row"> <div class="col-md-3 "> <!-- Button trigger modal --> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> Launch Demo Modal </button> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h4 class="modal-title" id="exampleModalLabel">Modal title</h4> <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> Here is the basic modal </div> <div class="modal-footer"> <button type="button" class="btn btn-light" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> </div> <div class="col-md-3 "> <!-- Button trigger modal --> <button type="button" class="btn btn-info" data-toggle="modal" data-target="#exampleModalCenter"> Vertically Centered Modal </button> <!-- Modal --> <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="exampleModalCenterTitle">Modal title</h4> <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> Modal comes in center. </div> <div class="modal-footer"> <button type="button" class="btn btn-light" data-dismiss="modal">Close</button> <button type="button" class="btn btn-info">Save changes</button> </div> </div> </div> </div> </div> <div class="col-3"> <button type="button" class="btn btn-warning" data-toggle="modal" data-target="#exampleModal1" data-whatever="@mdo">Form in Modal</button> <div class="modal fade" id="exampleModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="exampleModalLabel">New message</h4> <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <form> <div class="form-group"> <label for="recipient-name" class="col-form-label">Recipient:</label> <input type="text" class="form-control" id="recipient-name"> </div> <div class="form-group"> <label for="message-text" class="col-form-label">Message:</label> <textarea class="form-control" id="message-text"></textarea> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-light" data-dismiss="modal">Close</button> <button type="button" class="btn btn-warning">Send message</button> </div> </div> </div> </div> </div> <div class="col-3"> <!-- Button trigger modal --> <button type="button" class="btn btn-success" data-toggle="modal" data-target="#exampleModalScrollable"> Modal with Scrollbar </button> <!-- Modal --> <div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-scrollable" role="document"> <div class="modal-content"> <div class="modal-header bg-success text-white"> <h4 class="modal-title" id="exampleModalScrollableTitle">Modal title</h4> <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. </div> <div class="modal-footer"> <button type="button" class="btn btn-light" data-dismiss="modal">Close</button> <button type="button" class="btn btn-success">Save changes</button> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-lg-12 col-sm-12 col-12 my-3"> <div class="card "> <div class="card-header bg-primary text-white"> <span> <i class="livicon" data-name="rocket" data-loop="true" data-color="#fff" data-hovercolor="white" data-size="16"></i> Advanced Modals </span> <span class="float-right "> <i class="fa fa-chevron-up clickable"></i> </span> </div> <div class="card-body"> <div class="row"> <div class="col-md-3 "> <h3> <strong>Fade and Slide</strong> effects </h3> <p>Simple modal with title and footer</p> <br> <button class="btn btn-raised btn-primary " data-toggle="modal" data-target="#modal-1"> Fade in &amp; Scale </button> <br> <button class="btn btn-raised btn-primary " data-toggle="modal" data-target="#modal-2"> Slide in (right) </button> <button class="btn btn-raised btn-primary " data-toggle="modal" data-target="#modal-3"> Slide in (bottom) </button> </div> <div class="col-md-3"> <h3> <strong>Flip and Rotate</strong> effects </h3> <p> You can customize the size of your modal. Just add the class <code>modal-lg</code> . </p> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-8">3D Expand Open </button> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-9">3D Big Entrance </button> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-10">3D Expand Up </button> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-14">3D Bounce </button> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-15">3D Pulse </button> <button class="btn btn-raised btn-info " data-toggle="modal" data-target="#modal-13">3D Tossing </button> </div> <div class="col-md-3"> <h3> <strong>Other</strong> effects </h3> <p> For fullwidth modal, add the class <code>modal-full</code> . </p> <br> <button class="btn btn-raised btn-warning " data-toggle="modal" data-target="#modal-4"> Pulldown </button> <button class="btn btn-raised btn-warning " data-toggle="modal" data-target="#modal-5"> Floating </button> <button class="btn btn-raised btn-warning " data-toggle="modal" data-target="#modal-6"> Stretch Left </button> <button class="btn btn-raised btn-warning " data-toggle="modal" data-target="#modal-7"> Pull Up </button> <button class="btn btn-raised btn-warning " data-toggle="modal" data-target="#modal-11"> Stretch Right </button> </div> <div class="col-md-3"> <h3> <strong>Color</strong> variation </h3> <p> Like in a normal page, you can add class to make your modal responsive, <code>col-md-4</code> for example. </p> <button class="btn btn-raised btn-primary md-trigger" data-toggle="modal" data-target="#modal-16">Primary </button> <button class="btn btn-raised btn-info md-trigger" data-toggle="modal" data-target="#modal-17">Info </button> <button class="btn btn-raised btn-success md-trigger" data-toggle="modal" data-target="#modal-18">Success </button> <button class="btn btn-raised btn-danger md-trigger" data-toggle="modal" data-target="#modal-21">Danger </button> <button class="btn btn-raised btn-light md-trigger" data-toggle="modal" data-target="#modal-19">Default </button> <button class="btn btn-raised btn-warning md-trigger" data-toggle="modal" data-target="#modal-20">Warning </button> </div> </div> </div> </div> </div> </div> <!--moddal dialog --> <div class="modal fade modal-fadeIn" id="modal-1" role="dialog" aria-labelledby="modalLabelfade" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h4 class="modal-title" id="modalLabelfade">Fade in &amp; Scale</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade slideRight" id="modal-2" role="dialog" aria-labelledby="modalLabelslide"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h4 class="modal-title" id="modalLabelslide">Slide in (right)</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade slideDown" id="modal-3" role="dialog" aria-labelledby="modalLabelslidebottom"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h4 class="modal-title" id="modalLabelslidebottom">Slide in (bottom)</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade pullDown" id="modal-4" role="dialog" aria-labelledby="modalLabelnews"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelnews">Pulldown</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade floating" id="modal-5" role="dialog" aria-labelledby="modalLabelfall"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelfall">Floating</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade stretchLeft" id="modal-6" role="dialog" aria-labelledby="modalLabelsidefall1"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelsidefall1">Stretch Left</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade pullUp" id="modal-7" role="dialog" aria-labelledby="modalLabelsticky"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelsticky">Pull Up</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade expandOpen" id="modal-8" role="dialog" aria-labelledby="my3dlabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="my3dlabel">3D Expand Open</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button type="button" class="btn btn-info" data-dismiss="modal">Close Me!</button> </div> </div> </div> </div> <div class="modal fade bigEntrance" id="modal-9" role="dialog" aria-labelledby="Modallabel3dflip"> <div class="modal-dialog" role="document"> <div class="modal-content "> <div class="modal-header bg-info text-white "> <h4 class="modal-title" id="Modallabel3dflip">3D Big Entrance </h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button type="button" class="btn btn-info" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade slideExpandUp" id="modal-10" role="dialog" aria-labelledby="Modallabel3dsign"> <div class="modal-dialog" role="document"> <div class="modal-content "> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="Modallabel3dsign">3D Expand Up</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-info" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade stretchRight" id="modal-11" role="dialog" aria-labelledby="modalLabelsidefall2"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelsidefall2">Stretch Right</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <!--<div class="md-modal md-effect-12" id="modal-12">--> <!--<div class="md-content">--> <!--<h3>Modal Dialog</h3>--> <!--<div class="modal-red">--> <!--<p>--> <!--This is a modal window. You can do the following things with it:--> <!--</p>--> <!--<ul>--> <!--<li>--> <!--<strong>Read:</strong> modal windows will probably tell you something important so don't--> <!--forget to read what they say.--> <!--</li>--> <!--<li>--> <!--<strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it--> <!--and appreciate its presence.--> <!--</li>--> <!--<li>--> <!--<strong>Close:</strong> click on the button below to close the modal.--> <!--</li>--> <!--</ul>--> <!--<button class="btn btn-modal btn-light md-close">Close me!</button>--> <!--</div>--> <!--</div>--> <!--</div>--> <div class="modal fade tossing" id="modal-13" role="dialog" aria-labelledby="Modallabel3dslit"> <div class="modal-dialog" role="document"> <div class="modal-content "> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="Modallabel3dslit">3D tossing</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-info" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade bounce" id="modal-14" role="dialog" aria-labelledby="Modallabel3drotate"> <div class="modal-dialog" role="document"> <div class="modal-content "> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="Modallabel3drotate">3D Bounce</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-info" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade pulse" id="modal-15" role="dialog" aria-labelledby="Modallabel3drotateinleft"> <div class="modal-dialog" role="document"> <div class="modal-content "> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="Modallabel3drotateinleft">3D Pulse</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-info " data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-16" role="dialog" aria-labelledby="modalLabelprimary"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h4 class="modal-title" id="modalLabelprimary">Primary Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-17" role="dialog" aria-labelledby="modalLabelinfo"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-info text-white"> <h4 class="modal-title" id="modalLabelinfo">Info Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-info" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-18" role="dialog" aria-labelledby="modalLabelsuccess"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-success text-white"> <h4 class="modal-title" id="modalLabelsuccess">Success Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-success" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-19" role="dialog" aria-labelledby="modalLabeldefault"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-secondary text-white"> <h4 class="modal-title" id="modalLabeldefault">Default Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-light" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-20" role="dialog" aria-labelledby="modalLabelwarn"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-warning text-white"> <h4 class="modal-title" id="modalLabelwarn">Warning Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-warning" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <div class="modal fade" id="modal-21" role="dialog" aria-labelledby="modalLabeldanger"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header bg-danger text-white"> <h4 class="modal-title" id="modalLabeldanger">Danger Modal</h4> </div> <div class="modal-body"> <p> This is a modal window. You can do the following things with it: </p> <ul> <li> <strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say. </li> <li> <strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence. </li> <li> <strong>Close:</strong> click on the button below to close the modal. </li> </ul> </div> <div class="modal-footer"> <button class="btn btn-danger" data-dismiss="modal">Close me!</button> </div> </div> </div> </div> <!--- end modals--> <div class="row"> <div class="col-md-12 col-lg-12 col-sm-12 col-12 my-3"> <div class="card "> <div class="card-header bg-success text-white"> <span> <i class="livicon" data-name="bell" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i> Extended Modals </span> <span class="float-right "> <i class="fa fa-chevron-up clickable"></i> </span> </div> <div class="card-body"> <!-- BEGIN modal--> <table class="table table-hover table-striped table-bordered table-responsive-lg table-responsive-md table-responsive-sm"> <tbody> <tr> <td>Responsive</td> <td> <a class="btn btn-raised btn-success btn-large" data-toggle="modal" data-href="#responsive" href="#responsive">View Demo</a> </td> </tr> <tr> <td>Stackable</td> <td> <a class="btn btn-raised btn-primary btn-large" data-toggle="modal" data-href="#stack1" href="#stack1">View Demo</a> </td> </tr> <tr> <td>Ajax</td> <td> <a class="btn btn-raised btn-warning btn-large" data-toggle="modal" data-href="#ajax-modal" href="#ajax-modal">View Demo</a> </td> </tr> <tr> <td>Static Background with Animation</td> <td> <a class="btn btn-raised btn-danger btn-large" data-toggle="modal" data-href="#static" href="#static">View Demo</a> </td> </tr> <tr> <td>Full Width</td> <td> <a class="btn btn-raised btn-info btn-large" data-toggle="modal" data-href="#full-width" href="#full-width">View Demo</a> </td> </tr> <tr> <td>Long Modals</td> <td> <a class="btn btn-raised btn-light btn-large" data-toggle="modal" data-href="#long" href="#long">View Demo</a> </td> </tr> </tbody> </table> </div> </div> </div> </div> <!--- responsive model --> <div class="extended_modals"> <div class="modal fade in" id="responsive" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title mr-auto">Responsive</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <div class="row"> <div class="col-md-6"> <h4>Some More data</h4> <p> <input id="name" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name1" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name2" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name3" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name4" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name5" name="name" type="text" placeholder="Your name" class="form-control"> </p> </div> <div class="col-md-6"> <h4>Some More data</h4> <p> <input id="name6" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name7" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name8" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name9" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name10" name="name" type="text" placeholder="Your name" class="form-control"> </p> <p> <input id="name41" name="name" type="text" placeholder="Your name" class="form-control"> </p> </div> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> <!-- END modal--> <!--- stack1 model --> <div class="modal fade bs-example-modal-sm in" id="stack1" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Stack One</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>One fine body…</p> <p>One fine body…</p> <p>One fine body…</p> <div class="form-group label-floating"> <label class="control-label">Name: </label> <input id="name21" name="name" type="text" class="form-control"> </div> <div class="form-group label-floating"> <label class="control-label">Password:</label> <input id="name22" name="name" type="text" class="form-control"> </div> <a class="btn btn-success" data-toggle="modal" href="#stack2">Launch modal</a> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Ok</button> </div> </div> </div> </div> <!-- stack2 modal--> <div class="modal fade bs-example-modal-md in" id="stack2" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Stack two</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>One fine body…</p> <p>One fine body…</p> <div class="form-group label-floating"> <label class="control-label">Name:</label> <input id="name11" name="name" type="text" class="form-control"> </div> <div class="form-group label-floating"> <label class="control-label">Password:</label> <input id="name12" name="name" type="text" class="form-control"> </div> <a class="btn btn-success" data-toggle="modal" href="#stack3">Launch modal</a> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Ok</button> </div> </div> </div> </div> <!-- END modal--> <!-- stack3 modal--> <div class="modal fade in" id="stack3" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Stack3</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>One fine body…</p> <div class="form-group label-floating"> <label class="control-label">Name:</label> <input id="name13" name="name" type="text" class="form-control"> </div> <div class="form-group label-floating"> <label class="control-label">Password:</label> <input id="name14" name="name" type="text" class="form-control"> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Ok</button> </div> </div> </div> </div> <!-- ajax-modal modal--> <div class="modal fade in" id="ajax-modal" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">ajax-modal</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <ul class="nav nav-tabs"> <li class="nav-item"> <a href="#tab1" data-toggle="tab" class="nav-link active">Tab 1</a> </li> <li class="nav-item"> <a href="#tab2" data-toggle="tab" class="nav-link">Tab 2</a> </li> </ul> <div class="tab-content"> <div class="tab-pane fade show active" id="tab1"> <p>This modal was loaded in via ajax</p> </div> <div class="tab-pane fade" id="tab2"> <p>This is some other tab content</p> </div> </div> <button class="btn btn-success update">Update</button> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Ok</button> </div> </div> </div> </div> <!-- static modal--> <div class="modal fade in" id="static" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="modal-body"> <p>Would you like to continue with some arbitrary task?</p> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Cancel</button> <button type="button" data-dismiss="modal" class="btn btn-primary">Continue Task</button> </div> </div> </div> </div> <!-- END modal--> <!-- fullwidth modal--> <div class="modal fade in" id="full-width" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Full Width</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p> This modal will resize itself to the same dimensions as the container class. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sollicitudin ipsum ac ante fermentum suscipit. In ac augue non purus accumsan lobortis id sed nibh. Nunc egestas hendrerit ipsum, et porttitor augue volutpat non. Aliquam erat volutpat. Vestibulum scelerisque lobortis pulvinar. Aenean hendrerit risus neque, eget tincidunt leo. Vestibulum est tortor, commodo nec cursus nec, vestibulum vel nibh. Morbi elit magna, ornare placerat euismod semper, dignissim vel odio. Phasellus elementum quam eu ipsum euismod pretium. </p> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> <!-- END modal--> <!-- long modal--> <div class="modal fade in" id="long" tabindex="-1" role="dialog" aria-hidden="false"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">A Fairly Long Modal</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body modal_long"> {{--<a class="btn btn-light " data-toggle="modal" href="#notlong">Not So Long Modal</a>--}} <img alt="image" src="http://i.imgur.com/KwPYo.jpg"> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-light">Close</button> </div> </div> </div> </div> </div> </section> <!-- content --> @stop {{-- page level scripts --}} @section('footer_scripts') <script> $("#stack2,#stack3").on('hidden.bs.modal', function (e) { $('body').addClass('modal-open'); }); </script> @stop
0.988281
1
framework/surced/protected/views/tblMovement.php
mikifull/fastopen1
0
731
<?php /* @var $this TblMovementController */ /* @var $model TblMovement */ /* @var $form CActiveForm */ ?> <div class="form"> <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'tbl-movement-tblMovement-form', // Please note: When you enable ajax validation, make sure the corresponding // controller action is handling ajax validation correctly. // See class documentation of CActiveForm for details on this, // you need to use the performAjaxValidation()-method described there. 'enableAjaxValidation'=>false, )); ?> <p class="note">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model,'product_id'); ?> <?php echo $form->textField($model,'product_id'); ?> <?php echo $form->error($model,'product_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'movement'); ?> <?php echo $form->textField($model,'movement'); ?> <?php echo $form->error($model,'movement'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton('Submit'); ?> </div> <?php $this->endWidget(); ?> </div><!-- form -->
1.117188
1
app/cache/dev/twig/c4/c40a976ce39f929b55735d2fb849378c668271325f8aa59fe10fbc55aa8fedff.php
romerogustavob/BecasMds
0
739
<?php /* PersonaBundle:MovimientoSocial:edit.html.twig */ class __TwigTemplate_247fb86f238fb7a01f058155265038045869e564bc1c905341e98ac6cf3a710f extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 $this->parent = $this->loadTemplate("JordiLlonchCrudGeneratorBundle::layout.html.twig", "PersonaBundle:MovimientoSocial:edit.html.twig", 1); $this->blocks = array( 'title' => array($this, 'block_title'), 'page' => array($this, 'block_page'), ); } protected function doGetParent(array $context) { return "JordiLlonchCrudGeneratorBundle::layout.html.twig"; } protected function doDisplay(array $context, array $blocks = array()) { $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_title($context, array $blocks = array()) { // line 4 $this->displayParentBlock("title", $context, $blocks); echo " - "; echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.edit.edit", array("%entity%" => "MovimientoSocial"), "JordiLlonchCrudGeneratorBundle"), "html", null, true); echo " "; } // line 7 public function block_page($context, array $blocks = array()) { // line 8 echo " <h2 style=\"color: #0044cc\">"; // line 9 echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.edit.edit", array("%entity%" => "MovimientoSocial"), "JordiLlonchCrudGeneratorBundle"), "html", null, true); echo "</h2> <form class=\"well\" action=\""; // line 11 echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("movimientosocial_update", array("id" => $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "id", array()))), "html", null, true); echo "\" method=\"post\" "; echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["edit_form"]) ? $context["edit_form"] : null), 'enctype'); echo "> <input type=\"hidden\" name=\"_method\" value=\"PUT\" /> "; // line 13 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["edit_form"]) ? $context["edit_form"] : null), 'widget'); echo " <p> <button type=\"submit\" class=\"btn btn-success\">"; // line 15 echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.edit.editbutton", array(), "JordiLlonchCrudGeneratorBundle"), "html", null, true); echo "</button> </p> </form> <div> <div class=\"float-left\"> <a class=\"btn\" href=\""; // line 21 echo $this->env->getExtension('routing')->getPath("movimientosocial"); echo "\"> "; // line 22 echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.recordactions.backtothelist", array(), "JordiLlonchCrudGeneratorBundle"), "html", null, true); echo " </a> </div> <div class=\"float-left\"> <form action=\""; // line 26 echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("movimientosocial_delete", array("id" => $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "id", array()))), "html", null, true); echo "\" method=\"post\"> <input type=\"hidden\" name=\"_method\" value=\"DELETE\" /> "; // line 28 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["delete_form"]) ? $context["delete_form"] : null), 'widget'); echo " <button class=\"btn btn-danger\" type=\"submit\" onclick=\"return confirm('"; // line 29 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.recordactions.confirm", array(), "JordiLlonchCrudGeneratorBundle"), "js"), "html", null, true); echo "');\">"; echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("views.recordactions.delete", array(), "JordiLlonchCrudGeneratorBundle"), "html", null, true); echo "</button> </form> </div> </div> "; } public function getTemplateName() { return "PersonaBundle:MovimientoSocial:edit.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 92 => 29, 88 => 28, 83 => 26, 76 => 22, 72 => 21, 63 => 15, 58 => 13, 51 => 11, 46 => 9, 43 => 8, 40 => 7, 32 => 4, 29 => 3, 11 => 1,); } } /* {% extends 'JordiLlonchCrudGeneratorBundle::layout.html.twig' %}*/ /* */ /* {% block title %}*/ /* {{ parent() }} - {{ 'views.edit.edit'|trans({'%entity%': 'MovimientoSocial'}, 'JordiLlonchCrudGeneratorBundle') }}*/ /* {% endblock %}*/ /* */ /* {% block page %}*/ /* */ /* <h2 style="color: #0044cc">{{ 'views.edit.edit'|trans({'%entity%': 'MovimientoSocial'}, 'JordiLlonchCrudGeneratorBundle') }}</h2>*/ /* */ /* <form class="well" action="{{ path('movimientosocial_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>*/ /* <input type="hidden" name="_method" value="PUT" />*/ /* {{ form_widget(edit_form) }}*/ /* <p>*/ /* <button type="submit" class="btn btn-success">{{ 'views.edit.editbutton'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</button>*/ /* </p>*/ /* </form>*/ /* */ /* <div>*/ /* <div class="float-left">*/ /* <a class="btn" href="{{ path('movimientosocial') }}">*/ /* {{ 'views.recordactions.backtothelist'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}*/ /* </a>*/ /* </div>*/ /* <div class="float-left">*/ /* <form action="{{ path('movimientosocial_delete', { 'id': entity.id }) }}" method="post">*/ /* <input type="hidden" name="_method" value="DELETE" />*/ /* {{ form_widget(delete_form) }}*/ /* <button class="btn btn-danger" type="submit" onclick="return confirm('{{ 'views.recordactions.confirm'|trans({}, 'JordiLlonchCrudGeneratorBundle')|escape('js') }}');">{{ 'views.recordactions.delete'|trans({}, 'JordiLlonchCrudGeneratorBundle') }}</button>*/ /* </form>*/ /* </div>*/ /* </div>*/ /* {% endblock %}*/
1.179688
1
webroot/cflash_anax.php
jonahe/cflash
0
747
<?php /** * Config file for pagecontrollers, creating an instance of $app. * */ // Get environment & autoloader. require __DIR__.'/config.php'; // Create services and inject into the app. the session is created by default // dependency injector factory $di = new \Anax\DI\CDIFactoryDefault; // create application $app = new \Anax\MVC\CApplicationBasic($di); // setup service for flashMessages $di->set('flashMessages', function() use ($di) { $flashMessages = new Anax\Flash\CFlashAnax(); $flashMessages->setDI($di); return $flashMessages; }); $app->theme->setTitle("Flash"); // set the flash messages (and their types) you want to show later $app->flashMessages->setMessage("Test av success!", "success"); $app->flashMessages->setMessage("Test av notice!", "notice"); $app->flashMessages->setMessage("Test av error!", "error"); // they are automatically stored in session. //Make a full HTTP redirection to new page $app->response->redirect("flash_simple_redirect.php"); $app->theme->render();
1.4375
1
src/Service/AdGroups.php
isypov-andrey/yandex-direct-client
0
755
<?php /** * @author <NAME> <<EMAIL>> * @date 22/08/2016 16:05 */ namespace Yandex\Direct\Service; use Yandex\Direct\Exception\Exception; use Yandex\Direct\Service; /** * Class AdGroups * @package Yandex\Direct\Service */ final class AdGroups extends Service { /** * Создает группы объявлений. * * @param $AdGroups * @return array * @throws Exception * * @see https://tech.yandex.ru/direct/doc/ref-v5/adgroups/add-docpage/ */ public function add($AdGroups) { return $this->request([ 'method' => 'add', 'params' => [ 'AdGroups' => $AdGroups ] ]); } /** * Удаляет группы объявлений. * * @param $SelectionCriteria * @return array * @throws Exception * * @see https://tech.yandex.ru/direct/doc/ref-v5/adgroups/delete-docpage/ */ public function delete($SelectionCriteria) { return $this->request([ 'method' => 'delete', 'params' => [ 'SelectionCriteria' => $SelectionCriteria ] ]); } /** * Возвращает параметры групп, отвечающих заданным критериям. * * @param $SelectionCriteria * @param $FieldNames * @param $MobileAppAdGroupFieldNames * @param $DynamicTextAdGroupFieldNames * @param $DynamicTextFeedAdGroupFieldNames * @param $Page * @return array * @throws Exception * * @see https://tech.yandex.ru/direct/doc/ref-v5/adgroups/delete-docpage/ */ public function get( $SelectionCriteria, $FieldNames, $MobileAppAdGroupFieldNames = null, $DynamicTextAdGroupFieldNames = null, $DynamicTextFeedAdGroupFieldNames = null, $Page = null ) { $params = [ 'SelectionCriteria' => $SelectionCriteria, 'FieldNames' => $FieldNames ]; if ($MobileAppAdGroupFieldNames) { $params['MobileAppAdGroupFieldNames'] = $MobileAppAdGroupFieldNames; } if ($DynamicTextAdGroupFieldNames) { $params['DynamicTextAdGroupFieldNames'] = $DynamicTextAdGroupFieldNames; } if ($DynamicTextFeedAdGroupFieldNames) { $params['DynamicTextFeedAdGroupFieldNames'] = $DynamicTextFeedAdGroupFieldNames; } if ($Page) { $params['Page'] = $Page; } return $this->request([ 'method' => 'get', 'params' => $params ]); } /** * Изменяет параметры групп объявлений. * * @param $AdGroups * @return array * @throws Exception * * @see https://tech.yandex.ru/direct/doc/ref-v5/adgroups/update-docpage/ */ public function update($AdGroups) { return $this->request([ 'method' => 'update', 'params' => [ 'AdGroups' => $AdGroups ] ]); } }
1.320313
1
thunderlabid/Cashier/DAL/models/SLine.php
ardiankurniawan8/POS-API
0
763
<?php namespace Thunderlabid\Cashier\DAL\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class SLine extends Model { public $table = "s_line"; use SoftDeletes; protected $dates = ['deleted_at']; protected $fillable = ['ref_id','ref_tag','tag','kuantitas','harga_satuan','deskripsi','s_header_id']; }
0.691406
1
web/app/themes/omega/partials/shortcodes/services/services.php
jujudellago/yc2016
0
771
// consistent data for all service items $img_size = $image_shape === 'round' ? 'square-image' : $image_shape . '-image'; $overlay_classes = array( 'grid-overlay-' . $overlay_grid ); $figure_classes = array( 'box-' . $image_shape ); if( $image_size != 'none' ) : $figure_classes[] = 'box-' . $image_size; endif; if( $icon_effect != 'on' ) : $figure_classes[] = 'box-simple'; endif; $header_classes = array(); $header_classes[] = $title_size; $header_classes[] = $title_weight; $header_classes[] = $title_underline; $header_classes[] = $title_underline_size; if( $icon_effect != 'on' ) { $figure_classes[] = 'box-simple'; } $animation = $icon_animation; foreach( $services as $post ) : setup_postdata( $post ); // get item data $fa_icon = get_post_meta( $post->ID, THEME_SHORT . '_fa_icon', true ); $svg_icon = get_post_meta( $post->ID, THEME_SHORT . '_svg_icon', true ); $link_target = get_post_meta( $post->ID, THEME_SHORT . '_target', true ); // get link $link = oxy_get_slide_link( $post ); $image_src = ''; $featured_image_id = get_post_thumbnail_id( $post->ID ); if( !empty( $featured_image_id ) ) : $image = wp_get_attachment_image_src( $featured_image_id, $img_size ); if( isset( $image[0] ) ) : $image_src = $image[0]; endif; endif; // add item classes $classes = array(); $classes[] = 'text-' . $align; $classes[] = 'col-md-' . $columns; $classes[] = 'element-short-bottom'; include( locate_template( 'partials/shortcodes/services/service.php' ) ); endforeach; ?> </div>
1.234375
1
hphp/test/slow/dynamic_methods/1207.php
alexsn/hhvm
1
779
<?hh class A { function itest($a, $b) { var_dump($a, $b); } static function stest($a, $b) { var_dump($a, $b); } } <<__EntryPoint>> function main_1207() { $i = 'itest'; $s = 'stest'; $o = new A(); $ar = varray[0,1]; $st = 'abc'; $o->$i($ar[0], $st[0]); A::$s($ar[1], $st[1]); }
1.273438
1
app/controllers/ErrorController.php
MrKamis/mvc
1
787
<?php require_once 'controller.php'; class ErrorController extends Controller { public function index() { header('HTTP/1.0 404 Not Found'); $this->loadViewBasic('Error 404'); } } ?>
0.90625
1
src/Service/RoomService.php
AlexanderGabriel/open-event-manager
2
795
<?php /** * Created by PhpStorm. * User: andreas.holzmann * Date: 06.06.2020 * Time: 19:01 */ namespace App\Service; use App\Entity\Rooms; use App\Entity\RoomsUser; use App\Entity\Standort; use App\Entity\User; use Doctrine\ORM\EntityManagerInterface; use Firebase\JWT\JWT; use Psr\Log\LoggerInterface; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Contracts\Translation\TranslatorInterface; /** * Class RoomService * @package App\Service */ class RoomService { private $em; private $logger; private $translator; public function __construct(TranslatorInterface $translator, EntityManagerInterface $entityManager, FormFactoryInterface $formBuilder, LoggerInterface $logger) { $this->em = $entityManager; $this->logger = $logger; $this->translator = $translator; } /** * Creates the JWT Token to send to the Information of the User to the jitsi-Meet Server * @param Rooms $room * @param User $user * @param $t * @param $userName * @return string * @author <NAME> * @de */ function join(Rooms $room, User $user, $t, $userName) { $roomUser = $this->em->getRepository(RoomsUser::class)->findOneBy(array('user' => $user, 'room' => $room)); if(!$roomUser){ $roomUser = new RoomsUser(); } if ($t === 'a') { $type = 'jitsi-meet://'; } else { $type = 'https://'; } if ($room->getModerator() === $user || $roomUser->getModerator()) { $moderator = true; } else { $moderator = false; } $serverUrl = $room->getStandort()->getUrl(); $serverUrl = str_replace('https://', '', $serverUrl); $serverUrl = str_replace('http://', '', $serverUrl); $jitsi_server_url = $type . $serverUrl; $jitsi_jwt_token_secret = $room->getStandort()->getAppSecret(); $payload = array( "aud" => "jitsi_admin", "iss" => $room->getStandort()->getAppId(), "sub" => $room->getStandort()->getUrl(), "room" => $room->getUid(), "context" => [ 'user' => [ 'name' => $userName ], ], "moderator" => $moderator ); $screen = array( 'screen-sharing' => true, 'private-message' => true, ); if ($room->getStandort()->getFeatureEnableByJWT()) { if ($room->getDissallowScreenshareGlobal()) { $screen['screen-sharing'] = false; if (($roomUser && $roomUser->getShareDisplay()) || $user === $room->getModerator()) { $screen['screen-sharing'] = true; } } if ($room->getDissallowPrivateMessage()) { $screen['private-message'] = false; if ($roomUser && $roomUser->getPrivateMessage() || $user === $room->getModerator()) { $screen['private-message'] = true; } } $payload['context']['features'] = $screen; } $token = JWT::encode($payload, $jitsi_jwt_token_secret); if (!$room->getStandort()->getAppId() || !$room->getStandort()->getAppSecret()) { $url = $jitsi_server_url . '/' . $room->getUid(); } else { $url = $jitsi_server_url . '/' . $room->getUid() . '?jwt=' . $token; } return $url; } }
1.375
1