text
stringlengths
2
1.03M
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateBarangTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('barang', function (Blueprint $table) { $table->id(); $table->string('id_barang',10)->unique(); $table->string('barang',50); $table->string('id_kategori',10); $table->string('id_sup',10); $table->Integer('harga'); $table->Integer('diskon'); $table->Integer('stok'); $table->Integer('harga_diskon'); $table->string('deskripsi',100); $table->string('gambar',100); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('barang'); } }
<?php /** * Define your URI routes here. * * $route[Request Method][Uri] = array( Controller class, action method, other options, etc. ) * * RESTful api support, *=any request method, GET PUT POST DELETE * POST Create * GET Read * PUT Update, Create * DELETE Delete * * Use lowercase for Request Method * * If you have your controller file name different from its class name, eg. home.php HomeController * $route['*']['/'] = array('home', 'index', 'className'=>'HomeController'); * * If you need to reverse generate URL based on route ID with DooUrlBuilder in template view, please defined the id along with the routes * $route['*']['/'] = array('HomeController', 'index', 'id'=>'home'); * * If you need dynamic routes on root domain, such as http://facebook.com/username * Use the key 'root': $route['*']['root']['/:username'] = array('UserController', 'showProfile'); * * If you need to catch unlimited parameters at the end of the url, eg. http://localhost/paramA/paramB/param1/param2/param.../.../.. * Use the key 'catchall': $route['*']['catchall']['/:first'] = array('TestController', 'showAllParams'); * * If you have placed your controllers in a sub folder, eg. /protected/admin/EditStuffController.php * $route['*']['/'] = array('admin/EditStuffController', 'action'); * * If you want a module to be publicly accessed (without using Doo::app()->getModule() ) , use [module name] , eg. /protected/module/forum/PostController.php * $route['*']['/'] = array('[forum]PostController', 'action'); * * If you create subfolders in a module, eg. /protected/module/forum/post/ListController.php, the module here is forum, subfolder is post * $route['*']['/'] = array('[forum]post/PostController', 'action'); * * Aliasing give you an option to access the action method/controller through a different URL. This is useful when you need a different url than the controller class name. * For instance, you have a ClientController::new() . By default, you can access via http://localhost/client/new * * $route['autoroute_alias']['/customer'] = 'ClientController'; * $route['autoroute_alias']['/company/client'] = 'ClientController'; * * With the definition above, it allows user to access the same controller::method with the following URLs: * http://localhost/company/client/new * * To define alias for a Controller inside a module, you may use an array: * $route['autoroute_alias']['/customer'] = array('controller'=>'ClientController', 'module'=>'example'); * $route['autoroute_alias']['/company/client'] = array('controller'=>'ClientController', 'module'=>'example'); * * Auto routes can be accessed via URL pattern: http://domain.com/controller/method * If you have a camel case method listAllUser(), it can be accessed via http://domain.com/controller/listAllUser or http://domain.com/controller/list-all-user * In any case you want to control auto route to be accessed ONLY via dashed URL (list-all-user) * * $route['autoroute_force_dash'] = true; //setting this to false or not defining it will keep auto routes accessible with the 2 URLs. * */ // $route['autoroute_force_dash'] = true; $route['*']['/'] = array('MainController', 'index'); $route['*']['/error'] = array('ErrorController', 'index'); //$route['*']['/hello'] = array('MainController', 'hello'); //---------- Delete if not needed ------------ //$admin = array('admin'=>'1234'); //$route['*']['/about'] = $route['*']['/home'] = $route['*']['/']; //$route['*']['/easy'] = array('redirect', './simple.html'); //$route['*']['/easier'] = array('redirect', './simple.html', 301); //$route['*']['/doophp'] = array('redirect', 'http://doophp.com/'); // ////view the logs and profiles XML, filename = db.profile, log, trace.log, profile //$route['*']['/debug/:filename'] = array('MainController', 'debug', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!'); // ////show all urls in app //$route['*']['/allurl'] = array('MainController', 'allurl'); // ////generate routes file. This replace the current routes.conf.php. Use with the sitemap tool. //$route['post']['/gen_sitemap'] = array('MainController', 'gen_sitemap', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!'); // ////generate routes & controllers. Use with the sitemap tool. //$route['post']['/gen_sitemap_controller'] = array('MainController', 'gen_sitemap_controller', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!'); // ////generate Controllers automatically //$route['*']['/gen_site'] = array('MainController', 'gen_site', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!'); // ////generate Models automatically //$route['*']['/gen_model'] = array('MainController', 'gen_model', 'authName'=>'DooPHP Admin', 'auth'=>$admin, 'authFail'=>'Unauthorized!'); // $route['*']['catchall']['/:lang'] = array('MainController', 'catchAll'); //$route['*']['/'] = array('MainController', 'index'); //$route['*']['/url'] = array('MainController', 'url'); //$route['*']['/example'] = array('MainController', 'example'); // //$route['*']['/simple'] = array('SimpleController', 'simple'); //$route['*']['/simple.html'] = array('SimpleController', 'simpleHtml'); //$route['*']['/simple.rss'] = array('SimpleController', 'simple'); //$route['*']['/simple.json'] = array('SimpleController', 'simple'); //$route['*']['/simple/:pagename'] = array('SimpleController', 'simple2', 'extension'=>array('.json','.rss')); //$route['*']['/simple/only_xml/:pagename'] = array('SimpleController', 'simple', 'extension'=>'.xml'); // //$route['*']['/api/food/list/:id'] = array('RestController', 'listFood','extension'=>array('.json','.xml')); //$route['post']['/api/food/create'] = array('RestController', 'createFood'); //post only //$route['put']['/api/food/update'] = array('RestController', 'updateFood'); //put only //$route['delete']['/api/food/delete/:id'] = array('RestController', 'deleteFood'); //delete only //parameters matching example //$route['*']['/news/:year/:month'] = array('NewsController', 'show_news_by_year_month', // 'match'=>array( // 'year'=>'/^\d{4}$/', // 'month'=>'/^\d{2}$/' // ) // ); // ////almost identical routes examples, must assigned a matching pattern to the parameters ////if no pattern is assigned, it will match the route defined first. //$route['*']['/news/:id'] = array('NewsController', 'show_news_by_id', // 'match'=>array('id'=>'/^\d+$/')); //$route['*']['/news/id/:id'] = $route['*']['/news/:id']; //here's how you do redirection to an existing route internally // //$route['*']['/news/:title'] = array('NewsController', 'show_news_by_title', // 'match'=>array('title'=>'/[a-z0-9]+/'));
<?php namespace budyaga\users; use Yii; class Module extends \yii\base\Module { public $controllerNamespace = 'budyaga\users\controllers'; public $userPhotoUrl = ''; public $userPhotoPath = ''; public $customViews = []; public $customMailViews = []; public function init() { parent::init(); self::registerTranslations(); } public static function registerTranslations() { if (!isset(Yii::$app->i18n->translations['users']) && !isset(Yii::$app->i18n->translations['users/*'])) { Yii::$app->i18n->translations['users'] = [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@budyaga/users/messages', 'forceTranslation' => true, 'fileMap' => [ 'users' => 'users.php' ] ]; } } public function getCustomView($default) { if (isset($this->customViews[$default])) { return $this->customViews[$default]; } else { return $default; } } public function getCustomMailView($default) { if (isset($this->customMailViews[$default])) { return $this->customMailViews[$default]; } else { return '@budyaga/users/mail/' . $default; } } }
<footer class="main-footer"> <div class="pull-right d-none d-sm-inline-block"> <ul class="nav nav-primary nav-dotted nav-dot-separated justify-content-center justify-content-md-end"> <li class="nav-item"> <a class="nav-link" href="javascript:void(0)">FAQ</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Easy Admin</a> </li> </ul> </div> &copy; 2020 <a href="#">Psd to Html Expert</a>. All Rights Reserved. </footer>
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class building_model extends CI_Model { public function __construct() { parent::__construct(); $this->load->database(); } public function getDataBuildings() { } public function getDataBuildingByID($bld_id) { } public function insertBuilding($data) { $test_user = $this->getUserWhere(array('username' => $data['user'])); if ($test_user) return 1; $test_user = $this->getUserWhere(array('email' => $data['email'])); if ($test_user) return 2; //validate user name and email // $salt = random_string('alnum', 128); $hashed_pass = $this->encrypt->sha1($data['pass'] . $salt); $_data = array( 'username' => $data['user'], 'password' => $hashed_pass, 'salt' => $salt, 'email' => $data['email'], ); try { $this->db->insert('members', $_data); if ($this->db->affected_rows() == 1) { return $this->getUserWhere(array('username' => $data['user'])); } else return 3; } catch (Exception $error) { return 3; } } public function updateAccount($data) { $test_user = $this->getUserWhere(array('id' => $data['uid'])); if (empty($test_user)) return 1; $session_data = (array)$this->_validate_access_token($data['access_token']); if ($session_data['uid'] != $test_user->uid) return 2; $test_user = $this->getUserWhere(array('name' => $data['user'])); if ($test_user && $test_user->uid != $session_data['uid']) return 3; $test_user = $this->getUserWhere(array('mail' => $data['email'])); if ($test_user && $test_user->uid != $session_data['uid']) return 4; //validate user name and email $salt = random_string('alnum', 5); $hashed_pass = $this->encrypt->sha1($data['pass'] . $salt); $_data = array( 'username' => $data['user'], 'password' => $hashed_pass, 'salt' => $salt, 'email' => $data['email'] ); $update_str = array(); foreach ($_data as $key => $new_value) { $update_str[] = $key . " = '" . $new_value . "'"; } $update_str = implode(", ", $update_str); try { $this->db->update('members', $_data, array('id' => $data['uid'])); if ($this->db->affected_rows() == 1) { return $this->getUserWhere(array('username' => $data['user'])); } else return 5; } catch (Exception $error) { return 5; } } function removeUser($uid) { $this->db->delete('members', array('id' => $uid)); $this->db->delete('sessions', array('uid' => $uid)); $this->db->delete('login_attempts', array('id' => $uid)); } }
<?php namespace Tests\Dummies; use Metamorphosis\TopicHandler\Producer\AbstractHandler; use Metamorphosis\TopicHandler\Producer\HandleableResponseInterface; use RdKafka\Message; class ProducerHandlerDummy extends AbstractHandler implements HandleableResponseInterface { public function __construct($record, string $topic, string $key = null, int $partition = null) { $this->record = $record; $this->topic = $topic; $this->key = $key; $this->partition = $partition; } public function success(Message $message): void { dump('success!'); } public function failed(Message $message): void { dump('failed!'); } }
<?php /** * This file is part of the DreamFactory Services Platform(tm) SDK For PHP * * DreamFactory Services Platform(tm) <http://github.com/dreamfactorysoftware/dsp-core> * Copyright 2012-2014 DreamFactory Software, Inc. <support@dreamfactory.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace DreamFactory\Platform\Enums; use DreamFactory\Platform\Utility\Fabric; use DreamFactory\Platform\Utility\Platform; use Kisma\Core\Enums\HttpMethod; use Kisma\Core\Enums\SeedEnum; use Kisma\Core\Utility\Inflector; use Kisma\Core\Utility\Option; /** * InstallationTypes * The different types of DSP installations */ class InstallationTypes extends SeedEnum { //************************************************************************* // Constants //************************************************************************* /** * @var string All packages have this doc root */ const DEFAULT_PACKAGE_DOCUMENT_ROOT = '/opt/dreamfactory/platform/var/www/launchpad'; /** * Package Types */ /** * @var int */ const FABRIC_HOSTED = 0; /** * @var int */ const STANDALONE_PACKAGE = 1; /** * @var int */ const BITNAMI_PACKAGE = 2; /** * @var int */ const DEB_PACKAGE = 3; /** * @var int */ const RPM_PACKAGE = 4; /** * @var int */ const PAAS_DEPLOYMENT = 1000; /** * @var int */ const BLUEMIX_PACKAGE = 1001; /** * @var int */ const PIVOTAL_PACKAGE = 1002; /** * Package Markers */ /** * @var string */ const BLUEMIX_PACKAGE_MARKER = '.bluemix'; /** * @var string */ const PIVOTAL_PACKAGE_MARKER = '.pivotal'; /** * @var string */ const BITNAMI_PACKAGE_MARKER = '/apps/dreamfactory/htdocs/web'; /** * @var string */ const DEB_PACKAGE_MARKER = '/opt/dreamfactory/platform/etc/apache2'; /** * @var string */ const RPM_PACKAGE_MARKER = '/opt/dreamfactory/platform/etc/httpd'; /** * @var string */ const PAAS_MARKER = '/.paas'; //************************************************************************* // Methods //************************************************************************* /** * Returns the array of restricted verbs for the install type given. * * @param int $installType * * @return array array of verbs that are restricted. If there are no restrictions, an empty array is returned. */ public static function getRestrictedVerbs( $installType = null ) { static $_restrictedVerbs = array( self::BLUEMIX_PACKAGE => array( HttpMethod::PATCH, HttpMethod::MERGE, ), ); return Option::get( $_restrictedVerbs, $installType, array() ); } /** * Determine the type of installation this is * * @param bool $prettyPrint Return the pretty name instead of the id * @param string $prettyName Will contain the pretty name upon return * * @return int|string */ public static function determineType( $prettyPrint = false, &$prettyName = null ) { static $_markers = array( // Search occurs in this order if not fabric-hosted self::BITNAMI_PACKAGE => self::BITNAMI_PACKAGE_MARKER, self::DEB_PACKAGE => self::DEB_PACKAGE_MARKER, self::RPM_PACKAGE => self::RPM_PACKAGE_MARKER, self::PIVOTAL_PACKAGE => self::PIVOTAL_PACKAGE_MARKER, self::BLUEMIX_PACKAGE => self::BLUEMIX_PACKAGE_MARKER, ); $_docRoot = Option::server( 'DOCUMENT_ROOT' ); $_type = static::FABRIC_HOSTED; $_cachedType = Platform::storeGet( INSTALL_TYPE_KEY ); // Hosted? if ( !Fabric::fabricHosted() ) { // Default to stand-alone $_type = static::STANDALONE_PACKAGE; foreach ( $_markers as $_id => $_marker ) { if ( '.' === $_marker[0] && null !== $_cachedType ) { $_type = $_cachedType; break; } if ( '.' !== $_marker[0] && false !== stripos( $_docRoot, $_marker ) ) { $_type = $_id; break; } } } $prettyName = Inflector::display( strtolower( static::nameOf( $_type ) ) ); // Kajigger the name return $prettyPrint ? $prettyName : $_type; } }
<?php /* Cachekey: cache/stash_default/doctrine/[concrete\core\entity\attribute\key\settings\topicssettings$aktopictreeid@[annot]][1]/ */ /* Type: array */ /* Expiration: 2021-10-09T03:43:03-05:00 */ $loaded = true; $expiration = 1633768983; $data = array(); /* Child Type: array */ $data['return'] = unserialize(base64_decode('YToxOntpOjA7TzoyNzoiRG9jdHJpbmVcT1JNXE1hcHBpbmdcQ29sdW1uIjo5OntzOjQ6Im5hbWUiO047czo0OiJ0eXBlIjtzOjc6ImludGVnZXIiO3M6NjoibGVuZ3RoIjtOO3M6OToicHJlY2lzaW9uIjtpOjA7czo1OiJzY2FsZSI7aTowO3M6NjoidW5pcXVlIjtiOjA7czo4OiJudWxsYWJsZSI7YjowO3M6Nzoib3B0aW9ucyI7YTowOnt9czoxNjoiY29sdW1uRGVmaW5pdGlvbiI7Tjt9fQ==')); /* Child Type: integer */ $data['createdOn'] = 1633352743;
<?php namespace Config; /** * Paths * * Holds the paths that are used by the system to * locate the main directories, app, system, etc. * * Modifying these allows you to restructure your application, * share a system folder between multiple applications, and more. * * All paths are relative to the project's root folder. */ class Paths { /** * --------------------------------------------------------------- * SYSTEM FOLDER NAME * --------------------------------------------------------------- * * This must contain the name of your "system" folder. Include * the path if the folder is not in the same directory as this file. * * @var string */ public $systemDirectory = __DIR__ . '/../../system'; /** * --------------------------------------------------------------- * APPLICATION FOLDER NAME * --------------------------------------------------------------- * * If you want this front controller to use a different "app" * folder than the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your getServer. If * you do, use a full getServer path. * * @see http://codeigniter.com/user_guide/general/managing_apps.html * * @var string */ public $appDirectory = __DIR__ . '/..'; /** * --------------------------------------------------------------- * WRITABLE DIRECTORY NAME * --------------------------------------------------------------- * * This variable must contain the name of your "writable" directory. * The writable directory allows you to group all directories that * need write permission to a single place that can be tucked away * for maximum security, keeping it out of the app and/or * system directories. * * @var string */ public $writableDirectory = __DIR__ . '/../../writable'; /** * --------------------------------------------------------------- * TESTS DIRECTORY NAME * --------------------------------------------------------------- * * This variable must contain the name of your "tests" directory. * * @var string */ public $testsDirectory = __DIR__ . '/../../tests'; /** * --------------------------------------------------------------- * VIEW DIRECTORY NAME * --------------------------------------------------------------- * * This variable must contain the name of the directory that * contains the view files used by your application. By * default this is in `app/Views`. This value * is used when no value is provided to `Services::renderer()`. * * @var string */ public $viewDirectory = __DIR__ . '/../Views'; }
<?php namespace Minz\Obs\Plugins; use League\Flysystem\Plugin\AbstractPlugin; class Bucket extends AbstractPlugin { public function getMethod() { return 'bucket'; } /** * @param $bucket * @return mixed */ public function handle($bucket) { return $this->filesystem->getAdapter()->bucket($bucket); } }
<?php namespace App\Entity; use App\Repository\PostRepository; use App\Entity\Comment; use App\Entity\Traits\BlameableEntity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Timestampable\Traits\TimestampableEntity; use Hateoas\Configuration\Annotation as Hateoas; use JMS\Serializer\Annotation as Serializer; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity(repositoryClass=PostRepository::class) * @UniqueEntity("slug") * @ORM\Table() * * @Serializer\ExclusionPolicy("all") * * @Hateoas\Relation( * "self", * href = @Hateoas\Route( * "api_post_show", * parameters = { "slug" = "expr(object.getSlug())" }, * absolute = true * ), * exclusion = @Hateoas\Exclusion(groups={"post_details", "comment_details"}) * ) * @Hateoas\Relation( * "modify", * href = @Hateoas\Route( * "api_post_update", * parameters = { "slug" = "expr(object.getSlug())" }, * absolute = true * ), * exclusion = @Hateoas\Exclusion(groups={"post_details"}) * ) * @Hateoas\Relation( * "delete", * href = @Hateoas\Route( * "api_post_delete", * parameters = { "slug" = "expr(object.getSlug())" }, * absolute = true * ), * exclusion = @Hateoas\Exclusion(groups={"post_details"}) * ) * */ class Post { /** * Hook timestampable behavior * updates createdAt, updatedAt fields */ use TimestampableEntity; /** * Hook blameable behavior * updates createdBy, updatedBy fields */ use BlameableEntity; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_id"}) */ private $id; /** * @ORM\Column(length=128) * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_details", "post_input", "comment_details"}) * * @Assert\NotBlank() */ private $title; /** * @ORM\Column(length=156, unique=true) * * @Gedmo\Slug(fields={"title", "createdAt"}) * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_details", "post_identifier", "comment_details"}) */ private $slug; /** * @var string * * @ORM\Column(name="description", type="text", nullable=true) * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_details", "post_input", "comment_details"}) */ private $description; /** * @var string * * @ORM\Column(name="body", type="text") * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_details", "post_input", "comment_details"}) */ private $body; /** * Undocumented variable * * @var Comment[] * @ORM\OneToMany(targetEntity="App\Entity\Comment", mappedBy="post") * * @Serializer\Expose * @Serializer\Since("1.0") * @Serializer\Groups({"post_details"}) * @Serializer\Type("ArrayCollection<App\Entity\Comment>") */ private $comments; public function getId(): ?int { return $this->id; } public function __toString() { return ''.$this->getId(); } /** * Get the value of title */ public function getTitle() { return $this->title; } /** * Set the value of title * * @return self */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get the value of slug */ public function getSlug() { return $this->slug; } /** * Set the value of slug * * @return self */ public function setSlug($slug) { $this->slug = $slug; return $this; } /** * Get the value of description * * @return string */ public function getDescription() { return $this->description; } /** * Set the value of description * * @param string $description * * @return self */ public function setDescription(string $description) { $this->description = $description; return $this; } /** * Get the value of body * * @return string */ public function getBody() { return $this->body; } /** * Set the value of body * * @param string $body * * @return self */ public function setBody(string $body) { $this->body = $body; return $this; } /** * Get undocumented variable * * @return Comment[] */ public function getComments() { return $this->comments; } /** * Set undocumented variable * * @param Comment[] $comments Undocumented variable * * @return self */ public function setComments(array $comments) { $this->comments = $comments; return $this; } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('firstname'); $table->string('lastname'); $table->string('phone'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }
<?php namespace RcmUser\Acl\Provider; use RcmUser\Acl\Entity\AclResource; use RcmUser\Acl\Entity\RootAclResource; /** * Class RootResourceProvider * * PHP version 5 * * @category Reliv * @package RcmUser\Acl\Provider * @author James Jervis <jjervis@relivinc.com> * @copyright 2015 Reliv International * @license License.txt New BSD License * @version Release: <package_version> * @link https://github.com/reliv */ class RootResourceProvider implements ResourceProviderInterface { /** * @var string $providerId */ protected $providerId = 'root'; /** * @var array $resources */ protected $resources = []; /** * RootResourceProvider constructor. */ public function __construct(RootAclResource $rootAclResource) { $this->resources[$this->providerId] = $rootAclResource; } /** * getProviderId * * @return string */ public function getProviderId() { return $this->providerId; } /** * getResources * Return an array of resources and privileges * containing ALL possible resources including run-time resources * * @return array */ public function getResources() { return $this->resources; } /** * getResource * Return the requested resource or null if not found * Can be used to return resources dynamically at run-time * * @param string $resourceId resourceId * * @return AclResource|array|null */ public function getResource($resourceId) { if (isset($this->resources[$resourceId])) { return $this->resources[$resourceId]; } return null; } /** * hasResource * * @param string $resourceId * * @return bool */ public function hasResource($resourceId) { $resource = $this->getResource($resourceId); return ($resource !== null); } }
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Queue * @subpackage Stomp * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Client.php 24593 2012-01-05 20:35:02Z matthew $ */ /** * The Stomp client interacts with a Stomp server. * * @category Zend * @package Zend_Queue * @subpackage Stomp * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Stomp_Client { /** * Array of $client Zend_Queue_Stomp_Client_Interface * * @var array */ protected $_connection; /** * Add a server to connections * * @param string scheme * @param string host * @param integer port */ public function __construct( $scheme = null, $host = null, $port = null, $connectionClass = 'Zend_Queue_Stomp_Client_Connection', $frameClass = 'Zend_Queue_Stomp_Frame' ) { if (($scheme !== null) && ($host !== null) && ($port !== null) ) { $this->addConnection($scheme, $host, $port, $connectionClass); $this->getConnection()->setFrameClass($frameClass); } } /** * Shutdown * * @return void */ public function __destruct() { if ($this->getConnection()) { $this->getConnection()->close(true); } } /** * Add a connection to this client. * * Attempts to add this class to the client. Returns a boolean value * indicating success of operation. * * You cannot add more than 1 connection to the client at this time. * * @param string $scheme ['tcp', 'udp'] * @param string host * @param integer port * @param string class - create a connection with this class; class must support Zend_Queue_Stomp_Client_ConnectionInterface * @return boolean */ public function addConnection($scheme, $host, $port, $class = 'Zend_Queue_Stomp_Client_Connection') { if (!class_exists($class)) { require_once 'Zend/Loader.php'; Zend_Loader::loadClass($class); } $connection = new $class(); if ($connection->open($scheme, $host, $port)) { $this->setConnection($connection); return true; } $connection->close(); return false; } /** * Set client connection * * @param Zend_Queue_Stomp_Client_ConnectionInterface $connection * @return void */ public function setConnection(Zend_Queue_Stomp_Client_ConnectionInterface $connection) { $this->_connection = $connection; return $this; } /** * Get client connection * * @return Zend_Queue_Stomp_Client_ConnectionInterface|null */ public function getConnection() { return $this->_connection; } /** * Send a stomp frame * * Returns true if the frame was successfully sent. * * @param Zend_Queue_Stomp_FrameInterface $frame * @return boolean */ public function send(Zend_Queue_Stomp_FrameInterface $frame) { $this->getConnection()->write($frame); return $this; } /** * Receive a frame * * Returns a frame or false if none were to be read. * * @return Zend_Queue_Stomp_FrameInterface|boolean */ public function receive() { return $this->getConnection()->read(); } /** * canRead() * * @return boolean */ public function canRead() { return $this->getConnection()->canRead(); } /** * creates a frame class * * @return Zend_Queue_Stomp_FrameInterface */ public function createFrame() { return $this->getConnection()->createFrame(); } }
<footer class="footer"> <div class="container"> <p style="color: #ffffff;margin: 10px 0 10px 0; text-align: center" > 本站以分享各类网络文章文章为主,为你带来简洁舒适的阅读体验</p> <p style="text-align: right"> 提示 :所有文章来源于网络, 如果有版权问题请与<button class="btn-link" type="button" onclick="contactUs()">我们</button>联系, 我们将及时删除!</p> </div> </footer> <script> function contactUs() { alert('通过 微信公众号 "57早知道" 发送消息给我们,我们会及时处理!!'); } </script>
<?php declare(strict_types=1); namespace EonX\EasyApiToken\Tests\Encoders; use EonX\EasyApiToken\Encoders\BasicAuthEncoder; use EonX\EasyApiToken\Exceptions\InvalidArgumentException; use EonX\EasyApiToken\Exceptions\UnableToEncodeEasyApiTokenException; use EonX\EasyApiToken\Tests\AbstractTestCase; use EonX\EasyApiToken\Tokens\ApiKeyEasyApiToken; use EonX\EasyApiToken\Tokens\BasicAuthEasyApiToken; final class BasicAuthEncoderTest extends AbstractTestCase { public function testBasicAuthEncodeSuccessfully(): void { $tests = [ 'username' => 'password', 'username ' => ' password ', 'username ' => 'Sp3c|@l_cH\\aracters', ]; foreach ($tests as $username => $password) { $token = (new BasicAuthEncoder())->encode(new BasicAuthEasyApiToken($username, $password, 'original')); self::assertEquals(\base64_encode(\sprintf('%s:%s', $username, $password)), $token); } } public function testInvalidTokenException(): void { $this->expectException(InvalidArgumentException::class); (new BasicAuthEncoder())->encode(new ApiKeyEasyApiToken('')); } public function testUnableToEncodePasswordEmptyException(): void { $this->expectException(UnableToEncodeEasyApiTokenException::class); (new BasicAuthEncoder())->encode(new BasicAuthEasyApiToken('username', '', '')); } public function testUnableToEncodeUsernameEmptyException(): void { $this->expectException(UnableToEncodeEasyApiTokenException::class); (new BasicAuthEncoder())->encode(new BasicAuthEasyApiToken('', 'password', '')); } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Eloquent\Model; class CreateCommonArticlesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Model::unguard(); Schema::create('commonarticles',function(Blueprint $table){ $table->increments("id"); $table->string("common_title"); $table->string("common_slug"); $table->text("common_description")->nullable(); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('commonarticles'); } }
<?php namespace Concrete\Core\Page\Controller; use Concrete\Core\Block\Block; use Concrete\Core\Block\BlockController; use Concrete\Core\Controller\Controller; use Concrete\Core\Foundation\Environment; use Concrete\Core\Html\Service\Html; use Concrete\Core\Http\Request; use Concrete\Core\Page\Page; use Concrete\Core\Routing\Redirect; use Concrete\Core\Support\Facade\Application; use Concrete\Core\Page\View\PageView; use Symfony\Component\HttpFoundation\Response; class PageController extends Controller { protected $supportsPageCache = false; protected $action; protected $passThruBlocks = array(); protected $parameters = array(); protected $replacement = null; /** * array of method names that can't be called through the url * @var array */ protected $restrictedMethods = array(); /** * Custom request path - overrides Request::getPath() (useful when replacing controllers). * @var string|null */ protected $customRequestPath = null; /** @var \Concrete\Core\Page\Page The current page */ public $c; public function supportsPageCache() { return $this->supportsPageCache; } public function __construct(Page $c) { parent::__construct(); $this->c = $c; $this->view = new PageView($this->c); $this->set('html', Application::getFacadeApplication()->make(HTML::class)); } /** * Given either a path or a Page object, this is a shortcut to * 1. Grab the controller of THAT page. * 2. Grab the view of THAT controller * 3. Render that view. * 4. Exit – so we immediately stop all other output in the controller that * called render(). * * @param @string|\Concrete\Core\Page\Page $var */ public function replace($var) { if ($var instanceof Page) { $page = $var; $path = $var->getCollectionPath(); } else { $path = (string) $var; $page = Page::getByPath($path); } $request = Request::getInstance(); $controller = $page->getPageController(); $request->setCurrentPage($page); if (is_callable([$controller, 'setCustomRequestPath'])) { $controller->setCustomRequestPath($path); } $this->replacement = $controller; } /** * Set the custom request path (useful when replacing controllers). * * @param string|null $requestPath Set to null to use the default request path */ public function setCustomRequestPath($requestPath) { $this->customRequestPath = ($requestPath === null) ? null : (string) $requestPath; } /** * Get the custom request path (useful when replacing controllers). * * @return string|null Returns null if no custom request path, a string otherwise */ public function getCustomRequestPath() { return $this->customRequestPath; } public function isReplaced() { return !!$this->replacement; } public function getReplacement() { return $this->replacement; } public function getSets() { $sets = parent::getSets(); $session = Application::getFacadeApplication()->make('session'); if ($session->getFlashBag()->has('page_message')) { $value = $session->getFlashBag()->get('page_message'); foreach ($value as $message) { $sets[$message[0]] = $message[1]; $sets[$message[0].'IsHTML'] = isset($message[2]) && $message[2]; } } return $sets; } /** * Given a path to a single page, this command uses the CURRENT controller and renders * the contents of the single page within this request. The current controller is not * replaced, and has already fired (since it is meant to be called from within a view() or * similar method). * * @param @string */ public function render($path, $pkgHandle = null) { $view = $this->getViewObject(); $env = Environment::get(); $path = trim($path, '/'); $a = $path . '/' . FILENAME_COLLECTION_VIEW; $b = $path . '.php'; $r = $env->getRecord(DIRNAME_PAGES . '/' . $a); if ($r->exists()) { $view->renderSinglePageByFilename($a, $pkgHandle); } else { $view->renderSinglePageByFilename($b, $pkgHandle); } } public function getPageObject() { return $this->c; } public function flash($key, $value, $isHTML = false) { $session = Application::getFacadeApplication()->make('session'); $session->getFlashBag()->add('page_message', array($key, $value, $isHTML)); } public function getTheme() { if ($this->theme === null) { $theme = parent::getTheme(); if (!$theme) { $theme = $this->c->getCollectionThemeObject(); if (is_object($theme)) { $this->theme = $theme->getThemeHandle(); } } else { $this->theme = $theme; } } return $this->theme; } public function getRequestAction() { return $this->action; } public function getRequestActionParameters() { return $this->parameters; } public function getControllerActionPath() { if (isset($this->controllerActionPath)) { return $this->controllerActionPath; } if (is_object($this->view)) { return $this->view->getViewPath(); } } public function setupRequestActionAndParameters(Request $request) { $requestPath = $this->getCustomRequestPath(); if ($requestPath === null) { $requestPath = $request->getPath(); } $task = substr($requestPath, strlen($this->c->getCollectionPath()) + 1); $task = str_replace('-/', '', $task); $taskparts = explode('/', $task); if (isset($taskparts[0]) && $taskparts[0] !== '') { $method = $taskparts[0]; } elseif (is_object($this->c) && is_callable(array($this, $this->c->getCollectionHandle()))) { $method = $this->c->getCollectionHandle(); } else { $method = 'view'; } $foundTask = false; $restrictedControllers = array( 'Concrete\Core\Controller\Controller', 'Concrete\Core\Controller\AbstractController', 'Concrete\Core\Page\Controller\PageController' ); try { $r = new \ReflectionMethod(get_class($this), $method); $cl = $r->getDeclaringClass(); if (is_object($cl)) { if ( !in_array($cl->getName(), $restrictedControllers) && strpos($method, 'on_') !== 0 && strpos($method, '__') !== 0 && $r->isPublic() && !$r->isConstructor() && (is_array($this->restrictedMethods) && !in_array($method, $this->restrictedMethods)) ) { $foundTask = true; } } } catch (\Exception $e) { } if ($foundTask) { $this->action = $method; if (isset($taskparts[1])) { array_shift($taskparts); $this->parameters = $taskparts; } } else { $this->action = 'view'; if ($taskparts[0] !== '') { $this->parameters = $taskparts; } } } public function isValidControllerTask($action, $parameters = array()) { $valid = true; if (!is_callable(array($this, $this->action)) && count($this->parameters) > 0) { $valid = false; } if (is_callable(array($this, $this->action)) && (get_class($this) != '\Concrete\Controller\PageForbidden')) { // we use reflection to see if the task itself, which now much exist, takes fewer arguments than // what is specified $r = new \ReflectionMethod(get_class($this), $this->action); if ($r->getNumberOfParameters() < count($this->parameters)) { $valid = false; } } return $valid; } /** * @param Block $b * @param BlockController $controller */ public function setPassThruBlockController(Block $b, BlockController $controller) { $this->passThruBlocks[$b->getBlockID()] = $controller; } public function getPassThruBlockController(Block $b) { $bID = $b->getBlockID(); return isset($this->passThruBlocks[$bID]) ? $this->passThruBlocks[$bID] : null; } public function validateRequest() { $valid = true; if (!$this->isValidControllerTask($this->action, $this->parameters)) { $valid = false; // we check the blocks on the page. $blocks = array_merge($this->getPageObject()->getBlocks(), $this->getPageObject()->getGlobalBlocks()); foreach ($blocks as $b) { $controller = $b->getController(); list($method, $parameters) = $controller->getPassThruActionAndParameters($this->parameters); if ($controller->isValidControllerTask($method, $parameters)) { $controller->on_start(); $response = $controller->runAction($method, $parameters); if ($response instanceof Response) { return $response; } // old school blocks have already terminated at this point. They are redirecting // or exiting. But new blocks like topics, etc... can actually rely on their $set // data persisting and being passed into the view. // so if we make it down here we have to return true –so that we don't fire a 404. $valid = true; // then, we need to save the persisted data that may have been set. $controller->setPassThruBlockController($this); } } if (!$valid) { // finally, we check additional page paths. $paths = $this->getPageObject()->getAdditionalPagePaths(); foreach ($paths as $path) { if ($path->getPagePath() == $this->request->getPath()) { // This is an additional page path to a page. We 301 redirect. return Redirect::page($this->getPageObject(), 301); } } } } return $valid; } }
<?php return array ( 8680505 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '槻木', ), 8680624 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '中猪', ), 8688515 => array ( 0 => 43, 1 => '人吉市', 2 => '城本町', 3 => '800', ), 8680424 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '上西', ), 8680795 => array ( 0 => 43, 1 => '球磨郡水上村', 2 => '大字岩野', 3 => '90', ), 8680593 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '大字奥野', 3 => '813', ), 8680702 => array ( 0 => 43, 1 => '球磨郡水上村', 2 => '江代', ), 8680033 => array ( 0 => 43, 1 => '人吉市', 2 => '下新町', ), 8680044 => array ( 0 => 43, 1 => '人吉市', 2 => '東間下町', ), 8680077 => array ( 0 => 43, 1 => '人吉市', 2 => '下戸越町', ), 8688555 => array ( 0 => 43, 1 => '人吉市', 2 => '老神町', 3 => '35', ), 8680392 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '大字一武', 3 => '1587', ), 8680034 => array ( 0 => 43, 1 => '人吉市', 2 => '七日町', ), 8680045 => array ( 0 => 43, 1 => '人吉市', 2 => '浪床町', ), 8680611 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '植木', ), 8680021 => array ( 0 => 43, 1 => '人吉市', 2 => '鬼木町', ), 8680002 => array ( 0 => 43, 1 => '人吉市', 2 => '大工町', ), 8680300 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '', ), 8680613 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '田上', ), 8680027 => array ( 0 => 43, 1 => '人吉市', 2 => '井ノ口町', ), 8688508 => array ( 0 => 43, 1 => '人吉市', 2 => '宝来町', 3 => '1340-2', ), 8680057 => array ( 0 => 43, 1 => '人吉市', 2 => '土手町', ), 8680053 => array ( 0 => 43, 1 => '人吉市', 2 => '老神町', ), 8680032 => array ( 0 => 43, 1 => '人吉市', 2 => '上新町', ), 8680000 => array ( 0 => 43, 1 => '人吉市', 2 => '', ), 8680015 => array ( 0 => 43, 1 => '人吉市', 2 => '下城本町', ), 8688501 => array ( 0 => 43, 1 => '球磨郡相良村', 2 => '大字深水', 3 => '2500-1', ), 8680825 => array ( 0 => 43, 1 => '人吉市', 2 => '赤池原町', ), 8680075 => array ( 0 => 43, 1 => '人吉市', 2 => '矢黒町', ), 8680415 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '免田西', ), 8688511 => array ( 0 => 43, 1 => '人吉市', 2 => '北泉田町', 3 => '350', ), 8680024 => array ( 0 => 43, 1 => '人吉市', 2 => '鶴田町', ), 8680031 => array ( 0 => 43, 1 => '人吉市', 2 => '南願成寺町', ), 8680014 => array ( 0 => 43, 1 => '人吉市', 2 => '下薩摩瀬町', ), 8680500 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '', ), 8680037 => array ( 0 => 43, 1 => '人吉市', 2 => '南泉田町', ), 8680023 => array ( 0 => 43, 1 => '人吉市', 2 => '北泉田町', ), 8680041 => array ( 0 => 43, 1 => '人吉市', 2 => '七地町', ), 8680063 => array ( 0 => 43, 1 => '人吉市', 2 => '木地屋町', ), 8680614 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '馬場', ), 8680616 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '下村', ), 8680094 => array ( 0 => 43, 1 => '球磨郡相良村', 2 => '深水', ), 8680086 => array ( 0 => 43, 1 => '人吉市', 2 => '下原田町', ), 8680504 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '奥野', ), 8680441 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '深田北', ), 8680425 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '皆越', ), 8680092 => array ( 0 => 43, 1 => '球磨郡山江村', 2 => '山田', ), 8680451 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '須恵', ), 8680202 => array ( 0 => 43, 1 => '球磨郡五木村', 2 => '乙', ), 8680083 => array ( 0 => 43, 1 => '人吉市', 2 => '下林町', ), 8680595 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '大字多良木', 3 => '1648', ), 8680301 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '木上', ), 8680008 => array ( 0 => 43, 1 => '人吉市', 2 => '中青井町', ), 8680085 => array ( 0 => 43, 1 => '人吉市', 2 => '中神町', ), 8680813 => array ( 0 => 43, 1 => '人吉市', 2 => '矢岳町', ), 8680443 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '深田南', ), 8680078 => array ( 0 => 43, 1 => '人吉市', 2 => '鹿目町', ), 8680622 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '上染田', ), 8680026 => array ( 0 => 43, 1 => '人吉市', 2 => '合ノ原町', ), 8680822 => array ( 0 => 43, 1 => '人吉市', 2 => '下漆田町', ), 8680621 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '上里', ), 8680006 => array ( 0 => 43, 1 => '人吉市', 2 => '駒井田町', ), 8680432 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '岡原南', ), 8680606 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '中里', ), 8680054 => array ( 0 => 43, 1 => '人吉市', 2 => '田町', ), 8680607 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '下里', ), 8680072 => array ( 0 => 43, 1 => '人吉市', 2 => '西間下町', ), 8680047 => array ( 0 => 43, 1 => '人吉市', 2 => '上原町', ), 8680073 => array ( 0 => 43, 1 => '人吉市', 2 => '上永野町', ), 8680056 => array ( 0 => 43, 1 => '人吉市', 2 => '寺町', ), 8680700 => array ( 0 => 43, 1 => '球磨郡水上村', 2 => '', ), 8688505 => array ( 0 => 43, 1 => '人吉市', 2 => '合ノ原町', 3 => '498番地', ), 8680064 => array ( 0 => 43, 1 => '人吉市', 2 => '東大塚町', ), 8680046 => array ( 0 => 43, 1 => '人吉市', 2 => '原城町', ), 8680625 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '上猪', ), 8680036 => array ( 0 => 43, 1 => '人吉市', 2 => '二日町', ), 8680598 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '大字多良木', 3 => '4210', ), 8680824 => array ( 0 => 43, 1 => '人吉市', 2 => '赤池水無町', ), 8680612 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '上村', ), 8680811 => array ( 0 => 43, 1 => '人吉市', 2 => '大畑麓町', ), 8680602 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '浜川', ), 8680423 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '上南', ), 8680012 => array ( 0 => 43, 1 => '人吉市', 2 => '相良町', ), 8680201 => array ( 0 => 43, 1 => '球磨郡五木村', 2 => '甲', ), 8680076 => array ( 0 => 43, 1 => '人吉市', 2 => '上戸越町', ), 8680605 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '下染田', ), 8680004 => array ( 0 => 43, 1 => '人吉市', 2 => '九日町', ), 8680087 => array ( 0 => 43, 1 => '人吉市', 2 => '上原田町', ), 8680823 => array ( 0 => 43, 1 => '人吉市', 2 => '東漆田町', ), 8680502 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '黒肥地', ), 8680393 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '大字一武', 3 => '狩政下2605-7', ), 8680048 => array ( 0 => 43, 1 => '人吉市', 2 => '富ケ尾町', ), 8688503 => array ( 0 => 43, 1 => '人吉市', 2 => '西間下町', 3 => '86-1', ), 8680013 => array ( 0 => 43, 1 => '人吉市', 2 => '上薩摩瀬町', ), 8680003 => array ( 0 => 43, 1 => '人吉市', 2 => '紺屋町', ), 8680101 => array ( 0 => 43, 1 => '球磨郡相良村', 2 => '四浦', ), 8680501 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '多良木', ), 8680597 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '大字多良木', 3 => '2797', ), 8680801 => array ( 0 => 43, 1 => '人吉市', 2 => '上田代町', ), 8680604 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '浅ケ野', ), 8680091 => array ( 0 => 43, 1 => '球磨郡山江村', 2 => '万江', ), 8680095 => array ( 0 => 43, 1 => '球磨郡相良村', 2 => '柳瀬', ), 8680005 => array ( 0 => 43, 1 => '人吉市', 2 => '上青井町', ), 8680603 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '古城', ), 8680200 => array ( 0 => 43, 1 => '球磨郡五木村', 2 => '', ), 8680431 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '岡原北', ), 8680408 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '免田東', ), 8680081 => array ( 0 => 43, 1 => '人吉市', 2 => '上林町', ), 8680065 => array ( 0 => 43, 1 => '人吉市', 2 => '西大塚町', ), 8680701 => array ( 0 => 43, 1 => '球磨郡水上村', 2 => '岩野', ), 8680203 => array ( 0 => 43, 1 => '球磨郡五木村', 2 => '丙', ), 8680615 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '瀬戸口', ), 8680035 => array ( 0 => 43, 1 => '人吉市', 2 => '五日町', ), 8680055 => array ( 0 => 43, 1 => '人吉市', 2 => '南町', ), 8680821 => array ( 0 => 43, 1 => '人吉市', 2 => '上漆田町', ), 8680503 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '久米', ), 8680421 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '上東', ), 8680084 => array ( 0 => 43, 1 => '人吉市', 2 => '温泉町', ), 8680444 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '深田西', ), 8680016 => array ( 0 => 43, 1 => '人吉市', 2 => '城本町', ), 8680022 => array ( 0 => 43, 1 => '人吉市', 2 => '願成寺町', ), 8680066 => array ( 0 => 43, 1 => '人吉市', 2 => '田野町', ), 8680051 => array ( 0 => 43, 1 => '人吉市', 2 => '麓町', ), 8680052 => array ( 0 => 43, 1 => '人吉市', 2 => '新町', ), 8680623 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '野中田', ), 8680082 => array ( 0 => 43, 1 => '人吉市', 2 => '中林町', ), 8680025 => array ( 0 => 43, 1 => '人吉市', 2 => '瓦屋町', ), 8680802 => array ( 0 => 43, 1 => '人吉市', 2 => '下田代町', ), 8680011 => array ( 0 => 43, 1 => '人吉市', 2 => '宝来町', ), 8680061 => array ( 0 => 43, 1 => '人吉市', 2 => '蓑野町', ), 8680302 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '一武', ), 8680058 => array ( 0 => 43, 1 => '人吉市', 2 => '灰久保町', ), 8680042 => array ( 0 => 43, 1 => '人吉市', 2 => '蟹作町', ), 8680812 => array ( 0 => 43, 1 => '人吉市', 2 => '大野町', ), 8680043 => array ( 0 => 43, 1 => '人吉市', 2 => '東間上町', ), 8680442 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '深田東', ), 8680600 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '', ), 8680422 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '上北', ), 8680803 => array ( 0 => 43, 1 => '人吉市', 2 => '大畑町', ), 8680703 => array ( 0 => 43, 1 => '球磨郡水上村', 2 => '湯山', ), 8680093 => array ( 0 => 43, 1 => '球磨郡相良村', 2 => '川辺', ), 8680007 => array ( 0 => 43, 1 => '人吉市', 2 => '下青井町', ), 8680001 => array ( 0 => 43, 1 => '人吉市', 2 => '鍛冶屋町', ), 8680400 => array ( 0 => 43, 1 => '球磨郡あさぎり町', 2 => '', ), 8688601 => array ( 0 => 43, 1 => '人吉市', 2 => '麓町', 3 => '16', ), 8688502 => array ( 0 => 43, 1 => '球磨郡山江村', 2 => '大字山田', 3 => '甲1356-1', ), 8680071 => array ( 0 => 43, 1 => '人吉市', 2 => '西間上町', ), 8680303 => array ( 0 => 43, 1 => '球磨郡錦町', 2 => '西', ), 8680062 => array ( 0 => 43, 1 => '人吉市', 2 => '古仏頂町', ), 8680074 => array ( 0 => 43, 1 => '人吉市', 2 => '下永野町', ), 8680601 => array ( 0 => 43, 1 => '球磨郡湯前町', 2 => '下城', ), 8680592 => array ( 0 => 43, 1 => '球磨郡多良木町', 2 => '大字多良木', 3 => '144-1', ), );
<!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- csrf token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>Your Website Title</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" /> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> <!-- styles --> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> </head> <body> <div id="root"></div> <script src="{{ asset('js/app.js') }}"></script> </body> </html>
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddCategoryForeignKeyToPostsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('Posts', function (Blueprint $table) { //deve essere dello stesso tipo del id ma può essere null $table->unsignedBigInteger('category_id')->nullable()->after('id'); //creo la relazione one(category) to many(posts) //documentazione #Foreign Key Costraints $table->foreign('category_id')->references('id')->on('categories')->onDelete('set null'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('Posts', function (Blueprint $table) { //elimina il vincolo(tabella_colonna_vincolata_foreign) $table->dropForeign('posts_category_id_foreign'); //elimina la colonna $table->dropColumn('category_id'); }); } }
<?php $__env->startSection('content'); ?> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-10 col-md-8 col-sm-offset-1 col-md-offset-2"> <h1 class="text-center">Awesome Posts</h1> </div> </div> <div class="row"> <div class="col-xs-12 col-sm-10 col-md-8 col-sm-offset-1 col-md-offset-2"> <form action="<?php echo e(route('post.create')); ?>" method="post"> <div class="form-group"> <label for="title" class="control-label"> Title </label> <input type="text" class="form-control" id="title" name="title"> </div> <div class="form-group"> <label for="content" class="control-label"> Content </label> <textarea name="content" id="content" rows="10" class="form-control"></textarea> </div> <?php echo e(csrf_field()); ?> <button type="submit" class="btn btn-primary">Create Post</button> </form> </div> </div> </div> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php namespace RestoBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Plat * * @ORM\Table(name="plat") * @ORM\Entity(repositoryClass="RestoBundle\Repository\PlatRepository") */ class Plat { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="nom", type="string", length=255) */ private $nom; /** * @var string * * @ORM\Column(name="description", type="string", length=255) */ private $description; /** * @var int * * @ORM\Column(name="prix", type="integer") */ private $prix; /** * Get id * * @return int */ /** * @ORM\Column(type="string") * * @Assert\NotBlank(message="Ajouter une image jpg") * @Assert\File(mimeTypes={ "image/jpeg" }) */ private $image; public function getImage() { return $this->image; } public function setImage($image) { $this->image = $image; return $this; } public function getId() { return $this->id; } /** * Set nom * * @param string $nom * * @return Plat */ public function setNom($nom) { $this->nom = $nom; return $this; } /** * Get nom * * @return string */ public function getNom() { return $this->nom; } /** * Set description * * @param string $description * * @return Plat */ public function setDescription($description) { $this->description = $description; return $this; } /** * Get description * * @return string */ public function getDescription() { return $this->description; } /** * Set prix * * @param integer $prix * * @return Plat */ public function setPrix($prix) { $this->prix = $prix; return $this; } /** * Get prix * * @return int */ public function getPrix() { return $this->prix; } } ?>
<?php // This file is auto-generated, don't edit it. Thanks. namespace AlibabaCloud\SDK\ICE\V20201109\Models; use AlibabaCloud\Tea\Model; class RegisterMediaInfoRequest extends Model { /** * @description 媒资业务类型 * * @var string */ public $businessType; /** * @description 分类 * * @var string */ public $category; /** * @description 客户端token * * @var string */ public $clientToken; /** * @description 封面图,仅视频媒资有效 * * @var string */ public $coverURL; /** * @description 描述 * * @var string */ public $description; /** * @description 用户自定义元数据 * * @var string */ public $dynamicMetaDataList; /** * @description 媒资媒体url * * @var string */ public $inputURL; /** * @description 标签,如果有多个标签用逗号隔开 * * @var string */ public $mediaTags; /** * @description 媒资媒体类型 * * @var string */ public $mediaType; /** * @description 是否覆盖已有媒资 * * @var bool */ public $overwrite; /** * @var string */ public $regionId; /** * @description 注册媒资的配置 * * @var string */ public $registerConfig; /** * @description 标题 * * @var string */ public $title; /** * @description 用户数据,最大1024字节 * * @var string */ public $userData; protected $_name = [ 'businessType' => 'BusinessType', 'category' => 'Category', 'clientToken' => 'ClientToken', 'coverURL' => 'CoverURL', 'description' => 'Description', 'dynamicMetaDataList' => 'DynamicMetaDataList', 'inputURL' => 'InputURL', 'mediaTags' => 'MediaTags', 'mediaType' => 'MediaType', 'overwrite' => 'Overwrite', 'regionId' => 'RegionId', 'registerConfig' => 'RegisterConfig', 'title' => 'Title', 'userData' => 'UserData', ]; public function validate() { } public function toMap() { $res = []; if (null !== $this->businessType) { $res['BusinessType'] = $this->businessType; } if (null !== $this->category) { $res['Category'] = $this->category; } if (null !== $this->clientToken) { $res['ClientToken'] = $this->clientToken; } if (null !== $this->coverURL) { $res['CoverURL'] = $this->coverURL; } if (null !== $this->description) { $res['Description'] = $this->description; } if (null !== $this->dynamicMetaDataList) { $res['DynamicMetaDataList'] = $this->dynamicMetaDataList; } if (null !== $this->inputURL) { $res['InputURL'] = $this->inputURL; } if (null !== $this->mediaTags) { $res['MediaTags'] = $this->mediaTags; } if (null !== $this->mediaType) { $res['MediaType'] = $this->mediaType; } if (null !== $this->overwrite) { $res['Overwrite'] = $this->overwrite; } if (null !== $this->regionId) { $res['RegionId'] = $this->regionId; } if (null !== $this->registerConfig) { $res['RegisterConfig'] = $this->registerConfig; } if (null !== $this->title) { $res['Title'] = $this->title; } if (null !== $this->userData) { $res['UserData'] = $this->userData; } return $res; } /** * @param array $map * * @return RegisterMediaInfoRequest */ public static function fromMap($map = []) { $model = new self(); if (isset($map['BusinessType'])) { $model->businessType = $map['BusinessType']; } if (isset($map['Category'])) { $model->category = $map['Category']; } if (isset($map['ClientToken'])) { $model->clientToken = $map['ClientToken']; } if (isset($map['CoverURL'])) { $model->coverURL = $map['CoverURL']; } if (isset($map['Description'])) { $model->description = $map['Description']; } if (isset($map['DynamicMetaDataList'])) { $model->dynamicMetaDataList = $map['DynamicMetaDataList']; } if (isset($map['InputURL'])) { $model->inputURL = $map['InputURL']; } if (isset($map['MediaTags'])) { $model->mediaTags = $map['MediaTags']; } if (isset($map['MediaType'])) { $model->mediaType = $map['MediaType']; } if (isset($map['Overwrite'])) { $model->overwrite = $map['Overwrite']; } if (isset($map['RegionId'])) { $model->regionId = $map['RegionId']; } if (isset($map['RegisterConfig'])) { $model->registerConfig = $map['RegisterConfig']; } if (isset($map['Title'])) { $model->title = $map['Title']; } if (isset($map['UserData'])) { $model->userData = $map['UserData']; } return $model; } }
<?php namespace backend\controllers; use Yii; use common\models\world\Region; use common\models\world\RegionSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; /** * RegionController implements the CRUD actions for Region model. */ class RegionController extends Controller { /** * {@inheritdoc} */ public function behaviors() { return [ 'verbs' => [ 'class' => VerbFilter::class, 'actions' => [ 'delete' => ['POST'], ], ], ]; } /** * Lists all Region models. * * @return mixed */ public function actionIndex() { $searchModel = new RegionSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); } /** * Displays a single Region model. * * @param integer $id * * @return mixed * @throws NotFoundHttpException if the model cannot be found */ public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); } /** * Creates a new Region model. * If creation is successful, the browser will be redirected to the 'view' page. * * @return mixed */ public function actionCreate() { $model = new Region(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } return $this->render('create', [ 'model' => $model, ]); } /** * Updates an existing Region model. * If update is successful, the browser will be redirected to the 'view' page. * * @param integer $id * * @return mixed * @throws NotFoundHttpException if the model cannot be found */ public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } return $this->render('update', [ 'model' => $model, ]); } /** * Deletes an existing Region model. * If deletion is successful, the browser will be redirected to the 'index' page. * * @param integer $id * * @return mixed * @throws NotFoundHttpException if the model cannot be found * @throws \Throwable * @throws \yii\db\StaleObjectException */ public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['index']); } /** * Finds the Region model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * * @param integer $id * * @return Region the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Region::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); } }
<?php /* -- --------------------------------------------------------------- -- MARKETPLACE -- CREATED BY : RIZKY MUSTHOFA -- COPYRIGHT : Copyright (c) 2020 -- LICENSE : http://opensource.org/licenses/MIT MIT License -- CREATED ON : 2020-03-18 -- UPDATED ON : V.1 -- --------------------------------------------------------------- */ defined('BASEPATH') OR exit('No direct script access allowed'); class Main extends CI_Controller { function __construct() { parent::__construct(); /*Load session*/ // $this->load->library('session'); /*Model*/ // $this->load->model('M_account'); // $this->load->helper('login_access'); } public function index() { $data['pages'] = 'default'; $this->load->view('main',$data); } }
<html> <head> <style type="text/css"> .table-wrapper-scroll-y { display: block; max-height: 340px; overflow-y: auto; -ms-overflow-style: -ms-autohiding-scrollbar; } </style> </head> <body> <?php $array_hari=array(1=>'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'); $hari=$array_hari[date('N')]; ?> <?php $tipe="shipping" ?> <?php $hari1=date('d-m-Y') ?> <?php $jam=date('G:i:s') ?> <div class="row clearfix"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="card"> <div class="header"> <h3 align="center">SCAN SHIPPING</h3> <div class="form-group" align="center"> <div class="form-group"> <div align="center col-lg-"> <button type="button" class="btn btn-default"> <i class="material-icons">date_range</i> <span><?php echo $hari.' '.date('Y-m-d') ?></span> </button> <button type="button" class="btn btn-default"> <i class="material-icons">access_alarm</i> <span><?php echo date('h:i A') ?></span> </button> </div> </div> </div> </div> <div class="header" style="background-color: orange"> <form method="POST" action="<?php echo site_url('scan/getscans');?>"> <div class="col-lg-12"> <div class="col-lg-4"> <div class="form-group" style="background-color: orange" align="right" > <label style="color:white">Scan</label> </div> </div> <div class="col-lg-4"> <div class="input-group"> <input type="text" name="barcode" maxlength="15" size="30" class="form-control" required autocomplete="off" autofocus="autofocus" width="10%"> </div> </div> <div class="col-lg-4"></div> </div><br /> </form><br /> </div> <div class="col-md-12"> <a href="<?php echo site_url()."stock_monitoring/ekspor2/$tipe/$hari1/$jam"?>" class="btn pull-right" role="button"><span class="glyphicon glyphicon-save-file"></span> Print Report</a> </div> <div class="body table-responsive"> <div class="table-wrapper-scroll-y"> <table class="table table-bordered table-striped"> <thead> <tr class="bg-orange"> <td align="center"><label>DATE/TIME</label></td> <td align="center"><label>BRAND</label></td> <td align="center"><label>MODEL</label></td> <td align="center"><label>COLOR</label></td> <td align="center"><label>SIZE</label></td> <td align="center"><label>QUANTITY</label></td> <td align="center"><label>USER</label></td> <td align="center"><label>SCAN NO</label></td> </tr> </thead> <tbody> <?php foreach($detail1 as $data){?> <tr> <td align="center"><?php echo $data->date_time ?></td> <td align="center"><?php echo $data->brand ?></td> <td align="center"><?php echo $data->cust_model ?></td> <td align="center"><?php echo $data->color ?></td> <td align="center"><?php echo $data->size ?></td> <td align="center"><?php echo $data->quantity ?></td> <td align="center"><?php echo $data->username ?></td> <td align="center"><?php echo $data->scan_no ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </body> </html>
<div class="container"><h1>Testimoni</h1> <hr> <form enctype="multipart/form-data" action="/AdminWRBOnline/handleAddTesti/" method="POST"> <div class="form-group"> <label for="nama">Nama</label> <input type="text" class="form-control" name="nama" required="" id="nama" placeholder="Mas Agus"> </div> <div class="form-group"> <label for="minorder">Rating</label> <input type="number" class="form-control" name="rating" required="" id="minorder" min="1" max="5" value="5" placeholder="1-5"> </div> <div class="form-group"> <label for="testi">Testimoni : </label> <textarea class="form-control" name="testi" id="testi" rows="3"></textarea> </div> <button class="btn btn-success w-100" type="submit">Tambah Testi</button> </form> <hr> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>Waktu</th> <th>Nama</th> <th>Testi</th> <th>Rating</th> <th>Aksi</th> </tr> </thead> <tbody> <?= $content?> </tbody> </table> </div> </div>
<?php class agency_albums_peer extends db_peer_postgre { protected $table_name = 'agency_albums'; public static function instance() { return parent::instance('agency_albums_peer'); } public function get_item($primary_key) { $item = parent::get_item($primary_key); $fields = array('images', 'additional'); foreach($fields as $field) { $item[$field] = unserialize($item[$field]); if( ! is_array($item[$field])) $item[$field] = array(); } return $item; } public function insert($data, $ignore_duplicate = false) { if(isset($data['images'])) $data['images'] = serialize($data['images']); if(isset($data['additional'])) $data['additional'] = serialize($data['additional']); return parent::insert($data, $ignore_duplicate); } public function update($data, $keys = null) { if(isset($data['images'])) $data['images'] = serialize($data['images']); if(isset($data['additional'])) $data['additional'] = serialize($data['additional']); parent::update($data, $keys); } } ?>
@extends('layouts.admin_layout') @section('admin_content') <div class="table-agile-info"> <div class="panel panel-default"> <div class="panel-heading"> Danh sách các lời mời thi đấu </div> <div class="row w3-res-tb"> <div class="col-sm-5 m-b-xs"> </div> <div class="col-sm-4"> </div> <div class="col-sm-3"> <div class="input-group"> {{-- <input type="text" class="input-sm form-control" placeholder="Search"> <span class="input-group-btn"> <button class="btn btn-sm btn-default" type="button">Search</button> </span> --}} </div> </div> </div> <div class="table-responsive"> @if(session('success')) <div class="alert alert-success"> {{session('success')}} </div> @endif @if(session('error')) <div class="alert alert-danger"> {{session('error')}} </div> @endif <table class="table table-striped b-t b-light"> <thead> <tr> <th>Tên đội bóng</th> <th>Thời gian </th> <th>trình độ</th> <th>Mô tả</th> <th>Tình trạng</th> <th style="width:30px;"></th> </tr> </thead> <tbody> @foreach($all_match as $match_list) <tr> <td>{{$match_list->team_name}}</td> <td>{{$match_list->match_time}}</td> <td> @if($match_list->match_team_level==0) Mới chơi @endif @if($match_list->match_team_level==1) Trung bình @endif @if($match_list->match_team_level==2) Trung bình yếu @endif @if($match_list->match_team_level==3) Trung bình khá @endif @if($match_list->match_team_level==4) Khá @endif @if($match_list->match_team_level==5) Khá mạnh @endif </td> <td>{{$match_list->match_desc}}</td> <td> @if($match_list->match_status==1) <span class="text-primary">Đã có kèo</span> @else <span class="wait-for-match">Đang chờ</span> @endif </td> {{-- <td> <span class="text-ellipsis"> <?php if($all_match_info->match_status==0){ ?> <a href="{{URL::to('/unactive-admin-product/'.$match_list->match_id)}}"><span class="fa-thumb-styling fa fa-thumbs-up"></span></a> <?php }else{ ?> <a href="{{URL::to('/active-admin-product/'.$match_list->match_id)}}"><span class="fa-thumb-styling fa fa-thumbs-down"></span></a> <?php } ?> </span> </td> --}} <td> {{-- <a href="{{URL::to('/edit-match/'.$match_list->id)}}" class="active styling-edit" ui-toggle-class=""> <i class="fa fa-pencil-square-o text-success text-active"></i></a> --}} <a onclick="return confirm('Bạn có chắc là muốn xóa lời mời này ko?')" href="{{URL::to('/delete-match/'.$match_list->match_id)}}" class="active styling-edit" ui-toggle-class=""> <i class="fa fa-times text-danger text"></i> </a> </td> </tr> @endforeach </tbody> </table> </div> <footer class="panel-footer"> <div class="row"> <div class="col-sm-5 text-center"> </div> <div class="col-sm-7 text-right text-center-xs"> <ul class="pagination pagination-sm m-t-none m-b-none"> {!!$all_match->links()!!} </ul> </div> </div> </footer> </div> </div> @endsection
<?php namespace App\Http\Controllers; use App\Category; use App\Produit; use Illuminate\Http\Request; class FrontController extends Controller { public function index(){ $categories = Category::with(['produits', 'produits.produitImages']) ->orderBy('id' , 'desc') ->get(); return response()->json($categories); } }
<?php //membuat koneksi $conn=mysqli_connect("localhost","root","","morfeen"); //Cek koneksi if(!$conn) { die('Connection Failed : '.mysqli_connect_errno() .' - '.mysqli_connect_error()); } function addFreelance($data) { global $con; $nama = $data["nama"]; $alamat = $data["alamat"]; $notlp = $data["notlp"]; $project = $data["project"]; $salary = $data["salary"]; $start_date = $data["start_date"]; $end_date = $data["end_date"]; $spk = $data["spk"]; $tipe_freelance = $data["tipe_freelance"]; $query = "INSERT INTO freelance VALUES ('','$nama', '$alamat','$notlp', '$project', '$salary', '$start_date' , '$end_date', '$spk', '$tipe_freelance')"; mysqli_query($con, $query); } function editFreelance($data) { global $con; $id = $data["id_freelance"]; $nama = $data["nama"]; $alamat = $data["alamat"]; $notlp = $data["notlp"]; $project = $data["project"]; $salary = $data["salary"]; $start_date = $data["start_date"]; $end_date = $data["end_date"]; $spk = $data["spk"]; $tipe_freelance = $data["tipe_freelance"]; $query = "UPDATE freelance SET nama = '$nama', alamat = '$alamat', notlp = '$notlp', project = '$project', salary = '$salary', start_date = '$start_date', end_date = '$end_date', spk = '$spk', tipe_freelance = '$tipe_freelance' WHERE id_freelance LIKE '$id'"; mysqli_query($con, $query); return mysqli_affected_rows($con); } //ambil data dari tabel $result=mysqli_query($conn,"SELECT * FROM barang"); $rescart=mysqli_query($conn,"SELECT * FROM addcart"); //function query function query($query_kedua) { global $conn; $result = mysqli_query($conn,$query_kedua); $rows =[]; while ($row = mysqli_fetch_assoc($result)) { $rows[]=$row; } return $rows; } function addActivity($data) { global $conn; $nama = $data["nama"]; $tgl = $data["tgl"]; $aktifitas = $data["aktifitas"]; $query = "INSERT INTO aktifitas VALUES ('','$nama','$tgl','$aktifitas')"; mysqli_query($conn, $query); } function editActivity($data) { global $conn; $id = $data["id_aktifitas"]; $nama = $data["nama"]; $tgl = $data["tgl"]; $aktifitas = $data["aktifitas"]; $query = "UPDATE aktifitas SET nama = '$nama', tgl = '$tgl', aktifitas = '$aktifitas' WHERE id_aktifitas LIKE '$id'"; mysqli_query($conn, $query); return mysqli_affected_rows($conn); } function querycart($query_kedua) { global $conn; $rescart = mysqli_query($conn,$query_kedua); $rows =[]; while ($row = mysqli_fetch_assoc($rescart)) { $rows[]=$row; } return $rows; } function tambah($data) { global $conn; $jenis=htmlspecialchars($data["jenis"]); $warna=htmlspecialchars($data["warna"]); $size=htmlspecialchars($data["size"]); $harga=htmlspecialchars($data["harga"]); $gambar=htmlspecialchars($data["gambar"]); // var_dump($dat); $query= "INSERT INTO barang VALUES ('','$jenis','$warna','$size','$harga','$gambar')"; mysqli_query($conn,$query); return mysqli_affected_rows($conn); } function confirm($id) { global $conn; mysqli_query($conn,"UPDATE cekout SET status = 'Pembayaran Anda Telah Kami Terima. Mohon Tunggu 2-3 Hari Pengiriman Barang. Terimakasih Telah Berbelanja di Morfeen Thirteen.' WHERE idbarang=$id"); return mysqli_affected_rows($conn); } function pemesanan($data) { global $conn; $idcus = $_SESSION["idcus"]; $nama = ($data["nama"]); $daerah = ($data["daerah"]); $alamatlengkap = ($data["alamatlengkap"]); $kodepos =($data["kodepos"]); $email =($data["email"]); $phone =($data["phone"]); $pem= "INSERT INTO pemesanan VALUES ('','$idcus','$nama','$daerah','$alamatlengkap','$kodepos','$email','$phone')"; mysqli_query($conn,$pem); return mysqli_affected_rows($conn); } function confirmuser($id) { global $conn; mysqli_query($conn,"UPDATE cekout SET status = 'Pesanan Selesai' WHERE idbarang=$id"); return mysqli_affected_rows($conn); } function hapus($id) { global $conn; mysqli_query($conn,"DELETE FROM user WHERE id=$id"); return mysqli_affected_rows($conn); } function hapuscart($id) { global $conn; mysqli_query($conn,"DELETE FROM addcart WHERE idadd=$id"); return mysqli_affected_rows($conn); } function hapuscek($id) { global $conn; mysqli_query($conn,"DELETE FROM cekout WHERE idbarang=$id"); return mysqli_affected_rows($conn); } function edit($data) { global $conn; $id =$data ["id"]; $nama =$data["nama"]; $alamat =$data["alamat"]; $notlp =$data["notlp"]; $project =$data["project"]; $salary =$data["salary"]; $start_date =$data["start_date"]; $end_date =$data["end_date"]; $spk =$data["spk"]; $tipe_freelance =$data["tipe_freelance"]; $query="UPDATE freelance SET nama ='$nama', alamat = '$alamat', notlp = '$notlp', project = '$project', salary = '$salary' start_date = '$start_date' end_date = '$end_date' spk = '$spk' tipe_freelance = '$tipe_freelance' WHERE id_freelance = '$id' "; // die($query); mysqli_query($conn,$query); // return mysqli_affected_rows($conn); } function caricart($keyword) { $sql = " SELECT * FROM addcart WHERE jenis LIKE '%$keyword%' OR warna LIKE '%$keyword%' OR size LIKE '%$keyword%' OR harga LIKE '%$keyword%' OR gambar LIKE '%$keyword%' "; // kembalian ke function query dengan parameter $sql return query($sql); //pastikan $keyword pada line 77 terdapat petik satu karena nilai berupa String } function cari($keyword) { $sql = " SELECT * FROM barang WHERE jenis LIKE '%$keyword%' OR warna LIKE '%$keyword%' OR size LIKE '%$keyword%' OR harga LIKE '%$keyword%' OR gambar LIKE '%$keyword%' "; // kembalian ke function query dengan parameter $sql return query($sql); //pastikan $keyword pada line 77 terdapat petik satu karena nilai berupa String } function cart($id) { } // function pemesanan($data) function registrasi($data) { global $conn; $nama = $_POST['nama']; $notlp = $_POST['notlp']; $alamat = $_POST['alamat']; $username = $_POST['username']; $password = md5($_POST['pass']); $email = $_POST['email']; //mysqli_real_escape_string untuk memberikan perlindungan terhadap karakter2 unik (sql_injection) //pada mysqli_real_escape_string terdapat 2 parameter $password=mysqli_real_escape_string($conn,$data["password"]); // $password2=mysqli_real_escape_string($conn,$data["password2"]); //cek username sudah ada atau belum $result=mysqli_query($conn,"SELECT username FROM user WHERE username='$username'"); //cek kondisi jika bernilai true maka cetak echo if(mysqli_fetch_assoc($result)) { echo " <script type='text/javascript'> alert('Username Sudah Ada'); </script> "; //agar proses insertnya gagal return false; } //cek konfirmasi password if($password) { echo " <script type='text/javascript'> alert('Password Anda Tidak Sama'); </script> "; //agar proses insertnya gagal return false; } //enkripsi password //$password=md5($password); // $password=password_hash($password,PASSWORD_DEFAULT); //var_dump($password); //tambahkan user baru ke database // mysqli_query($conn,"INSERT INTO customer VALUES('','$nama','$alamat','$daerah','$username','$password','$password2','$kodepos','$email','$notelp')"); // return mysqli_affected_rows($conn); mysqli_query($conn,"INSERT INTO user VALUES('','$nama','$notlp','$alamat','$username','$password','$password2')"); return mysqli_affected_rows($conn); } function upload() { $nama_file = $_FILES['gambar']['name']; $ukuran_file = $_FILES['gambar']['size']; $error = $_FILES['gambar']['error']; $tmpfile = $_FILES['gambar']['tmp_name']; if($error===4) { //pastikan pada inputan gambar tidak terdapat attribute required echo " <script> alert('Tidak ada gambar yang di upload'); </script> "; return false; } $jenis_gambar=['jpg', 'jpeg', 'gif', 'png']; $pecah_gambar=explode('.', $nama_file); $pecah_gambar=strtolower(end($pecah_gambar)); if(!in_array($pecah_gambar,$jenis_gambar)) { echo " <script> alert('yang Anda upload bukan file gambar'); </script> "; return false; } // cek kapasitas gambar dalam byte. jika 1000000 byte = 1 Megabyte if($ukuran_file > 10000000) { echo " <script> alert('ukuran gambar terlalu besar'); </script> "; return false; } move_uploaded_file($tmpfile, 'image/'. $nama_file); // kita return nama filenya agar dapat masuk ke $gambar=$upload() pada function tambah return $nama_file; }
<?php namespace qpf\htmc\input; class Form { /** * 表单ID * * @var string */ public $id = 'form'; /** * CSS类 * * @var string */ public $class; /** * 表单提交URL * * @var string */ public $action = ''; /** * 表单提交方式 * * @var string */ public $method = [ 'post' => 'POST', 'get' => 'GET' ]; /** * 表单描述 * * @var string */ public $title = null; /** * 是否使用HTML5原生表验证 * * @var boolean */ public $novalidate = null; /** * 设置表单元素是否记录历史 * * @var string on/off 开启或关闭 */ public $autocomplete = null; /** * 表单数据编码类型 * * 适用于 method="post" 的情况! * - application/x-www-form-urlencoded : 默认,发送到服务器之前, * 所有字符都会进行编码(空格转换为 "+" 加号,特殊符号转换为 ASCII HEX 值) * - multipart/form-data : 不对字符编码。在使用包含文件上传控件的表单时,必须使用该值。 * - text/plain : 不对特殊字符进行编码,只会将空格转为加号 * * @var String */ public $enctype = [ 'default' => 'application/x-www-form-urlencoded', 'upload' => 'multipart/form-data', 'NotEncoded' => 'text/plain' ]; /** * 表单提交到的URL页面打开方式 * * - _blank : 在新窗口中打开被链接文档 * - _self : 默认。在相同的框架中打开被链接文档 * - _parent : 在父框架集中打开被链接文档 * - _top : 在整个窗口中打开被链接文档 * * @var string */ public $target = null; /** * 表单数据字符集 * * @var string UTF-8/ISO-8859-1 */ public $acceptCharset = null; }
<?php declare(strict_types=1); namespace App\Http\Api; use App\Http\Api\Entity\ProfileInterface; use App\Http\Api\Factory\ProfileFactory; use App\Http\Api\Factory\ProfileFactoryInterface; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use http\Exception\RuntimeException; class AuthSchApi implements AuthSchApiInterface { private Client $client; private ProfileFactoryInterface $profileFactory; public function __construct( Client $client, ProfileFactory $profileFactory ) { $this->client = $client; $this->profileFactory = $profileFactory; } /** * @throws GuzzleException */ public function getAccessToken(string $authorizationCode): string { $response = $this->client->post( $this->buildAccessTokenUrl($authorizationCode), [ 'form_params' => [ 'code' => $authorizationCode, 'grant_type' => 'authorization_code', ], 'auth' => [ config('auth.sch.client_id'), config('auth.sch.client_key'), ] ] ); $response = json_decode($response->getBody()->getContents(), true); if (!array_key_exists('access_token', $response)) { throw new RuntimeException( 'auth.sch response does not contain access token!' ); } return (string)$response['access_token']; } public function getProfile(string $accessToken): ProfileInterface { $response = $this->client->get( $this->buildProfileUrl($accessToken) ); $response = json_decode($response->getBody()->getContents(), true); return $this->profileFactory->createFromAuthSchResponse($response); } private function buildAccessTokenUrl(string $authorizationCode): string { return self::ENDPOINT_ACCESS_TOKEN; } private function buildProfileUrl(string $accessToken): string { return sprintf( '%s?access_token=%s', self::ENDPOINT_PROFILE, $accessToken ); } }
<?php namespace App\Http\Livewire\Dashboard; use App\Models\Review; use Livewire\Component; class StatReview extends Component { public function render() { $reviews = Review::all(); return view('livewire.dashboard.stat-review', [ 'reviews' => $reviews, ]); } }
<?php namespace admin\modules\tracking\models; use Yii; use yii\web\NotFoundHttpException; use yii\base\Model; use common\models\OrderTracking; /** * SeriesSearch represents the model behind the search form about `common\models\NumberSeries`. */ class FunctionTracking extends Model { public static function CreateTracking($models) { $model = new OrderTracking(); $model->event_date = date('Y-m-d H:i:s'); $model->doc_type = $models['doc_type']; $model->doc_id = $models['doc_id']; $model->doc_no = $models['doc_no']; $model->doc_status = $models['doc_status']; $model->amount = $models['amount']; $model->remark = $models['remark']; $model->ip_address = $_SERVER['REMOTE_ADDR']; $model->lat_long = ''; $model->create_by = Yii::$app->user->identity->id; $model->comp_id = Yii::$app->session->get('Rules')['comp_id']; $model->track_for_table = $models['track_for_table']; $model->track_for_id = $models['track_for_id']; if(!$model->save()) { print_r($model->getErrors()); exit(); } //---LINE NOTIFY--- $cpuLoad = \common\models\Systeminfo::getServerLoad(); if($cpuLoad>=80){ $bot = \common\models\LineBot::findOne(2); $message = 'Warning : CPU '.$cpuLoad.' %'."\r\n"; $message.= "By : [".Yii::$app->user->identity->id."] ".Yii::$app->session->get('Rules')['name']."\r\n"; $message.= "Sale : ".Yii::$app->session->get('Rules')['sale_code']."\r\n"; $message.= "Module : Saleorder [Update : ".$model->id."].".$model->doc_no; $bot->notify_message($message); } //--- /.LINE NOTIFY--- } }
@extends('layouts.app') @section('content') <div class="container"> <ol class="breadcrumb"> <li><a href="/">Home</a></li> <li>Register</li> </ol> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div> <a href="/auth/facebook"> <button type="button"class="btn btn-primary btn-lg btn-block">Facebook Sign In </button> </a> </div> <div>Register in with your Facebook sign in above or use the form below:</div> <div class="panel panel-default"> <div class="panel-heading">Register</div> <div class="panel-body"> <form class="form-horizontal" method="POST" action="{{ route('register') }}"> {{ csrf_field() }} <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> <label for="name" class="col-md-4 control-label">Name</label> <div class="col-md-6"> <input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus> @if ($errors->has('name')) <span class="help-block"> <strong>{{ $errors->first('name') }}</strong> </span> @endif </div> </div> <div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}"> <label for="email" class="col-md-4 control-label">E-Mail Address</label> <div class="col-md-6"> <input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required> @if ($errors->has('email')) <span class="help-block"> <strong>{{ $errors->first('email') }}</strong> </span> @endif </div> </div> <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}"> <label for="password" class="col-md-4 control-label">Password</label> <div class="col-md-6"> <input id="password" type="password" class="form-control" name="password" required> @if ($errors->has('password')) <span class="help-block"> <strong>{{ $errors->first('password') }}</strong> </span> @endif </div> </div> <div class="form-group"> <label for="password-confirm" class="col-md-4 control-label">Confirm Password</label> <div class="col-md-6"> <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required> </div> </div> <div class="form-group"> <label class="col-md-4 control-label"> Subscribe to Newsletter? </label> <div class="col-md-6"> <input type="checkbox" name="is_subscribed"> </div> </div> <div class="form-group"> <label class="col-md-4 control-label{{ $errors->has('terms') ? ' has-error' : '' }}"> <a href="/terms-of-service"> Agree To Terms </a> </label> <div class="col-md-6"> <input type="checkbox" name="terms" required> @if ($errors->has('terms')) <span class="help-block"> <strong>{{ $errors->first('terms') }}</strong> </span> @endif </div> </div> <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> Register </button> </div> </div> </form> </div> </div> </div> </div> </div> @endsection
<?php namespace Fisharebest\Localization\Locale; use Fisharebest\Localization\Territory\TerritoryIn; /** * Class LocaleUrIn * * @author Greg Roach <fisharebest@gmail.com> * @copyright (c) 2015 Greg Roach * @license GPLv3+ */ class LocaleUrIn extends LocaleUr { public function territory() { return new TerritoryIn; } }
<?php // Heading $_['heading_title'] = 'Page non trouvée!'; // Text $_['text_not_found'] = 'La page que vous cherchez n`a pas pu être trouvée! .'; /* Copyright (C) 2016-2017 Apptiko. Created by Apptiko - http://extension.apptiko.com. Time-stamp-code:Sat1117070351 */
@extends('layouts.admin') @section('page') <a class="navbar-brand" href="{{route('admin.index')}}">الرئيسية</a> @endsection @section('content') <div class="row"> <div class="col-lg-12 text-right"> @include('includes.erroralert') @include('includes.succalert') @error('day') <div class="form-group col-12"> <div class="alert-danger col-12 text-dark"> {{$message}} </div> </div> @enderror @error('day.*') <div class="form-group col-12"> <div class="alert-danger col-12 text-dark"> {{$message}} </div> </div> @enderror <div class="card card-chart"> <div class="card-header"> <h5 class="card-category">تعديل يوم</h5> <form method="post" action="{{route('admin.tbDays.doEditDay')}}"> @csrf <div class="form-group col-12"> <label for="exampleFormControlInput1">تاريخ اليوم :</label> <div id="ch_1"> <input type="date" class="form-control" name="day[0]" value="{{$tbday->date}}" id="exampleFormControlInput1"> <input type="hidden" value="{{$tbday -> id}}" name="tb_id"> </div> </div> <div class="form-group col-lg-2 col-md-6 col-sm-12"> <button type="submit" class="form-control btn btn-success">تعديل </button> </div> </form> </div> </div> </div> </div> @endsection
<div class='header ui-widget-header'><?php echo gT("CPDB CSV summary"); ?></div> <div class='messagebox ui-corner-all'> <div class='uploadsummary'> <?php $uploadSummary =''; if (empty($errorinupload)) { $uploadSummary .= "<div class='successheader'>" . gT('Uploaded CSV file successfully') . "</div>"; if ($imported != 0) { $uploadSummary .= "<div class='successheader'>" . gT('Successfully created CPDB entries') . "</div>"; } else { $uploadSummary .= "<div class='warningheader'>" . gT("No new participants were created") . "</div>"; } if (!empty($recordcount)) { $uploadSummary .= "<ul><li>" . sprintf(gT("%s records found in CSV file"), $recordcount) . "</li>"; } if (!empty($mandatory)) { $uploadSummary .= "<li>" . sprintf(gT("%s records have empty mandatory fields"), $mandatory) . "</li>"; } $uploadSummary .= "<li>" . sprintf(gT("%s records met minimum requirements"), $mincriteria) . "</li>"; $uploadSummary .= "<li>" . sprintf(gT("%s new participants were created"), $imported) . "</li>"; if($overwritten > 0) { $uploadSummary .= "<li>".sprintf(gT("%s records were duplicate but had attributes updated"), $overwritten)."</li>"; } $uploadSummary .="</ul>"; if (count($duplicatelist) || count($invalidemaillist) || count($invalidattribute) || count($aInvalidFormatlist)) { $uploadSummary .= "<div class='warningheader'>" . gT('Warnings') . "</div><ul>"; if (count($duplicatelist) > 0) { $uploadSummary .= "<li>" . sprintf(gT("%s were found to be duplicate entries and did not need a new participant to be created."), count($duplicatelist)); if($dupreason == "participant_id") { $uploadSummary .= '<br>'.sprintf(gT("They were found to be duplicate using the participant id field")); } else { $uploadSummary .= "<br>".sprintf(gT("They were found to be duplicate using a combination of firstname, lastname and email fields")); } $uploadSummary .= "<div class='badtokenlist' id='duplicateslist'><ul>"; foreach ($duplicatelist as $data) { $uploadSummary .= "<li>" . $data . "</li>"; } $uploadSummary .= "</ul></div></li>"; } if (count($invalidemaillist) > 0) { $uploadSummary .= "<li style='width: 400px'>" . sprintf(gT("%s records with invalid email address removed"), count($invalidemaillist)); $uploadSummary .= "<div class='badtokenlist' id='invalidemaillist'><ul>"; foreach ($invalidemaillist as $data) { $uploadSummary.= "<li>" . $data . "</li>"; } $uploadSummary .= "</ul></div></li>"; } if (count($invalidattribute) > 0) { $uploadSummary .="<li style='width: 400px'>" . sprintf(gT("%s records have incomplete or wrong attribute values"), count($invalidattribute)); $uploadSummary .="<div class='badtokenlist' id='invalidattributelist' ><ul>"; foreach ($invalidattribute as $data) { $uploadSummary.= "<li>" . $data . "</li>"; } $uploadSummary .= "</ul></div></li>"; } if (count($aInvalidFormatlist) > 0) { $uploadSummary .="<li style='width: 400px'>" . sprintf(gT("%s records where the number of fields does not match"), count($aInvalidFormatlist)); $uploadSummary .="<div class='badtokenlist' id='invalidattributelist' ><ul>"; foreach ($aInvalidFormatlist as $data) { $uploadSummary.= "<li>" . vsprintf(gT('Line %s: Fields found: %s Expected: %s'),explode(',',$data)) . "</li>"; } $uploadSummary .= "</ul></div></li>"; } } } else { $uploadSummary .= "<div class='warningheader'>" . gT('Error') . "</div>"; $uploadSummary .= $errorinupload['error']; } foreach($aGlobalErrors as $sGlobalError) echo "<script> \$notifycontainer.notify('create', 'error-notify', { message:'{$sGlobalError}'});</script>"; $uploadSummary .= "</div></div>"; echo $uploadSummary;
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Offer</title> </head> <body> <div id="app"> <h3>Dear {{$name}},</h3> <p> Recently I send you an offer about Video Management System <br> for custom builders. </p> <p> I want to get you opportunity to test it. </p> <p> I will deploy it on my server and provide you full access to it on 1 week for <strong>absolutely free</strong>. </p> <p> You can answer on this address: info@simon-svirkov.com <br> Or write <a href="https://simon-svirkov.com/contact">here</a>. </p> <br> <hr> Best Regards,<br> Simon <br> simon-svirkov.com <br> info@simon-svirkov.com </div> </body> </html>
<?php use hscstudio\mimin\components\Mimin; use yii\helpers\Html; use yii\helpers\Url; use app\widgets\grid\GridView; use yii\widgets\Pjax; use kartik\export\ExportMenu; use dmstr\widgets\Alert; use yii\bootstrap\Modal; $this->registerCss(' /* Important part */ .modal-dialog{ overflow-y: initial !important } .modal-body{ height: 500px; overflow-y: auto; }'); $js = <<<JS $('#modal').insertAfter($('body')); $("#modal").on("shown.bs.modal",function(event){ var button = $(event.relatedTarget); var href = button.attr("href"); $.pjax.reload("#pjax-modal",{ "timeout" : false, "url" :href, "replace" :false, }); }); JS; $this->registerJs($js); $gridColumns=[['class' => 'yii\grid\SerialColumn'], // 'id_pegawai', // 'id_penilai', [ 'attribute' => 'Nama Pegawai', 'options' => [ 'width' => '120px', ], 'value' => function ($model) { return $model->pegawai->nama_lengkap; } ], 'uraian_tugas', 'angka_kredit', 'kuantitas', 'satuan_kuantitas', 'waktu', 'satuan_waktu', 'biaya', [ 'attribute' => 'status_skp', 'format' => 'raw', 'options' => [], 'value' => function ($data) { if ($data->status_skp == 'Diajukan') { return "<span class='badge badge-pill badge-info'>Diajukan</span>"; } elseif ($data->status_skp == 'Disetujui') { return "<span class='badge badge-pill badge-success'>Disetujui</span>"; } elseif ($data->status_skp == 'Ditolak') { return "<span class='badge badge-pill badge-danger'>Ditolak</span>"; } } ], // 'tahun', [ 'class' => 'app\widgets\grid\ActionColumn', 'options' => [ 'width' => '120px', ], 'contentOptions' => ['class' => 'td-actions text-right'], 'headerOptions' => ['class' => 'text-right'], 'template' => '{lihat}', 'buttons' => [ 'lihat' => function ($url, $model) { if ($model->status_skp == 'Diajukan') { return Html::a( Yii::t('app', '<i class="fa fa-pencil" aria-hidden="true"></i> '), Url::to(['approve', 'id' => $model->id_skp]), [ 'data-toggle' => 'modal', 'data-target' => '#modal', 'class' => 'popupModal', 'id' => 'href' . $model->id_skp, 'title' => 'Approve', 'class' => 'btn btn-info btn-round', ] ); } }, ], ], ]; /* @var $this yii\web\View */ /* @var $searchModel app\models\SasaranKinerjaPegawaiSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Daftar Sasaran Kinerja Pegawai'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="sasaran-kinerja-pegawai-index"> <div class="col-md-12"> <div class="card"> <div class="card-header card-header-rose card-header-icon"> <div class="card-icon"> <i class="material-icons">work</i> </div> <h4 class="card-title"><?= $this->title ?> </h4> </div> <div class="card-body"> <div class="table-responsive"> <?php Pjax::begin(); ?> <?= Alert::widget() ?> <?php echo $this->render('_search', ['model' => $searchModel]);?>; <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumns, ]); ?> </div> </div> </div> </div> </div> <?php Pjax::end(); ?> </div> <?php Modal::begin([ 'id' => 'modal', 'header' => '<h4>Approve SKP</h4>', 'size' =>'modal-lg' ]); Pjax::begin( [ 'id' => 'pjax-modal', 'timeout' => 'false', 'enablePushState' => 'false', 'enableReplaceState' => 'false', ] ); Pjax::end(); ?> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> <?php Modal::end(); ?>
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddHelpsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('helps', function (Blueprint $table) { $table->increments('id'); $table->string('name',40)->unique(); $table->string('video'); $table->text('description')->nullable(); $table->boolean('subtitles')->default(false); $table->integer('user_id')->unsigned()->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('helps'); } }
<!DOCTYPE html> <html> <head> @include('includes.head') </head> <body> <header> @include('includes.header') </header> <div class="container"> <div class="row justify-content-center"> <input type="text" name="search" placeholder="Search Ticket"> <button class="btn btn-primary btn-submit">Submit</button> </div> <div class="row justify-content-center"> <div class="form-template issue-form"> <div id="search_fail""></div> <form id="solution_form"> <div class="form-group"> <label for="name">Ticket ID:</label> <input name="id" type="text" class="form-control" id="ticket_id" disabled> </div> <label for="type">Type Solution here:</label> <div class="form-group"> <textarea name="descirption" id="descirption" rows="5" cols="100"> </textarea> </div> </form> </div> </div> </div> </body> </html> <script type="text/javascript"> $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $(".btn-submit").click(function(e){ e.preventDefault(); var id = $("input[name=search]").val(); $.ajax({ type :'POST', url :'/ticket_result', data :{id:id}, success:function(data){ console.log('ssss', data.data.ticket_id) $('#ticket_id').val(data.data.ticket_id) $('textarea#descirption').val(data.data.solution) }, error: function (reject) { if( reject.status === 403 ) { var errors = reject.responseJSON.message; $("#search_fail").text(errors) } } }); }); </script>
<?php $__env->startSection('page-title'); ?> <?php echo e('Dashboard : '.$subZone->name); ?> <a href="/dashboard-alarms" class="btn-warning btn btn-sm btn-alarm"><i class="fas fa-exclamation-triangle"></i></a> <?php $__env->stopSection(); ?> <?php $__env->startSection('page-icon','chart-bar'); ?> <?php $__env->startSection('page-content'); ?> <nav class="shortcut-menu d-sm-block"> <input type="checkbox" class="menu-open" name="menu-open" id="menu_open" /> <label for="menu_open" class="menu-open-button "> <span class="app-shortcut-icon d-block"></span> </label> <?php if(count($check_point_kpis ) > 0): ?> <a href="javascript:void(0);" data-toggle="modal" data-target=".js-modal-kpi" class="menu-item btn" data-placement="left" title="Ver Kpi"> <i class="fal fa-chart-pie"></i> </a> <?php endif; ?> <a href="#" class="menu-item btn" data-toggle="tooltip" data-placement="left" title="Scroll Top"> <i class="fal fa-arrow-up"></i> </a> </nav> <style> .progress-bar-vertical { width: 80%; margin: auto; min-height: 140px; display: flex; align-items: flex-end; border-radius: 5px !important; } .progress-bar-vertical .progress-bar { width: 100%; height: 0; -webkit-transition: height 0.6s ease; -o-transition: height 0.6s ease; transition: height 0.6s ease; } <?php if(Sentinel::getUser()->hasAccess('dashboard.control-mode')): ?> <?php echo $__env->make('water-management.dashboard.partials.output-css', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </style> <div class="row" id="dashboard-content"> </div> <?php if(count($check_point_kpis ) > 0): ?> <div class="modal fade js-modal-kpi" tabindex="-1" role="dialog" id="modal-kpi" aria-hidden="true"> <div class="modal-dialog modal-dialog-right modal-md"> <div class="modal-content h-100"> <div class="dropdown-header bg-primary d-flex align-items-center w-100 py-3"> <h4 class="text-white">KPI</h4> <button type="button" class="close text-white position-absolute pos-top pos-right p-2 m-1 mr-2" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true"><i class="fal fa-times"></i></span> </button> </div> <div class="modal-body h-100 p-4" id="kpi-container"> <?php $__currentLoopData = $check_point_kpis; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $kpi): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="row mb-4"> <?php echo $__env->make('water-management.dashboard.partials.kpi.cost-kpi', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> </div> </div> <?php endif; ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('more-scripts'); ?> <?php echo includeScript([ 'plugins/highcharts/highcharts.js', 'plugins/highcharts/modules/exporting.js', ]); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('page-extra-scripts'); ?> <script> $('.btn-alarm').hide(); Highcharts.setOptions({ global: { useUTC: false }, lang: { decimalPoint: ',', thousandsSep: '' } }); getDashboardContent(); function activeAndNotAccused(device) { $('.btn-alarm').show(); $.get('/setAlarmAccused/'+device); } function getDashboardContent() { $.get('/getDashboardContent/<?php echo e($subZone->id); ?>',function(data){ $('#dashboard-content').html(data); }); } setInterval(function(){ getDashboardContent(); },10000); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /shared/httpd/erm/resources/views/water-management/dashboard/views/sub-zone.blade.php ENDPATH**/ ?>
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Section extends Model { use HasFactory; public const PSYCHOSOCIAL = 1; public const HOUSING = 2; public function referrals() { return $this->belongstoMany(Referral::class, 'referral_sections', 'referral_id', 'section_id') ->withPivot(['assigned_worker_id', 'direct_beneficiary_id', 'current_status_id']) ->using(ReferralSection::class); } }
<html> <head> <!--Load the AJAX API--> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> // Load the Visualization API and the corechart package. google.charts.load('current', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.charts.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { var PieChartData='<?php echo $PieChartData;?>'; // Create the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Topping'); data.addColumn('number', 'Slices'); data.addRows(JSON.parse(PieChartData)); // Set chart options var options = {'title':'perbandingan Luas Lahan antar Kebun , Perkebunan dan Hutan Rakyat ', 'width':750, 'height':400}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <!--Div that will hold the pie chart--> <div id="chart_div"></div> </body> </html>
@extends('app') @section('content') <div id="crud" class="row"> <div class="col-sm-12"> <h1 class="page-header">CRUD LARAVEL y VUEjs</h1> </div> <div class="col-sm-7"> <a href="#" class="btn btn-primary pull-right" data-toggle="modal" data-target="#create"> Nueva Tarea </a> <table class="table table-striped table-hover"> <thead> <tr> <th>Id</th> <th>Tarea</th> <th> &nbsp; </th> </tr> </thead> <tbody> <tr v-for="keep in keeps"> <td width="10px">@{{ keep.id }}</td> <td>@{{ keep.keep }}</td> <td width="10px"> <a href="#" class="btn btn-warning btn-sm" v-on:click.prevent="editKeep(keep)">Editar</a> </td> <td width="10px"> <a href="#" class="btn btn-danger btn-sm" v-on:click.prevent="deleteKeep(keep)">Eliminar</a> </td> </tr> </tbody> </table> @include('create') @include('edit') </div> <div class="col-sm-5"> <pre> @{{ $data }} </pre> </div> </div> @endsection
<?php /* * Created on 2016-5-19 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class action extends app { public function display() { $action = $this->ev->url(3); $search = $this->ev->get('search'); $this->u = ''; if($search) { $this->tpl->assign('search',$search); foreach($search as $key => $arg) { $this->u .= "&search[{$key}]={$arg}"; } } $this->tpl->assign('search',$search); if(!method_exists($this,$action)) $action = "index"; $this->$action(); exit; } private function setdochistory() { if($this->ev->get('setdochistory')) { if($this->ev->get('action') == 'delete') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->delDocHistory($key); } } elseif($this->ev->get('action') == 'pass') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDocHistory($key,array('dhstatus' => 1)); } } elseif($this->ev->get('action') == 'unpass') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDocHistory($key,array('dhstatus' => 2)); } } elseif($this->ev->get('action') == 'waitpass') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDocHistory($key,array('dhstatus' => 0)); } } $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "reload" ); exit(json_encode($message)); } elseif($this->ev->get('action') == 'nowuse') { $dhid = $this->ev->get('dhid'); $history = $this->doc->getDocHistroyById($dhid); $this->doc->modifyDoc($history['dhdocid'],array('doccontentid' => $dhid)); $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "reload" ); exit(json_encode($message)); } else { $message = array( 'statusCode' => 300, "message" => "无效访问" ); exit(json_encode($message)); } } private function history() { $docid = $this->ev->get('docid'); $page = $this->ev->get('page'); $doc = $this->doc->getDocById($docid,false); $args = array(); $args[] = array("AND","dhdocid = :dhdocid","dhdocid",$docid); $histories = $this->doc->getDocHistoryListByArgs($args,$page); $this->tpl->assign('doc',$doc); $this->tpl->assign('histories',$histories); $this->tpl->display('docs_history'); } private function catsmenu() { $catid = $this->ev->get('catid'); $categories = $this->category->getAllCategory(); $r = array(); $this->category->selected = $catid; $this->category->hrefpre = 'index.php?docs-master-docs&catid='; $this->category->levelCategory($r,0,$this->category->tidycategories); $this->category->resetCategoryIndex($r); echo 'var treeData = '.json_encode($r); exit(); } private function add() { if($this->ev->get('submit')) { $args = $this->ev->get('args'); $args['docusername'] = $this->_user['sessionusername']; $args['docinputtime'] = TIME; $args['docneedmore'] = 1; $id = $this->doc->addDoc($args); $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "index.php?docs-master-docs&catid={$args['doccatid']}" ); exit(json_encode($message)); } else { $catid = intval($this->ev->get('catid')); $parentcat = $this->category->getCategoriesByArgs(array(array("AND","catparent = 0"))); $this->tpl->assign('parentcat',$parentcat); $this->tpl->assign('catid',$catid); $this->tpl->display('docs_add'); } } private function edit() { $page = intval($this->ev->get('page')); $docid = intval($this->ev->get('docid')); $doc = $this->doc->getDocById($docid,false); if($this->ev->get('submit')) { $args = $this->ev->get('args'); $args['docmodifytime'] = TIME; unset($args['doccatid']); $this->doc->modifyDoc($docid,$args); $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "index.php?docs-master-docs&catid={$doc['doccatid']}&page={$page}{$this->u}" ); exit(json_encode($message)); } else { $catid = intval($this->ev->get('catid')); $cat = $this->category->getCategoryById($catid); $this->tpl->assign('catid',$catid); $this->tpl->assign('cat',$cat); $this->tpl->assign('docid',$docid); $this->tpl->assign('doc',$doc); $this->tpl->assign('page',$page); $this->tpl->display('docs_edit'); } } private function del() { $page = intval($this->ev->get('page')); $docid = intval($this->ev->get('docid')); $doc = $this->doc->getDocById($docid); if($doc) $this->doc->delDoc($docid); $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "reload" ); exit(json_encode($message)); } private function lite() { $catid = $this->ev->get('catid'); $page = $this->ev->get('page'); $this->tpl->assign('catid',$catid); $this->tpl->assign('page',$page); if($this->ev->get('modifycontentsequence')) { if($this->ev->get('action') == 'delete') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->delDoc($key); } } elseif($this->ev->get('action') == 'move') { $docids = array(); $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { if($key)$docids[] = $key; } $docids = implode(',',$docids); $parentcat = $this->category->getCategoriesByArgs(array(array("AND","catparent = 0"))); $this->tpl->assign('parentcat',$parentcat); $this->tpl->assign('docids',$docids); $this->tpl->display('docs_move'); exit; } elseif($this->ev->get('action') == 'more') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docneedmore' => 1)); } } elseif($this->ev->get('action') == 'unmore') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docneedmore' => 0)); } } elseif($this->ev->get('action') == 'top') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docistop' => 1)); } } elseif($this->ev->get('action') == 'untop') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docistop' => 0)); } } elseif($this->ev->get('action') == 'lock') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docsyslock' => 1)); } } elseif($this->ev->get('action') == 'unlock') { $ids = $this->ev->get('delids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docsyslock' => 0)); } } else { $ids = $this->ev->get('ids'); foreach($ids as $key => $id) { $this->doc->modifyDoc($key,array('docsequence' => $id)); } } $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "index.php?docs-master-docs&catid={$catid}&page={$page}{$u}" ); exit(json_encode($message)); } elseif($this->ev->get('movecategory')) { $docids = explode(',',$this->ev->get('docids')); $targetcatid = $this->ev->get('targetcatid'); if($targetcatid) { foreach($docids as $key => $id) { if($id)$this->doc->modifyDoc($id,array('doccatid' => $targetcatid)); } $message = array( 'statusCode' => 200, "message" => "操作成功", "callbackType" => "forward", "forwardUrl" => "index.php?docs-master-docs&catid={$catid}&page={$page}{$u}" ); } else $message = array( 'statusCode' => 300, "message" => "操作失败" ); exit(json_encode($message)); } else { $message = array( 'statusCode' => 300, "message" => "无效访问" ); exit(json_encode($message)); } } private function index() { $search = $this->ev->get('search'); $catid = intval($this->ev->get('catid')); $page = intval($this->ev->get('page')); $page = $page?$page:1; if(!$catid)$catid = $search['doccatid']; $categories = $this->category->getAllCategory(); $parentcat = $this->category->getCategoriesByArgs(array(array("AND","catparent = 0"),array("AND","catapp = 'docs'"))); if($catid) { $childstring = $this->category->getChildCategoryString($catid); $args = array(array("AND","find_in_set(doccatid,:doccatid)",'doccatid',$childstring)); } else $args = array(); if($search['docid']) { $args[] = array("AND","docid = :docid",'docid',$search['docid']); } else { if($search['doccatid'])$args[] = array("AND","doccatid = :doccatid",'doccatid',$search['doccatid']); if($search['stime'])$args[] = array("AND","docinputtime >= :sdocinputtime",'sdocinputtime',strtotime($search['stime'])); if($search['etime'])$args[] = array("AND","docinputtime <= :edocinputtime",'edocinputtime',strtotime($search['etime'])); if($search['keyword'])$args[] = array("AND","doctitle LIKE :doctitle",'doctitle',"%{$search['keyword']}%"); if($search['docneedmore']) { if($search['docneedmore'] == '-1')$nm = 0; else $nm = 1; $args[] = array("AND","docneedmore = :docneedmore",'docneedmore',$nm); } if($search['docistop']) { if($search['docistop'] == '-1')$top = 0; else $top = 1; $args[] = array("AND","docistop = :docistop",'docistop',$top); } if($search['docsyslock']) { if($search['docsyslock'] == '-1')$lock = 0; else $lock = 1; $args[] = array("AND","docsyslock = :docsyslock",'docsyslock',$lock); } } $catlevel = 1; if($catid) { $pos = $this->category->getCategoryPos($catid); if(count($pos)) $catlevel = count($pos) + 1; } $this->tpl->assign('catlevel',$catlevel); $docs = $this->doc->getDocList($args,$page,10); $this->tpl->assign('catid',$catid); $this->tpl->assign('docs',$docs); $this->tpl->assign('parentcat',$parentcat); $this->tpl->assign('categories',$categories); $this->tpl->assign('page',$page); $this->tpl->display('docs'); } } ?>
<?php namespace App\Entity; use ApiPlatform\Core\Annotation\ApiFilter; use ApiPlatform\Core\Annotation\ApiResource; use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter; use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; use App\Filter\CustomerNameOrCompanyFilter; use DateTime; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Serializer\Annotation\Groups as SerializerGroups; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity(repositoryClass="App\Repository\InvoiceRepository") * @ApiResource( * attributes={ * "pagination_enabled"=true, * "pagination_items_per_page"=20, * "order"={"sentAt"="desc"}, * }, * normalizationContext={ * "groups"={"invoice_read"} * }, * subresourceOperations={ * "api_customers_invoices_read_subresource"={ * "normalization_context"={ * "groups"={"invoice_read_as_subresource"} * } * } * } * ) * @ApiFilter(SearchFilter::class, properties={ * "customer.firstName": "start", * "customer.lastName": "start", * "customer.company": "start" * }) * @ApiFilter(OrderFilter::class, properties={"amount", "sentAt"}) * @ApiFilter(CustomerNameOrCompanyFilter::class, strategy="start") */ class Invoice { /** * @var int * * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") * @SerializerGroups({"invoice_read", "customer_read", "invoice_read_as_subresource"}) */ private $id; /** * @var float * * @ORM\Column(type="float") * @SerializerGroups({"invoice_read", "customer_read", "invoice_read_as_subresource"}) * @Assert\NotBlank(message="form_errors.global.not_blank") * @Assert\PositiveOrZero() */ private $amount; /** * @var DateTime * * @ORM\Column(type="datetime") * @SerializerGroups({"invoice_read", "customer_read", "invoice_read_as_subresource"}) * @Assert\DateTime(message="form_errors.global.valid_date") * @Assert\NotBlank(message="form_errors.global.not_blank") */ private $sentAt; /** * @var string * * @ORM\Column(type="string", length=255) * @SerializerGroups({"invoice_read", "customer_read", "invoice_read_as_subresource"}) * @Assert\Choice({"SENT", "CANCELLED", "PAID"}) * @Assert\NotBlank(message="form_errors.global.not_blank") */ private $status; /** * @var Customer * * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="invoices") * @ORM\JoinColumn(nullable=false) * @SerializerGroups({"invoice_read", "invoice_read_as_subresource"}) * @Assert\NotBlank(message="form_errors.global.not_blank") */ private $customer; /** * @var int|null * * @ORM\Column(type="integer", nullable=true) * @SerializerGroups({"invoice_read", "customer_read", "invoice_read_as_subresource"}) */ private $chrono; /** * @SerializerGroups({"invoice_read", "invoice_read_as_subresource"}) * @return User */ public function getUser(): User { return $this->getCustomer()->getUser(); } /** * @return int|null */ public function getId(): ?int { return $this->id; } /** * @return float|null */ public function getAmount(): ?float { return $this->amount; } /** * @param float $amount * @return $this */ public function setAmount(float $amount): self { $this->amount = $amount; return $this; } /** * @return DateTime|null */ public function getSentAt(): ?DateTime { return $this->sentAt; } /** * @param DateTime $sentAt * @return $this */ public function setSentAt(DateTime $sentAt): self { $this->sentAt = $sentAt; return $this; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string $status * @return $this */ public function setStatus(string $status): self { $this->status = $status; return $this; } /** * @SerializerGroups({"invoice_read", "invoice_read_as_subresource"}) * @return Customer|null */ public function getCustomer(): ?Customer { return $this->customer; } /** * @param Customer $customer * @return $this */ public function setCustomer(Customer $customer): self { $this->customer = $customer; return $this; } /** * @return int|null */ public function getChrono(): ?int { return $this->chrono; } /** * @param int|null $chrono * @return $this */ public function setChrono(?int $chrono): self { $this->chrono = $chrono; return $this; } }
<?php /* TwigBundle:Exception:exception.atom.twig */ class __TwigTemplate_7eaaadad3847bc92b3427f0e98047ad88bca6f1ddf7c218322347172660e85c4 extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo twig_include($this->env, $context, "@Twig/Exception/exception.xml.twig", array("exception" => ($context["exception"] ?? null))); echo " "; } public function getTemplateName() { return "TwigBundle:Exception:exception.atom.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 19 => 1,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Twig_Source("", "TwigBundle:Exception:exception.atom.twig", "/home/houssem/myApp/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.atom.twig"); } }
<?php namespace App\Notifications\Auca; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\Lang; use Illuminate\Support\Facades\Config; use Illuminate\Notifications\Notification; use Illuminate\Notifications\Messages\MailMessage; class AucaVerifyEmail extends Notification { /** * The callback that should be used to build the mail message. * * @var \Closure|null */ public static $toMailCallback; /** * Get the notification's channels. * * @param mixed $notifiable * @return array|string */ public function via($notifiable) { return ['mail']; } /** * Build the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { if (static::$toMailCallback) { return call_user_func(static::$toMailCallback, $notifiable); } return (new MailMessage) ->subject(Lang::getFromJson('Verify Email Address')) ->line(Lang::getFromJson('Please click the button below to verify your email address.')) ->action( Lang::getFromJson('Verify Email Address'), $this->verificationUrl($notifiable) ) ->line(Lang::getFromJson('If you did not create an account, no further action is required.')); } /** * Get the verification URL for the given notifiable. * * @param mixed $notifiable * @return string */ protected function verificationUrl($notifiable) { return URL::temporarySignedRoute( 'auca.verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), ['id' => $notifiable->getKey()] ); } /** * Set a callback that should be used when building the notification mail message. * * @param \Closure $callback * @return void */ public static function toMailUsing($callback) { static::$toMailCallback = $callback; } }
@extends('layouts.app') @section('search', route('users.search')) @section('delete', route('users.destroy', $user->id)) @section('header') <div class="row align-items-center py-4"> <div class="col-7 col-lg-6"> <h6 class="h2 text-white d-inline-block mb-0">Users</h6> <nav aria-label="breadcrumb" class="d-none d-md-inline-block ml-md-4"> <ol class="breadcrumb breadcrumb-links breadcrumb-dark"> <li class="breadcrumb-item"><a href="{{ route('dashboard') }}"><i class="ni ni-tv-2"></i></a></li> <li class="breadcrumb-item">Maintenance</li> <li class="breadcrumb-item"><a href="{{ route('users.index') }}">Users</a></li> <li class="breadcrumb-item active" aria-current="page">Show</li> </ol> </nav> </div> <div class="col-5 col-lg-6 text-right"> <a href="{{ route('users.create') }}" class="btn btn-sm btn-neutral loading">Add</a> <a href="{{ route('users.edit', $user->id) }}" class="btn btn-sm btn-neutral loading">Edit</a> <button data-toggle="modal" data-target="#delete" class="btn btn-sm btn-neutral">Delete</button> <a href="{{ route('users.index') }}" class="btn btn-sm btn-neutral loading">Show All</a> </div> </div> @endsection @section('content') <div class="card"> <div class="card-header"> <div class="row align-items-center"> <div class="col-8"> <h3 class="mb-0">Show Record</h3> </div> </div> </div> <div class="card-header border-0"> <div class="container"> <div class="row"> <div class="form-group col-md-6"> <label>User Name</label> <input type="text" class="form-control" value="{{ $user->username }}" readonly /> </div> <div class="form-group col-md-6"> <label>Password</label> <input type="password" class="form-control" value="{{ $user->password }}" readonly /> </div> </div> <div class="row"> <div class="form-group col-md-12"> <label>Full Name</label> <input type="text" class="form-control" value="{{ $user->full_name }}" readonly /> </div> </div> <div class="row"> <div class="form-group col-md-6"> <label>Branch</label> <input type="text" class="form-control" value="{{ $user->branch->branch_name }}" readonly /> </div> <div class="form-group col-md-6"> <label>Role</label> <input type="text" class="form-control" value="{{ $user->user_role->role_name }}" readonly /> </div> </div> </div> </div> @endsection
<?php class Test extends CI_Controller { public function index() { $this->readExcel(); } public function readExcel(){ $this->load->library('excel'); $objReader = PHPExcel_IOFactory::load('assets/upload/classs.xls'); $sheetData = $objReader->getActiveSheet()->toArray(true,true,true,true); echo "<table border=1>"; $sec = 0; $sec_temp = 0; foreach ($sheetData as $data) { //if (preg_match('/\bare\b/',$a)); if (strpos($data['B'], 'รหัสวิชา') !== false) { //echo $data['B'].'<br> '; $sec = substr($data['B'], strlen($data['B'])-1,1); //echo 'Sec = '.$sec.'<br>'; $code = substr($data['B'],26,6); //echo 'Sub Code = '.$code.'<br>'; $credit = substr(substr($data['B'],strpos($data['B'], 'หน่วยกิต'),27),24,4); //echo 'Credit = '.$credit.'<br>'; $s_name = str_replace("หน่วยกิต","",substr(substr($data['B'],strpos($data['B'],$code),strpos($data['B'], 'หน่วยกิต')),8)); //echo 'S Name = '.$s_name.'<br>'; if($sec == 5){ //echo "peerasak"; echo "Sec = ".$sec; if (strpos($data['H'], 'ผู้สอน') !== false) { echo $data['H'].'<br>'; } if (strpos($data['C'], 'รหัสประจำตัว') !== false) { echo $data['C'].'<br>'; } if (strpos($data['D'], 'นาย') !== false || strpos($data['D'], 'นางสาว') !== false) { echo $data['D'].'<br>'; } } } // if (strpos($data['H'], 'ผู้สอน') !== false) { // echo $data['H'].'<br>'; // } // if (strpos($data['H'], 'ผู้สอน') !== false) { // echo $data['H'].'<br>'; // } // print_r ($data); echo "<tr>"; //$this->writeColumn($data['A']); $this->writeColumn($data['B']); $this->writeColumn($data['C']); $this->writeColumn($data['D']); $this->writeColumn($data['E']); $this->writeColumn($data['F']); //$this->writeColumn($data['G']); $this->writeColumn($data['H']); $this->writeColumn($data['I']); $this->writeColumn($data['J']); echo "</tr>"; } echo "</table>"; } public function writeColumn($data){ echo "<td>$data</td>"; } } ?>
<?php class Kwc_Articles_Detail_QuestionsAnswers_Component extends Kwc_Abstract_List_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwf('Questions and answers'); $ret['generators']['child']['component'] = 'Kwc_Articles_Detail_QuestionsAnswers_SwitchDisplay_Component'; return $ret; } }
<?php declare(strict_types=1); namespace Vinnia\Shipping; use DateTimeInterface; class CancelPickupRequest { public string $id; public string $service; public Address $requestorAddress; public Address $pickupAddress; public DateTimeInterface $date; public string $locationCode; public function __construct( string $id, string $service, Address $requestorAddress, Address $pickupAddress, DateTimeInterface $date, string $locationCode = '' ) { $this->id = $id; $this->service = $service; $this->requestorAddress = $requestorAddress; $this->pickupAddress = $pickupAddress; $this->date = $date; $this->locationCode = $locationCode; } }
<?php /** * This file has been @generated by a phing task by {@link BuildMetadataPHPFromXml}. * See [README.md](README.md#generating-data) for more information. * * Pull requests changing data in these files will not be accepted. See the * [FAQ in the README](README.md#problems-with-invalid-numbers] on how to make * metadata changes. * * Do not modify this file directly! */ return array ( 'generalDesc' => array ( 'NationalNumberPattern' => '(?:[3-59]\\d|77|88)\\d{7}', 'PossibleLength' => array ( 0 => 9, ), 'PossibleLengthLocalOnly' => array ( 0 => 3, 1 => 5, 2 => 6, 3 => 7, ), ), 'fixedLine' => array ( 'NationalNumberPattern' => '(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}', 'ExampleNumber' => '372123456', 'PossibleLength' => array ( ), 'PossibleLengthLocalOnly' => array ( 0 => 3, 1 => 5, 2 => 6, 3 => 7, ), ), 'mobile' => array ( 'NationalNumberPattern' => '41[18]\\d{6}|(?:5[05]|77|88|9[0-35-9])\\d{7}', 'ExampleNumber' => '917123456', 'PossibleLength' => array ( ), 'PossibleLengthLocalOnly' => array ( ), ), 'tollFree' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'premiumRate' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'sharedCost' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'personalNumber' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'voip' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'pager' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'uan' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'voicemail' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'noInternationalDialling' => array ( 'PossibleLength' => array ( 0 => -1, ), 'PossibleLengthLocalOnly' => array ( ), ), 'id' => 'TJ', 'countryCode' => 992, 'internationalPrefix' => '810', 'preferredInternationalPrefix' => '8~10', 'nationalPrefix' => '8', 'nationalPrefixForParsing' => '8', 'sameMobileAndFixedLinePattern' => false, 'numberFormat' => array ( 0 => array ( 'pattern' => '(\\d{6})(\\d)(\\d{2})', 'format' => '$1 $2 $3', 'leadingDigitsPatterns' => array ( 0 => '331', 1 => '3317', ), 'nationalPrefixFormattingRule' => '', 'domesticCarrierCodeFormattingRule' => '', 'nationalPrefixOptionalWhenFormatting' => true, ), 1 => array ( 'pattern' => '(\\d{3})(\\d{2})(\\d{4})', 'format' => '$1 $2 $3', 'leadingDigitsPatterns' => array ( 0 => '[34]7|91[78]', ), 'nationalPrefixFormattingRule' => '', 'domesticCarrierCodeFormattingRule' => '', 'nationalPrefixOptionalWhenFormatting' => true, ), 2 => array ( 'pattern' => '(\\d{4})(\\d)(\\d{4})', 'format' => '$1 $2 $3', 'leadingDigitsPatterns' => array ( 0 => '3', ), 'nationalPrefixFormattingRule' => '', 'domesticCarrierCodeFormattingRule' => '', 'nationalPrefixOptionalWhenFormatting' => true, ), 3 => array ( 'pattern' => '(\\d{2})(\\d{3})(\\d{4})', 'format' => '$1 $2 $3', 'leadingDigitsPatterns' => array ( 0 => '[457-9]', ), 'nationalPrefixFormattingRule' => '', 'domesticCarrierCodeFormattingRule' => '', 'nationalPrefixOptionalWhenFormatting' => true, ), ), 'intlNumberFormat' => array ( ), 'mainCountryForCode' => false, 'leadingZeroPossible' => false, 'mobileNumberPortableRegion' => false, );
<?php namespace App\Http\Controllers; use App\Models\Bank; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class BankController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { if ($is_active == 'active') { $bank = DB::table('users') ->where('is_active', '=', 1) ->orderBy('id') ->paginate(10); } elseif ($is_active == 'inactive') { $bank = DB::table('users') ->where('is_active', '=', 0) ->orderBy('id') ->paginate(10); } else { $users = DB::table('users') ->orderBy('id') ->paginate(10); } $bank = DB::table('banks') ->where('is_active', '=', 1) ->paginate(10); if (!$bank || $bank->isEmpty()) { $response = [ "code" => 404, "message" => "Data Not Found!", "data" => $bank, ]; } else { $response = [ "code" => 200, "message" => "Succefully Retrieved", "data" => $bank, ]; } return response($response); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $fields = $request->validate([ 'bank_code' => 'required|string|unique:banks,bank_code', 'bank_name' => 'required|string|unique:banks,bank_name', 'bank_account' => 'required|string|unique:banks,bank_account', 'bank_location' => 'required|string', 'is_active' => 'required', ]); $new_bank = Bank::create([ 'bank_code' => $fields['bank_code'] , 'bank_name' => $fields['bank_name'] , 'bank_account' => $fields['bank_account'] , 'bank_location' => $fields['bank_location'] , 'is_active' => $fields['is_active'], ]); return [ $response = [ "code" => 200, "message" => "Succefully Created", "data" => $new_bank, ], ]; } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $result = Bank::find($id); if (!$result) { $response = [ "code" => 404, "message" => "Data Not Found!", "data" => $result, ]; } else { $response = [ "code" => 200, "message" => "Succefully Retrieved", "data" => $result, ]; } return response($response); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $specific_bank = Bank::find($id); if (!$specific_bank) { $response = [ "code" => 404, "message" => "Data Not Found!", "data" => $specific_bank, ]; } else { $specific_bank->bank_code = $request->get('bank_code'); $specific_bank->bank_name = $request->get('bank_name'); $specific_bank->bank_account = $request->get('bank_account'); $specific_bank->bank_location = $request->get('bank_location'); $specific_bank->save(); $response = [ "code" => 200, "message" => "Succefully Updated", "data" => $specific_bank, ]; } return response($response); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } #_________________________SPECIAL CASE________________________________ /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function archive(Request $request, $id) { $specific_bank = Bank::find($id); if (!$specific_bank) { $response = [ "code" => 404, "message" => "Data Not Found!", "data" => $specific_bank, ]; } else { $specific_bank->is_active = 0; $specific_bank->save(); $response = [ "code" => 200, "message" => "Succefully Archieved", "data" => $specific_bank, ]; } return response($response); } public function search(Request $request) { $value = $request['value']; $result = Bank::where('bank_code', 'like', '%' . $value . '%') ->orWhere('bank_name', 'like', '%' . $value . '%') ->orWhere('bank_account', 'like', '%' . $value . '%') ->orWhere('bank_location', 'like', '%' . $value . '%') ->get(); if ($result->isEmpty()) { $response = [ "code" => 404, "message" => "Data Not Found!", "data" => $result, ]; } else { $response = [ "code" => 200, "message" => "Succefully Retrieved", "data" => $result, ]; } return response($response); } }
<?php namespace backend\controllers; use Yii; use common\models\TransaksiInfrastruktur; use backend\models\TransaksiInfrastrukturSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; /** * TransaksiInfrastrukturController implements the CRUD actions for TransaksiInfrastruktur model. */ class TransaksiInfrastrukturController extends Controller { /** * {@inheritdoc} */ public function behaviors() { return [ 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['post'], 'bulkdelete' => ['post'], 'approve' => ['post'], ], ], ]; } /** * Lists all TransaksiInfrastruktur models. * @return mixed */ public function actionIndex() { $searchModel = new TransaksiInfrastrukturSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); } public function actionApprove($id) { $model = $this->findModel($id); if ($model->approve == $model::STATUS_NOT_APPROVED) { $model->approve = $model::STATUS_APPROVED; } else { $model->approve = $model::STATUS_NOT_APPROVED; } if ($model->save()) { Yii::$app->session->setFlash('success', 'Data berhasil diapprove.'); } else { Yii::$app->session->setFlash('error', 'Data gagal diapprove.'); } return $this->redirect(['index']); } /** * Displays a single TransaksiInfrastruktur model. * @param integer $id * @return mixed * @throws NotFoundHttpException if the model cannot be found */ public function actionView($id) { $model = TransaksiInfrastruktur::find() ->joinWith(['user', 'jenis', 'wilayah', 'status']) ->where(['transaksi_infrastruktur.id' => $id]) ->one(); return $this->render('view', [ 'model' => $this->findModel($id), ]); } /** * Creates a new TransaksiInfrastruktur model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new TransaksiInfrastruktur(); if ($model->load(Yii::$app->request->post())) { $model->id_user = Yii::$app->user->id; $model->tanggal = date('Y-m-d'); if ($model->save()) { return $this->redirect(['view', 'id' => $model->id]); } } return $this->render('create', [ 'model' => $model, ]); } /** * Updates an existing TransaksiInfrastruktur model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id * @return mixed * @throws NotFoundHttpException if the model cannot be found */ public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } return $this->render('update', [ 'model' => $model, ]); } /** * Deletes an existing TransaksiInfrastruktur model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed * @throws NotFoundHttpException if the model cannot be found */ public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['index']); } /** * Finds the TransaksiInfrastruktur model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return TransaksiInfrastruktur the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = TransaksiInfrastruktur::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); } }
<?php namespace App\Modules\SpaceAllocation\Models; use App\Libraries\CommonFunction; use Illuminate\Database\Eloquent\Model; class EmployeeDetails extends Model { protected $table = 'space_emp_details'; protected $fillable = array( 'id', 'type_id', 'reg_id', 'year', 'it_managerial', 'it_skilled', 'it_unskilled', 'it_total', 'ss_managerial', 'ss_skilled', 'ss_unskilled', 'ss_total', 'grand_total', 'status', 'is_archive', 'created_at', 'created_by', 'updated_at', 'updated_by' ); public static function boot() { parent::boot(); static::creating(function($post) { $post->created_by = CommonFunction::getUserId(); $post->updated_by = CommonFunction::getUserId(); }); static::updating(function($post) { $post->updated_by = CommonFunction::getUserId(); }); } /** * @return application list */ /* * *****************************End of Model Class********************************** */ }
<?php /* * Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace JMS\SerializerBundle\DependencyInjection; use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension; use Symfony\Component\DependencyInjection\Alias; use JMS\Serializer\Exception\RuntimeException; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class JMSSerializerExtension extends ConfigurableExtension { public function loadInternal(array $config, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(array( __DIR__.'/../Resources/config/'))); $loader->load('services.xml'); // Built-in handlers. $container->getDefinition('jms_serializer.datetime_handler') ->addArgument($config['handlers']['datetime']['default_format']) ->addArgument($config['handlers']['datetime']['default_timezone']) ->addArgument($config['handlers']['datetime']['cdata']) ; // property naming $container ->getDefinition('jms_serializer.camel_case_naming_strategy') ->addArgument($config['property_naming']['separator']) ->addArgument($config['property_naming']['lower_case']) ; if ($config['property_naming']['enable_cache']) { $container ->getDefinition('jms_serializer.cache_naming_strategy') ->addArgument(new Reference((string) $container->getAlias('jms_serializer.naming_strategy'))) ; $container->setAlias('jms_serializer.naming_strategy', 'jms_serializer.cache_naming_strategy'); } $bundles = $container->getParameter('kernel.bundles'); // metadata if ('none' === $config['metadata']['cache']) { $container->removeAlias('jms_serializer.metadata.cache'); } elseif ('file' === $config['metadata']['cache']) { $container ->getDefinition('jms_serializer.metadata.cache.file_cache') ->replaceArgument(0, $config['metadata']['file_cache']['dir']) ; $dir = $container->getParameterBag()->resolveValue($config['metadata']['file_cache']['dir']); if (!file_exists($dir)) { if (!$rs = @mkdir($dir, 0777, true)) { throw new RuntimeException(sprintf('Could not create cache directory "%s".', $dir)); } } } else { $container->setAlias('jms_serializer.metadata.cache', new Alias($config['metadata']['cache'], false)); } if ($config['metadata']['infer_types_from_doctrine_metadata'] === false) { $container->setParameter('jms_serializer.infer_types_from_doctrine_metadata', false); } $container ->getDefinition('jms_serializer.metadata_factory') ->replaceArgument(2, $config['metadata']['debug']) ; // directories $directories = array(); if ($config['metadata']['auto_detection']) { foreach ($bundles as $name => $class) { $ref = new \ReflectionClass($class); $directories[$ref->getNamespaceName()] = dirname($ref->getFileName()).'/Resources/config/serializer'; } } foreach ($config['metadata']['directories'] as $directory) { $directory['path'] = rtrim(str_replace('\\', '/', $directory['path']), '/'); if ('@' === $directory['path'][0]) { $bundleName = substr($directory['path'], 1, strpos($directory['path'], '/') - 1); if (!isset($bundles[$bundleName])) { throw new RuntimeException(sprintf('The bundle "%s" has not been registered with AppKernel. Available bundles: %s', $bundleName, implode(', ', array_keys($bundles)))); } $ref = new \ReflectionClass($bundles[$bundleName]); $directory['path'] = dirname($ref->getFileName()).substr($directory['path'], strlen('@'.$bundleName)); } $directories[rtrim($directory['namespace_prefix'], '\\')] = rtrim($directory['path'], '\\/'); } $container ->getDefinition('jms_serializer.metadata.file_locator') ->replaceArgument(0, $directories) ; $container->setParameter('jms_serializer.xml_deserialization_visitor.doctype_whitelist', $config['visitors']['xml']['doctype_whitelist']); $container->setParameter('jms_serializer.json_serialization_visitor.options', $config['visitors']['json']['options']); if ( ! $config['enable_short_alias']) { $container->removeAlias('serializer'); } if ( ! $container->getParameter('kernel.debug')) { $container->removeDefinition('jms_serializer.stopwatch_subscriber'); } } public function getConfiguration(array $config, ContainerBuilder $container) { return new Configuration($container->getParameterBag()->resolveValue('%kernel.debug%')); } }
<?php namespace Database\Factories; use App\Models\Film; use App\Models\Review; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; class ReviewFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Review::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ "user_id" => User::factory()->create()->id, "film_id" => Film::factory()->create()->id, "rate" => $this->faker->randomNumber(1) ]; } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreatePrTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('prms_prlist', function (Blueprint $table) { $table->bigIncrements('id'); $table->integer('pr_jo_id')->unsigned(); $table->string('pr_prnum',60)->unique(); $table->date('pr_date'); $table->string('pr_remarks',200)->nullable(); $table->boolean('pr_forPricing')->default(0); $table->integer('pr_user_id')->unsigned(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('prms_prlist'); } }
@extends('layouts.adminlte-boot-4.admin') @section('content') <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="content-header"> <div class="container-fluid"> <div class="row mb-0"> <div class="col-sm-6"> <h1 class="m-0 text-dark">Products <span id="total" class="badge badge-secondary">{{$data['total']}}</span></h1> </div> <div class="col-sm-6"> <a class="btn btn-primary px-3 float-right" href="{{url('admin/products/create')}}"><i class="far fa-plus-square"></i> New Product</a> </div> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </div> <!-- Main content --> <section class="content mt-2 mx-0"> <div class="container-fluid"> <!-- Content Header (Page header) --> <div class="row"> <div class="col-lg-12"> @if(session('success')) <div class='alert alert-success'> {{session('success')}} </div> @endif @if(session('error')) <div class='alert alert-danger'> {{session('error')}} </div> @endif <div class="card shadow card-primary card-outline"> <div class="card-header"> <div class="col-3"> <label>Users</label> <select class="form-control" id="selectUser" name="selectUser"> {!!$data['useroptions']!!} </select> </div> </div> <!--/.card-header--> <div class="card-body p-0"> <div id="table"> {!!$data['table']!!} </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> </div> <!-- /.row --> </div> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <script> var prourl = "{{url('admin/ajax/getUserProducts/{uid}')}}"; ///{uid} $(function() { $(".sidebar-menu li").removeClass("active"); $("#liproducts").addClass("active"); $("#selectUser").change(function() { var uid = $(this).val(); // alert(uid); // alert(prourl); $.get(prourl, { 'uid': uid }, function(result) { // alert(result); var res = eval("(" + result + ")"); $("#total").text(res.total); $("#table").html(res.table); $('#example1').DataTable({ 'paging': true, 'lengthChange': true, 'searching': true, 'ordering': false, 'info': true, 'autoWidth': false, 'columnDefs': [{ type: 'date-uk', targets: 4 }] }); $('#example2').DataTable({ 'paging': true, 'lengthChange': true, 'searching': true, 'ordering': false, 'info': true, 'autoWidth': false }); }); }); }); </script> @endsection
<div class="single-channel-page" id="content-wrapper"> <div class="single-channel-image"> <img class="img-fluid" alt="" style="height: 289.23px;" src="<?php echo base_url('asset/img/user/background/').$data_user['back_image'] ?>"> <div class="channel-profile"> <img class="channel-profile-img" alt="" src="<?php echo base_url('asset/img/user/profile/').$user['image'];?>"> <!-- <div class="social hidden-xs"> Social &nbsp; <a class="fb" href="#">Facebook</a> <a class="tw" href="#">Twitter</a> <a class="gp" href="#">Google</a> </div> --> </div> </div> <div class="single-channel-nav"> <nav class="navbar navbar-expand-lg navbar-light"> <a class="channel-brand" href="#"><?php echo ($data_user['nama_depan']);?> <?php echo $data_user['nama_belakang'];?></a> <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 class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/profile') ?>">Tentang Saya</a> </li> <li class="nav-item active"> <a class="nav-link" href="<?php echo base_url('index.php/info') ?>">Ganti Profil <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/ganti_password') ?>">Ganti Password</a> </li> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/ganti_foto') ?>">Ganti Foto</a> </li> <?php if ($this->session->userdata('role_id') == 0) { ?> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/signup') ?>">Tambah Pengguna</a> </li> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/video_user') ?>">Video User</a> </li> <?php } else { ?> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/video_saya') ?>">Video Saya</a> </li> <li class="nav-item"> <a class="nav-link" href="<?php echo base_url('index.php/upload') ?>">Upload Video</a> </li> <?php } ?> </ul> <div class="my-2 my-lg-0"> <button class="btn btn-outline-danger btn-sm" href="#" data-toggle="modal" data-target="#logoutModal">Keluar</button> </div> </div> </nav> </div> <div id="content-wrapper"> <div class="container-fluid upload-details"> <div class="row"> <div class="col-lg-12"> <div class="main-title"> <h6>Settings</h6> <?php echo $this->session->flashdata('info_dasar'); ?> </div> </div> </div> <?php echo form_open_multipart('index.php/info');?> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Nama Depan <span class="required">*</span></label> <input class="form-control border-form-control text-capitalize" name="nama_depan" value="<?php echo $data_user['nama_depan'] ?>" required type="text" <?= $this->session->userdata('role_id') == 1 ? 'disabled' : '' ?>> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Nama Belakang <span class="required">*</span></label> <input class="form-control border-form-control text-capitalize" name="nama_belakang" value="<?php echo $data_user['nama_belakang'] ?>" required type="text" <?= $this->session->userdata('role_id') == 1 ? 'disabled' : '' ?>> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Phone <span class="required">*</span></label> <input id="nomor_hp" class="form-control border-form-control" name="nomor_hp" value="<?php echo $data_user['nomor_hp'] ?>" type="text"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Email <span class="required">*</span></label> <input class="form-control border-form-control " value="<?php echo $user['email'] ?>" name="email" disabled="" type="email"> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Tempat Lahir <span class="required">*</span></label> <input id="nomor_hp" class="form-control border-form-control" <?= $this->session->userdata('role_id') == 1 ? 'disabled' : '' ?> list="tempat_lahir_list" type="text" name="tempat_lahir" value="<?php echo $data_user['tempat_lahir'] ?>"> <datalist id="tempat_lahir_list"> <option>Jakarta</option> <option>Bandung</option> </datalist> <?php echo form_error('tempat_lahir','<small>','</small>'); ?> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="control-label">Tanggal Lahir <span class="required">*</span></label> <input class="form-control border-form-control tgl_lahir" <?= $this->session->userdata('role_id') == 1 ? 'disabled' : '' ?> name="tgl_lahir" value="<?php if ($data_user['tgl_lahir'] != ''){ echo date('d-m-Y', strtotime($data_user['tgl_lahir'])); }?>"> </div> </div> </div> <div class="row"> <div class="col-sm-12 text-right"> <button type="submit" class="btn btn-success border-none"> Simpan Perubahan </button> </div> </div> </form> </div> <!-- /.container-fluid --> <!-- Sticky Footer --> <footer class="sticky-footer ml-0"> <div class="container"> <div class="row no-gutters"> <div class="col-lg-6 col-sm-6"> <p class="mt-1 mb-0"><strong class="text-dark">Vidoe</strong>. <small class="mt-0 mb-0"><a class="text-primary" target="_blank" href="https://templatespoint.net/">TemplatesPoint</a> </small> </p> </div> </div> </div> </footer> </div> <!-- /.content-wrapper --> </div> <!-- /#wrapper --> <!-- Scroll to Top Button--> <a class="scroll-to-top rounded" href="#page-top"> <i class="fas fa-angle-up"></i> </a> <script type="text/javascript"> $('.tgl_lahir').datepicker( { changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy', yearRange: '-60y:c+nn', maxDate: '-3y' }); $( '#nomor_hp' ).mask('0000−0000−00000'); </script>
<?php if (!defined('IN_IA')) { exit('Access Denied'); } class Wap_EweiShopV2ComModel extends ComModel { public function getSet() { return ''; } } ?>
<?php namespace Foostart\Contact; use Illuminate\Support\ServiceProvider; use LaravelAcl\Authentication\Classes\Menu\SentryMenuFactory; use URL, Route; use Illuminate\Http\Request; class ContactServiceProvider extends ServiceProvider { /** * Bootstrap the application services. * * @return void */ public function boot(Request $request) { /** * Publish */ $this->publishes([ __DIR__.'/config/contact_admin.php' => config_path('contact_admin.php'), ],'config'); $this->loadViewsFrom(__DIR__ . '/views', 'contact'); /** * Translations */ $this->loadTranslationsFrom(__DIR__.'/lang', 'contact'); /** * Load view composer */ $this->contactViewComposer($request); $this->publishes([ __DIR__.'/../database/migrations/' => database_path('migrations') ], 'migrations'); } /** * Register the application services. * * @return void */ public function register() { include __DIR__ . '/routes.php'; /** * Load controllers */ $this->app->make('Foostart\Contact\Controllers\Admin\ContactAdminController'); /** * Load Views */ $this->loadViewsFrom(__DIR__ . '/views', 'contact'); } /** * */ public function contactViewComposer(Request $request) { view()->composer('contact::contact*', function ($view) { global $request; $contact_id = $request->get('id'); $is_action = empty($contact_id)?'page_add':'page_edit'; $view->with('sidebar_items', [ /** * Contacts */ //list trans('contact::contact_admin.page_list') => [ 'url' => URL::route('admin_contact'), "icon" => '<i class="fa fa-users"></i>' ], //add trans('contact::contact_admin.'.$is_action) => [ 'url' => URL::route('admin_contact.edit'), "icon" => '<i class="fa fa-users"></i>' ], /** * Categories */ //list trans('contact::contact_admin.page_category_list') => [ 'url' => URL::route('admin_contact_category'), "icon" => '<i class="fa fa-users"></i>' ], ]); // }); } }
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Blade; class RoleServiceProvider extends ServiceProvider { /** * Register services. * * @return void */ public function register() { // } /** * Bootstrap services. * * @return void */ public function boot() { Blade::if('role', function ($role) { return auth()->check() && auth()->user()->hasRole($role); }); } }
@extends ('layout/admin') @section ('contenido') <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> <h3>Editar Articulo: {{ $persona->nombre }}</h3> @if (count($errors)>0) <div class="alert alert-danger"> <ul> @foreach ($errors->all() as $error) <li>{{$error}}</li> @endforeach </ul> </div> @endif </div> </div> {!!Form::model($persona,['method'=>'PUT','route'=>['ventas.cliente.update',$persona->idpersona]])!!} {{Form::token()}} <div class="row"> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label for="nombre">Nombre</label> <input type="text" name="nombre" required value="{{$persona->nombre}}" class="form-control" placeholder="Nombre.."> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label for="direccion">Dirección</label> <input type="text" name="direccion" value="{{$persona->direccion}}" class="form-control" placeholder="Dirección.."> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label>Documento</label> <select class="form-control" name="tipo_documento"> @if($persona->tipo_documento=='DNI') <option value="DNI" selected>Ife/Ine</option> <option value="PAS">Pasaporte</option> <option value="CED">Cedula Profesional</option> <option value="CAD">Cartilla Militar</option> @elseif($persona->tipo_documento=='PAS') <option value="DNI">Ife/Ine</option> <option value="PAS" selected>Pasaporte</option> <option value="CED">Cedula Profesional</option> <option value="CAD">Cartilla Militar</option> @elseif($persona->tipo_documento=='CED') <option value="DNI">Ife/Ine</option> <option value="PAS">Pasaporte</option> <option value="CED" selected>Cedula Profesional</option> <option value="CAD">Cartilla Militar</option> @else <option value="DNI">Ife/Ine</option> <option value="PAS">Pasaporte</option> <option value="CED">Cedula Profesional</option> <option value="CAD" selected>Cartilla Militar</option> @endif </select> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label for="num_documento">Numero de Documento.</label> <input type="text" name="num_documento" value="{{$persona->num_documento}}" class="form-control" placeholder="Numero de Documento..."> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label for="telefono">Telefono.</label> <input type="tel" name="telefono" value="{{$persona->telefono}}" class="form-control" placeholder="Telefono..."> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <label for="email">Email.</label> <input type="email" name="email" value="{{$persona->email}}" class="form-control" placeholder="Email..."> </div> </div> <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"> <div class="form-group"> <button type="submit" class="btn btn-primary">Guardar</button> <button type="reset" class="btn btn-danger">Cancelar</button> </div> </div> </div> {!!Form::close()!!} @endsection
<?php function create_dropdown($identifier,$pairs,$firstentry,$multiple="") { // Start the dropdown list with the <select> element and title $dropdown = "<select name=\"$identifier\" multiple=\"$multiple\">"; $dropdown .= "<option name=\"\">$firstentry</option>"; // Create the dropdown elements foreach($pairs AS $value => $name) { $dropdown .= "<option name=\"$value\">$name</option>"; } // Conclude the dropdown and return it echo "</select>"; return $dropdown; } ?>
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model common\models\LibrarySubLang */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="library-sub-lang-form"> <?php $form = ActiveForm::begin(['action'=>$action]); ?> <?= $form->field($model, 'lang')->hiddenInput()->label(false) ?> <?= $form->field($model, 'parent')->hiddenInput()->label(false) ?> <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'description')->textarea(['rows' => 6]) ?> <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? Yii::t('main', 'Create') : Yii::t('main', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> <?php ActiveForm::end(); ?> </div>
<?php if (!isset($_SESSION['USERID'])){ redirect(web_root."admin/index.php"); } // $autonum = New Autonumber(); // $res = $autonum->single_autonumber(2); ?> <form class="form-horizontal span6" action="controller.php?action=add" method="POST" style="margin-top: 20px;"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">Add New Question</h1> </div> <!-- /.col-lg-12 --> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "Lesson">Lesson:</label> <div class="col-md-8"> <select class="form-control" name="Lesson"> <?php $sql = "SELECT * FROM `tbllesson`"; $mydb->setQuery($sql); $cur = $mydb->loadResultList(); foreach ($cur as $res) { # code... echo '<option value='.$res->LessonID.'>'.$res->LessonTitle.'</option>'; } ?> </select> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "Question">Question:</label> <div class="col-md-8"> <textarea class="form-control input-sm" id="Question" name="Question" placeholder= "Question Name" type="text"></textarea> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "ChoiceA">A:</label> <div class="col-md-8"> <input class="form-control input-sm" id="ChoiceA" name="ChoiceA" placeholder= "" type="text" value=""> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "ChoiceB">B:</label> <div class="col-md-8"> <input class="form-control input-sm" id="ChoiceB" name="ChoiceB" placeholder= "" type="text" value="" required> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "ChoiceC">C:</label> <div class="col-md-8"> <input class="form-control input-sm" id="ChoiceC" name="ChoiceC" placeholder= "" type="text" value="" required> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "ChoiceD">D:</label> <div class="col-md-8"> <input class="form-control input-sm" id="ChoiceD" name="ChoiceD" placeholder= "" type="text" value="" required> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "Answer">Answer:</label> <div class="col-md-8"> <input class="form-control input-sm" id="Answer" name="Answer" placeholder= "Answer" type="text" value="" required> </div> </div> </div> <div class="form-group"> <div class="col-md-8"> <label class="col-md-4 control-label" for= "idno"></label> <div class="col-md-8"> <button class="btn btn-primary btn-sm" name="save" type="submit" ><span class="fa fa-save fw-fa"></span> Save</button> </div> </div> </div> </form>
<!DOCTYPE html> <html lang="en"> <head> <title>{{ env('APP_NAME') }} | Reset Account</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="BankON"> <meta name="author" content="Vinicius Medeiros"> <!--===============================================================================================--> <link rel="icon" type="image/svg+xml" href="{{ url('') }}/images/icons/favicon.svg"/> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/vendor/bootstrap/css/bootstrap.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/fonts/font-awesome-4.7.0/css/font-awesome.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/vendor/animate/animate.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/vendor/css-hamburgers/hamburgers.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/vendor/select2/select2.min.css"> <!--===============================================================================================--> <link rel="stylesheet" type="text/css" href="{{ url('') }}/css/login_util.css"> <link rel="stylesheet" type="text/css" href="{{ url('') }}/css/login_main.css"> <!--===============================================================================================--> </head> <body> <div class="limiter"> <div class="container-login100"> <div class="wrap-login100"> <div class="login100-pic js-tilt" data-tilt> <img src="{{ url('') }}/images/bank.svg" alt="BankON"> </div> <form class="login100-form validate-form" method="POST" action="{{ route("set_password") }}"> @csrf <input type="hidden" name="code" value="{{ $code }}"/> <span class="login100-form-title"> Set Account Password </span> @if ($errors->any()) <div class="text-danger text-center" style="padding:10px;"> {{ implode('', $errors->all(':message')) }} </div> @endif @if (session('error')) <div class="text-danger text-center" style="padding:10px;"> {!! session('error') !!} </div> @endif @if (session('success')) <div class="text-success text-center" style="padding:10px;"> {!! session('success') !!} </div> @endif <div class="wrap-input100 validate-input" data-validate = "Password is required"> <input class="input100" type="password" name="password" placeholder="Password" value="{{ old('password') }}"> <span class="focus-input100"></span> <span class="symbol-input100"> <i class="fa fa-lock" aria-hidden="true"></i> </span> </div> <div class="wrap-input100 validate-input" data-validate = "Confirm Password is required"> <input class="input100" type="password" name="password_confirmation" placeholder="Confirm Password" value="{{ old('password_confirmation') }}"> <span class="focus-input100"></span> <span class="symbol-input100"> <i class="fa fa-lock" aria-hidden="true"></i> </span> </div> <div class="container-login100-form-btn"> <button class="login100-form-btn"> Set Password </button> </div> <div class="text-center p-t-12"> </div> <div class="text-center p-t-136"> </div> </form> </div> </div> </div> <!--===============================================================================================--> <script src="{{ url('') }}/vendor/jquery/jquery-3.2.1.min.js"></script> <!--===============================================================================================--> <script src="{{ url('') }}/vendor/bootstrap/js/popper.js"></script> <script src="{{ url('') }}/vendor/bootstrap/js/bootstrap.min.js"></script> <!--===============================================================================================--> <script src="{{ url('') }}/vendor/select2/select2.min.js"></script> <!--===============================================================================================--> <script src="{{ url('') }}/vendor/tilt/tilt.jquery.min.js"></script> <script > $('.js-tilt').tilt({ scale: 1.1 }) </script> <!--===============================================================================================--> <script src="{{ url('') }}/js/login_main.js"></script> </body> </html>
<?php use App\Http\Controllers\AnswerController; use App\Http\Controllers\QuestionController; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::get('/', [QuestionController::class, 'index'])->name('home'); Route::resource('question', QuestionController::class); Route::resource('question.answer', AnswerController::class);
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class OrderSku extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('order_sku', function (Blueprint $table) { $table->id(); $table->integer('order_id'); $table->integer('sku_id'); $table->integer('count'); $table->double('price'); $table->timestamps(); }); Schema::dropIfExists('order_product'); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::create('order_product', function (Blueprint $table) { $table->id(); $table->integer('order_id'); $table->integer('product_id'); $table->integer('count'); $table->double('price'); $table->timestamps(); }); } }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Barang; use App\User; use App\Jenisbarang; use App\Satuan; use Auth; use Excel; class JenisbarangController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } public function barang(){ if(Auth::user()->level=='admin'){ $barang=Barang::all(); $jenisbarang = Jenisbarang::all(); $satuan = Satuan::all(); return view('jenisbarang.barang', compact('barang', 'jenisbarang', 'satuan')); }else{ return back(); } } public function jenisbarang() { if(Auth::user()->level=='admin'){ $barang = Barang::all(); $jenisbarang=Jenisbarang::all(); return view('jenisbarang.jenisbarang',['jenisbarang'=>$jenisbarang,'barang'=>$barang]); }else{ return back(); } } public function autonumber($id_terakhir, $panjang_kode, $panjang_angka) { // mengambil nilai kode ex: KNS0015 hasil KNS $kode = substr($id_terakhir, 0, $panjang_kode); // mengambil nilai angka // ex: KNS0015 hasilnya 0015 $angka = substr($id_terakhir, $panjang_kode, $panjang_angka); // menambahkan nilai angka dengan 1 // kemudian memberikan string 0 agar panjang string angka menjadi 4 // ex: angka baru = 6 maka ditambahkan strig 0 tiga kali // sehingga menjadi 0006 $angka_baru = str_repeat("0", $panjang_angka - strlen($angka+1)).($angka+1); // menggabungkan kode dengan nilang angka baru $id_baru = $kode.$angka_baru; return $id_baru; } public function store(Request $request) { $this->validate($request, [ //menvalidasi nama jenis barang dan kategori 'nama_jenisbarang' => 'required', 'kategori' => 'required', ]); $input = $request->all(); $kategori = strtoupper($input['kategori']); $last_id = Jenisbarang::where('kategori', $kategori)->orderBy('created_at', 'desc')->first(); $last_id = (!(empty($last_id))) ? JenisbarangController::autonumber($last_id->id_jenisbarang,3,3) : $kategori.'001'; $input['id_jenisbarang'] = $last_id; $jb = new Jenisbarang; $jb->fill($input); $jb->save(); return redirect('/jenisbarang')->with(['success' => 'Data Jenis Barang Berhasil di Tambahkan']); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id_jenisbarang) { $updatejb=Jenisbarang::find($id_jenisbarang); $updatejb->nama_jenisbarang=$request->nama_jenisbarang; $updatejb->kategori=$request->kategori; $updatejb->save(); return redirect('/jenisbarang')->with(['success' => 'Data Jenis Barang Berhasil di Ubah']); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } public function jenisbarangexport(){ $jenisbarang=Jenisbarang::select('id_jenisbarang as Kode Jenis Barang','nama_jenisbarang as Nama Jenis Barang','kategori as kategori Barang')->get(); return Excel::create('data_jenisbarang',function($excel) use($jenisbarang){ $excel->sheet('mysheet',function($sheet) use($jenisbarang){ $sheet->fromArray($jenisbarang); }); })->download('xls'); } public function jenisbarangimport(Request $request){ if($request->hasFile('jenisbarangimport')){ $simpan=''; $path=$request->file('jenisbarangimport')->getRealPath(); $data=Excel::load($path, function($reader){})->get(); if(!empty($data) && $data->count()){ foreach($data as $key=>$value){ $cek=Jenisbarang::where('nama_jenisbarang',$value->nama_jenis_barang)->count(); if($cek==0){ $jenisbarang=new Jenisbarang(); $kategori = strtoupper($value->jenis_barang); if($simpan==''){ $last_id = Jenisbarang::where('kategori', $kategori)->orderBy('created_at', 'desc')->first(); $last_id = (!(empty($last_id))) ? JenisbarangController::autonumber($last_id->id_jenisbarang,3,3) : $kategori.'001'; }else{ $last_id = (!(empty($last_id))) ? JenisbarangController::autonumber($simpan,3,3) : $kategori.'001'; } $jenisbarang->id_jenisbarang=$last_id; $jenisbarang->nama_jenisbarang=$value->nama_jenis_barang; $jenisbarang->kategori=$value->jenis_barang; $jenisbarang->save(); $simpan=$jenisbarang->id_jenisbarang; } } } } return back()->with(['success' => 'Import Data Excel Jenis Barang Berhasil']); } }
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title><?=$title?></title> <!-- Custom fonts for this template--> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <!-- Custom styles for this template--> <link href="css/sb-admin-2.min.css" rel="stylesheet"> </head>
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreatePresensisTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('presensi', function (Blueprint $table) { $table->id(); $table->integer('pegawaiCode'); $table->integer('idRuleIzin')->nullable(); $table->integer('idWaktuReguler')->nullable(); $table->integer('idWaktuShift')->nullable(); $table->integer('idRuleTelat')->nullable(); $table->date('tanggalPresensi')->nullable(); $table->time('jamPresensiMasuk')->nullable(); $table->time('jamPresensiPulang')->nullable(); $table->time('telatMasuk')->nullable(); $table->time('jarakWaktuPulang')->nullable(); $table->string('jarakPresensi', 20)->nullable(); $table->string('latitudePresensi')->nullable(); $table->string('longitudePresensi')->nullable(); $table->string('keteranganIzin')->nullable(); $table->date('tanggalMulaiIzin')->nullable(); $table->date('tanggalAkhirIzin')->nullable(); $table->string('dokumenPendukung')->nullable(); $table->string('statusIzin')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('presensis'); } }
<?php /** * Angela * 课程安排控制器 * 2017年11月21日17:54:32 * */ namespace App\Controller; use App\Service\ElectiveService; use App\Service\TeacherService; use App\Service\CategoryService; use App\Service\SubjectsService; use App\Service\SemesterService; use App\Service\CourseService; use App\Service\RoleService; use App\Service\DefensesService; use App\Library\Validate; use App\Library\Crypt; use App\Library\Logs; class ElectiveController extends BaseController { /** * 2017年11月25日11:11:30 * Angela * 加载页面 * @param $id int 学生ID * @return void */ public function index($id) { $teachers = TeacherService::getAllsData(); $subjects = SubjectsService::getSubjects(); $semesters = SemesterService::getAllsData(); $weeks = CategoryService::getCates('week'); // 相关 // 管理员(放开课程过期时间,全部都可以选择) $current_role = RoleService::currentRole(); $selected = 0; if(in_array($current_role, [1,5]) && empty($id)){ // 是管理员并且尚未分配学生ID $selected = 1; } // 检测学生是否毕业 (答辩是否通过) $stu_result = null; if($id){ if($this->checkDefenses($id)){ // 1 表示通过 $stu_result = 1; } $student_id = Crypt::encrypt($id); } $this->assign([ 'semesters' => $semesters, 'teachers' => $teachers, 'subjects' => $subjects, 'weeks' => $weeks, 'student_id' => !empty($id) ? $student_id : 0, 'selected' => $selected, 'stu_result' => $stu_result ]); $this->assign([''=>!empty($id) ? $id : 0]); $this->display('elective.html'); } /** * 2018年1月4日14:19:56 * Angela * 获取课程数据 */ public function getdata(){ $where = null; $searchdata = $this->getPostDatas('POST','searchdata',false,'stripslashes'); if($searchdata){ $where = $searchdata; } $where.= is_null($where) ? 'status=1' : '&status=1'; // 只选可选课程 $data = ElectiveService::getList($where); echo json_encode($data); } /** * 查询已选列表 */ public function select(){ $subjects = SubjectsService::getSubjects(); // 科目 $semesters = SemesterService::getAllsData(); $this->assign([ 'semesters' => $semesters, 'subjects' => $subjects ]); $this->display('electiveselect.html'); } /** * 获取数据 */ public function selectData(){ $where = null; $searchdata = $this->getPostDatas('POST','searchdata',false,'stripslashes'); $teacher_name = $this->getPostDatas('POST','teacher_name',false,'stripslashes'); // 查询教师 if($searchdata){ $where = $searchdata; } // 搜索教师,单独搜索 if($teacher_name && !$searchdata){ $teacher = TeacherService::uniqueData('name', $teacher_name); $teacher_id = $teacher == false ? 'A1' : $teacher['id']; $where.= 'teacher_id='.$teacher_id; } $data = ElectiveService::selectList($where); echo json_encode($data); } /** * 获取未选学生 */ public function notSelectedData(){ // 查询未选课的学生ID $semester_id = $this->getPostDatas('POST','semester_id',false,'htmlspecialchars'); $datas = ElectiveService::notGetSelect($semester_id); $datas = array_map(function($var){ $var['id'] = Crypt::encrypt($var['id']); // 加密 return $var; }, $datas); return $this->returnData(200,$datas); } // 检测是否通过毕业(答辩通过) public function checkDefenses($student_id){ $student_Defense =DefensesService::uniqueData('student_id',$student_id); // 最新一条纪录 if($student_Defense['result'] == 1){ // 1 表示通过 return true; } } // =========选课============== public function addData(){ if(IsPost()){ $data = $this->getPostDatas('POST'); $post_student_id = $this->getPostDatas('POST','student_id',false,'htmlspecialchars'); $student_id = Crypt::decrypt($post_student_id); if(!$student_id){ // 检查是否为用户擅自修改信息 return $this->returnData(600100); } // 检测学生是否毕业 (答辩是否通过) if($this->checkDefenses($student_id)){ // 1 表示通过 return $this->returnData(600101); } $res = Validate::make([ // 数据验证 [ 'course_id','required|isnull', '学期必填', Validate::MUST_VALIDATE ], [ 'student_id','required|isnull', '学生必选', Validate::MUST_VALIDATE ], ] ,$data); $user_id = RoleService::currentUID(); $course_ids = $this->getPostDatas('POST','course_id',false); $insertData = []; if($course_ids){ foreach ($course_ids as $value){ $course = CourseService::getOneData($value); $elective_temp =[ 'course_id' => $value, 'student_id' => $student_id, 'semester_id' => $course['semester_id'], 'teacher_id' => $course['teacher_id'], 'subject_id' => $course['subject_id'] ]; $insertData[] = $elective_temp; } } // 处理数据入库 $cont=null; $code = 600400; // 失败 try{ $insertId = ElectiveService::insertDatas($insertData); $insertData['user_id'] = $user_id; // 操作者 Logs::info(json_encode($insertData)); // 纪录日志 } catch ( \Illuminate\Database\QueryException $e){ $message = $e->getMessage(); //$cont['message'] = $message; $unique_course = 'idx_student_course'; // 索引名称, 保证同一学生只能在同一学期选一门课程 $pos_course = strpos($message, $unique_course); if ($pos_course !== false) $code = 600900; $cont['code'] = $e->getCode(); $insertId = false; } //处理结果 if($insertId){$code = 600200; } //成功 return $this->returnData($code,$cont); } } //删除操作 public function delData($id){ try{ $data = ElectiveService::DelOne($id); } catch ( \Illuminate\Database\QueryException $e){ $data = false; } if($data){ return $this->returnData(500500); } } /** * 2018年1月4日16:10:45 * Angela * 检测唯一性 */ public function uniqueName(){ $name = $this->getPostDatas('POST','name',false,'htmlspecialchars'); $value = $this->getPostDatas('POST','value',false,'htmlspecialchars'); $res = CourseService::uniqueData($name,$value); if($res){ echo json_encode(false); //json_encode(false) 表示有重复的号码; }else{ echo json_encode(true); //必须是json_encode(true) } } }
<?php namespace api\modules\v1; //use yii\base\Module AS yiiModule; /** * */ class Module extends \yii\base\Module { public $controllerNamespace = 'api\modules\v1\controllers'; public function init() { parent::init(); } }
<?php namespace ContainerShpvg7F; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** * @internal This class has been auto-generated by the Symfony Dependency Injection Component. */ class getDoctrineMigrations_UpToDateCommandService extends App_KernelProdDebugContainer { /** * Gets the private 'doctrine_migrations.up_to_date_command' shared service. * * @return \Doctrine\Migrations\Tools\Console\Command\UpToDateCommand */ public static function do($container, $lazyLoad = true) { include_once \dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php'; include_once \dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php'; include_once \dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/UpToDateCommand.php'; $container->privates['doctrine_migrations.up_to_date_command'] = $instance = new \Doctrine\Migrations\Tools\Console\Command\UpToDateCommand(($container->privates['doctrine.migrations.dependency_factory'] ?? $container->load('getDoctrine_Migrations_DependencyFactoryService')), 'doctrine:migrations:up-to-date'); $instance->setName('doctrine:migrations:up-to-date'); return $instance; } }
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePostsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('posts', function (Blueprint $table) { $table->increments('id'); $table->string('title',255); $table->string('description', 255); $table->string('video', 255); $table->mediumText('content'); $table->date('date'); $table->integer('category_id')->unsigned()->nullable(); $table->foreign('category_id')->references('id')->on('categories')->onDelete('set null'); $table->text('image_url'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } }
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class FactorCompare extends Model { use HasFactory; public function SI() { return $this->belongsTo(SecInfo::class, 'SI_id'); } public function factor() { return $this->belongsTo(Factor::class, 'factor_id'); } }
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class UpdateSeriRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return false; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } }
<?php namespace Omt\ImageHelper\Gd\Commands; use Omt\ImageHelper\Commands\AbstractCommand; use Omt\ImageHelper\Gd\Color; class PickColorCommand extends AbstractCommand { /** * Read color information from a certain position * * @param \Omt\ImageHelper\Image $image * @return boolean */ public function execute($image) { $x = $this->argument(0)->type('digit')->required()->value(); $y = $this->argument(1)->type('digit')->required()->value(); $format = $this->argument(2)->type('string')->value('array'); // pick color $color = imagecolorat($image->getCore(), $x, $y); if ( ! imageistruecolor($image->getCore())) { $color = imagecolorsforindex($image->getCore(), $color); $color['alpha'] = round(1 - $color['alpha'] / 127, 2); } $color = new Color($color); // format to output $this->setOutput($color->format($format)); return true; } }
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class LanguageMiddleware { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle(Request $request, Closure $next) { if(session()->has('locale')) app()->setLocale(session('locale')); else app()->setLocale(config('app.locale')); return $next($request); } }
<?php return [ /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course | you may use many connections at once using the Database library. | */ 'default' => env('DB_CONNECTION', 'mysql'), /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'asd'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', 'sslmode' => 'prefer', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'client' => 'predis', 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => 0, ], ], ];
<?php namespace app\lib\exception; /** * Class ForbiddenException * 禁止访问 * @package app\lib\exception */ class ForbiddenException extends BaseException{ public $code = 403; public $msg = "您没有权限访问"; public $errorCode = 10001; }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>用户管理_喇叭传媒</title> <meta name="description" content="" /> <meta name="keywords" content="" /> @include('console.share.cssjs') </head> <body class="fold"><!-- class="fold" 左导航收缩 --> @include('console.share.admin_head') @include('console.share.admin_menu')<!-- 左弹菜单 普通会员首页 --> <div class="content"><div class="Invoice"> <div class="place"> <div class="place_ant"><a href="/console/index">首页</a> <a class="cur">用户管理 </a> </div> </div> <div class="main_o" style="padding-bottom:0;"> <h3 class="title4"><strong><a href="#">角色列表</a></strong> <div class="search_1"> <div style="float:right;"> <div class="l"> <input type="text" name="role_name" id="role_name" class="txt5" placeholder="请输入角色名" /> <input type="button" name="" onclick="add_role()" class="sub4_3" id="" value="添加" /> </div> <script type="text/javascript"> function add_role() { var role_name = $("#role_name").val(); if (role_name != '') { $.ajax({ data:{"role_name":role_name,"_token":$('meta[name="csrf-token"]').attr('content')}, type:"post", dataType:"json", url:"/usermanager/addRole", success:function(mes) { if (mes.status_code == 200) { layer.msg('添加成功'); setTimeout(function(){ window.location.href=window.location.href },1000); } else { layer.msg(mes.error); } } }) } } </script> </div> </div> <div class="clr"></div> </h3> <div class="dhorder_m"> <div class="tab1_body"> <table class="table_in1 cur" id="datatable1"> <thead> <tr> <th>ID</th> <th>组名称</th> <th>权限单位(单位:个)</th> <th class="nosort">操作</th> </tr> </thead> <tbody id="listcontent"> @foreach($role as $key => $v) <tr> <td>{{ $v['id'] }}</td> <td>{{ $v['level_name'] }}</td> <td> @if($v['id'] == 1) / @else {{ count($v['role_vs_menu']) }} @endif </td> <td>@if($v['id'] != 1)<a class="color2" href="/usermanager/editRole/{{$v['id']}}">编辑</a> | <a class="color1" href="/usermanager/delRole/{{$v['id']}}">删除</a> @else / @endif</td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div></div> @include('console.share.admin_foot') <script type="text/javascript"> /* 日历 */ if( $('#datepicker1').length>0 && typeof(picker1)!="object" ){ var picker1 = new Pikaday({ field: document.getElementById('datepicker1'), firstDay: 1, format: "YYYY-MM-DD", minDate: new Date('2000-01-01'), maxDate: new Date('2020-12-31'), yearRange: [2000,2020] }); } if( $('#datepicker2').length>0 && typeof(picker2)!="object" ){ var picker2 = new Pikaday({ field: document.getElementById('datepicker2'), firstDay: 1, format: "YYYY-MM-DD", minDate: new Date('2000-01-01'), maxDate: new Date('2020-12-31'), yearRange: [2000,2020] }); } $(function(){ $(".tab1>ul>li>a").unbind("click"); }); //<div id="datatable1_filter" class="dataTables_filter"><label>搜索<input type="search" class="" placeholder="过滤..." aria-controls="datatable1"></label></div> var datatable; $(function () { var dt_option = { "searching" : false, //是否允许Datatables开启本地搜索 "paging" : true, //是否开启本地分页 "pageLength" : 8, //每页显示记录数 "lengthChange" : false, //是否允许用户改变表格每页显示的记录数 "lengthMenu": [ 5, 10, 100 ], //用户可选择的 每页显示记录数 "info" : true, "columnDefs" : [{ "targets": 'nosort', "orderable": false }], "pagingType": "simple_numbers", "language": { "search": "搜索", sZeroRecords : "没有查询到数据", "info": "显示第 _PAGE_/_PAGES_ 页,共_TOTAL_条", "infoFiltered": "(筛选自_MAX_条数据)", "infoEmpty": "没有符合条件的数据", oPaginate: { "sFirst" : "首页", "sPrevious" : "上一页", "sNext" : "下一页", "sLast" : "尾页" }, searchPlaceholder: "过滤..." }, "order" : [[0,"desc"]] }; datatable = $('#datatable1').DataTable(dt_option); // var _token = $('input[name="_token"]').val(); $("#searchnews").click(function () { $.ajax({ type:"post", // url:"/Admin/searchnewspage", url:"data_admin_order_list1.php", dataType: 'html', data:{ 'start':$("#datepicker1").val(), 'end':$("#datepicker2").val(), 'mediatype':$("#mediatype").val(), 'orderid':$("#keyword").val() }, success:function (msg) { console.log("msg:" + msg); if (msg) { if( $.fn.dataTable.isDataTable(" #datatable1 ") ){ datatable.destroy(); } $('#listcontent').html(msg); datatable = $('#datatable1').DataTable(dt_option); } else { if( $.fn.dataTable.isDataTable(" #datatable1 ") ){ datatable.destroy(); } $('#listcontent').html("<tr><td colspan='8'>没有查询到数据!</td></tr>"); //7 表格列数 // window.location.reload(); } } }) }) }) </script> </body> </html>
<?php namespace App\Http\Requests\API\Download; /** * @property array $songs */ class SongRequest extends Request { public function rules(): array { return [ 'songs' => 'required|array', ]; } }
<section id="moisCourant"> <h2 id="MoisFrais">Frais Forfaitaires du mois de : <?php echo $_SESSION['mois']['libelle']; ?></h2> <p> Nombre d'étapes : <span class='frais'> <?php echo $_SESSION['FraisForfait']['ETP']; ?> </span> / KmParcourus : <span class='frais'> <?php echo $_SESSION['FraisForfait']['KM']; ?> </span><br/> NuitéesHorsEtapes : <span class='frais'> <?php echo $_SESSION['FraisForfait']['NUI']; ?> </span> / RepasHorsEtapes : <span class='frais'> <?php echo $_SESSION['FraisForfait']['REP']; ?> </span> </p> </section> <?php if( isset($_SESSION['FraisHF']) && count($_SESSION['FraisHF']) > 0 ) { ?> <section> <h2>Autres frais :</h2> <table> <thead> <tr> <th>Date</th> <th>Libellé</th> <th>Prix</th> </tr> </thead> <tbody> <?php for( $i = 0; $i < count($_SESSION['FraisHF']); $i ++ ) { echo "<tr>"; echo "<td>".$_SESSION['FraisHF'][$i]['date']."</td>"; echo "<td>".$_SESSION['FraisHF'][$i]['libelle']."</td>"; echo "<td>".$_SESSION['FraisHF'][$i]['montant']."</td>"; echo "</tr>"; } ?> </tbody> </table> </section> <?php } ?>
<?php namespace App\Exports; use App\User; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; use PhpOffice\PhpSpreadsheet\Shared\Date; class UsersExport implements FromCollection, WithMapping, WithHeadings { public function collection() { return User::all(); } public function headings(): array { return [ '#', 'Name', 'Email', 'Registered Date', 'Updated Date', ]; } public function map($row): array { return [ $row->id, $row->name, $row->email, Date::dateTimeToExcel($row->created_at), Date::dateTimeToExcel($row->updated_at) ]; } }
@extends('users-mgmt.base') @section('action-content') <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="panel panel-default"> <div class="panel-heading">Update user</div> <div class="panel-body"> <form class="form-horizontal" role="form" method="POST" action="{{ route('user-management.update', ['id' => $user->id]) }}"> <input type="hidden" name="_method" value="PATCH"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}"> <label for="username" class="col-md-4 control-label">User Name</label> <div class="col-md-6"> <input id="username" type="text" class="form-control" name="username" value="{{ $user->username }}" required autofocus> @if ($errors->has('username')) <span class="help-block"> <strong>{{ $errors->first('username') }}</strong> </span> @endif </div> </div> <div class="form-group{{ $errors->has('firstname') ? ' has-error' : '' }}"> <label for="firstname" class="col-md-4 control-label">First Name</label> <div class="col-md-6"> <input id="firstname" type="text" class="form-control" name="firstname" value="{{ $user->firstname }}" required> @if ($errors->has('firstname')) <span class="help-block"> <strong>{{ $errors->first('firstname') }}</strong> </span> @endif </div> </div> <div class="form-group{{ $errors->has('lastname') ? ' has-error' : '' }}"> <label for="lastname" class="col-md-4 control-label">Last Name</label> <div class="col-md-6"> <input id="lastname" type="text" class="form-control" name="lastname" value="{{ $user->lastname }}" required> @if ($errors->has('lastname')) <span class="help-block"> <strong>{{ $errors->first('lastname') }}</strong> </span> @endif </div> </div> <div class="form-group"> <label class="col-md-4 control-label">Profil</label> <div class="col-md-6"> <select class="form-control" name="roles_id"> @foreach ($roles as $roless) <option {{$user->roles_id == $roless->id ? 'selected' : ''}} value="{{$roless->id}}">{{$roless->name}}</option> @endforeach </select> </div> </div> <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}"> <label for="password" class="col-md-4 control-label">New Password</label> <div class="col-md-6"> <input id="password" type="password" class="form-control" name="password"> @if ($errors->has('password')) <span class="help-block"> <strong>{{ $errors->first('password') }}</strong> </span> @endif </div> </div> <div class="form-group"> <label for="password-confirm" class="col-md-4 control-label">Confirm Password</label> <div class="col-md-6"> <input id="password-confirm" type="password" class="form-control" name="password_confirmation"> </div> </div> <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> Update </button> </div> </div> </form> </div> </div> </div> </div> </div> @endsection
<?php use Illuminate\Database\Seeder; class ConfigTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { DB::table('config')->delete(); DB::table('config')->insert([ 'config' => 'roundTime', 'value' => '30', ]); DB::table('config')->insert([ 'config' => 'speed', 'value' => '5', ]); DB::table('config')->insert([ 'config' => 'radius', 'value' => '16', ]); DB::table('config')->insert([ 'config' => 'turnSpeed', 'value' => '72', ]); DB::table('config')->insert([ 'config' => 'acceleration', 'value' => '1', ]); DB::table('config')->insert([ 'config' => 'deceleration', 'value' => '1', ]); DB::table('config')->insert([ 'config' => '', 'value' => '', ]); DB::table('config')->insert([ 'config' => '', 'value' => '', ]); DB::table('config')->insert([ 'config' => 'backgroud', 'value' => '', ]); } }
<footer class="footer"> <div class="container"> <p class="pull-left"> 由 <a href="http://weibo.com/u/1837553744?is_hot=1" target="_blank">Summer</a> 设计和编码 <span style="color: #e27575;font-size: 14px;">❤</span> </p> <p class="pull-right"><a href="mailto:{{ setting('contact_email') }}">联系我们</a></p> </div> </footer>
<?php namespace App\Models; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use App\Notifications\ResetPassword; use Auth; class User extends Authenticatable { use Notifiable; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'email', 'password', ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; public static function boot() { parent::boot(); static::creating(function ($user) { $user->activation_token = str_random(30); }); } public function gravatar($size = '100') { $hash = md5(strtolower(trim($this->attributes['email']))); return "http://www.gravatar.com/avatar/$hash?s=$size"; } public function sendPasswordResetNotification($token) { $this->notify(new ResetPassword($token)); } public function statuses() { return $this->hasMany(Status::class); } public function feed() { $userIds = Auth::user()->followings->pluck('id')->toArray(); array_push($userIds, Auth::user()->id); return Status::whereIn('user_id', $userIds) ->with('user') ->orderBy('created_at', 'desc'); } /** * 粉丝 * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function followers() { return $this->belongsToMany(User::class, 'followers', 'user_id', 'follower_id'); } /** * 关注的人 * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function followings() { return $this->belongsToMany(User::class, 'followers', 'follower_id', 'user_id'); } /** * 添加到关注 * * @param $userIds */ public function follow($userIds) { if (!is_array($userIds)) { $userIds = compact('userIds'); } $this->followings()->sync($userIds, false); } /** * 取消关注 * * @param $userIds */ public function unFollow($userIds) { if (!is_array($userIds)) { $userIds = compact('userIds'); } $this->followings()->detach($userIds); } public function isFollowing($userId) { return $this->followings->contains($userId); } }
@extends('admin/layout') @section('books') active @endsection @section('book') active @endsection @section('content') <div class="container-fluid"> <!-- Breadcrumb--> <div class="row pt-2 pb-2"> <div class="col-sm-9"> <h4 class="page-title">Manage Books</h4> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="{{ url('dashboard') }}">Home</a></li> <li class="breadcrumb-item active"><a href="javaScript:void();">Books</a></li> </ol> </div> <div class="col-sm-3"> <div class="btn-group float-sm-right"> <a type="button" class="btn btn-primary waves-effect waves-light" href="{{ route('book.index') }}">List</a> </div> </div> </div> <!-- End Breadcrumb--> <div class="row"> <div class="col-lg-4"> <div class="card profile-card-2"> <div class="card-img-block"> @if(isset($data->image) && is_file(public_path('images/books/' .$data->image))) <img class="img-fluid" src="{{URL::asset('images/books')}}/{{$data->image}}" alt="Card image cap"> @endif </div> <div class="card-body pt-5"> <h5 class="card-title">{{$data->type}} @if($data->type=='ebook') @if(isset($data->file_name) && is_file(public_path('images/books/' .$data->file_name))) <a href="{{URL::asset('images/books')}}/{{$data->file_name}}" target="_blank" class="btn btn btn-primary btn-sm">View</a> @endif @endif <br> </h5> <p class="card-text">{{$data->categories->category_name}}</p> <span>Book Name: - <b>{{$data->book_name}}</b></span> <br> <span>Author :- <b>{{$data->authors->name}}</b></span> <br> <span>Publisher: - <b>{{$data->publishers->name}}</b></span> <br> <span>Released: - <b>{{$data->released}}</b></span> <br> <br> </div> </div> </div> <div class="col-lg-8"> <div class="card"> <div class="card-body"> <ul class="nav nav-tabs nav-tabs-primary top-icon nav-justified"> <li class="nav-item"> <a href="javascript:void();" data-target="#profile" data-toggle="pill" class="nav-link active"><i class="fa fa-book"></i> <span class="hidden-xs">Book Details</span></a> </li> </ul> <div class="tab-content p-3"> <div class="tab-pane active" id="profile"> <h5 class="mb-3">About</h5> <div class="row"> <div class="col-md-6"> <h6>No of Pages :- <b> {{$data->pages}} </b></h6> <h6>MRP :- <b> {{$data->mrp}} </b></h6> </div> <div class="col-md-6"> <h6>Stock Count :- <b> {{$data->stock_count}} </b></h6> <h6>In Stock :-<b> {{$data->in_stock}} </b></h6> </div> <div class="col-md-6"> <h6>Language :- <b> {{$data->language}} </b></h6> <h6>Description:-</h6> <b> {!! nl2br($data->description) !!} </b> </div> <div class="col-md-6"> <h6>In Deal :- <b> {{$data->in_deal}} </b></h6> <h6>Sale Price :- <b> {{$data->sale_price}} </b></h6> </div> </div> <!--/row--> </div> <div class="tab-pane" id="messages"> <div class="alert alert-info alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert">×</button> <div class="alert-icon"> <i class="icon-info"></i> </div> <div class="alert-message"> <span><strong>Info!</strong> Lorem Ipsum is simply dummy text.</span> </div> </div> <div class="table-responsive"> <table class="table table-hover table-striped"> <tbody> <tr> <td> <span class="float-right font-weight-bold">3 hrs ago</span> Here is your a link to the latest summary report from the.. </td> </tr> <tr> <td> <span class="float-right font-weight-bold">Yesterday</span> There has been a request on your account since that was.. </td> </tr> <tr> <td> <span class="float-right font-weight-bold">9/10</span> Porttitor vitae ultrices quis, dapibus id dolor. Morbi venenatis lacinia rhoncus. </td> </tr> <tr> <td> <span class="float-right font-weight-bold">9/4</span> Vestibulum tincidunt ullamcorper eros eget luctus. </td> </tr> <tr> <td> <span class="float-right font-weight-bold">9/4</span> Maxamillion ais the fix for tibulum tincidunt ullamcorper eros. </td> </tr> </tbody> </table> </div> </div> <div class="tab-pane" id="edit"> <form> <div class="form-group row"> <label class="col-lg-3 col-form-label form-control-label">Boards Name</label> <div class="col-lg-9"> <select class="form-control" id="boards" name="boards"> <option readonly>Select Boards</option> </select> </div> </div> <div class="form-group row"> <label class="col-lg-3 col-form-label form-control-label">Class Name</label> <div class="col-lg-9"> <select class="form-control" id="class" name="class_id" onchange="getSubject()"> <option readonly>Select Classes</option> </select> </div> </div> <div class="form-group row"> <label class="col-lg-3 col-form-label form-control-label">Subject</label> <div class="col-lg-9"> <select class="form-control" id="subject_list" name="subject_id"> <option readonly>Select Subject</option> </select> </div> </div> <div class="form-group row"> <label class="col-lg-3 col-form-label form-control-label"></label> <div class="col-lg-9"> <input type="reset" class="btn btn-secondary" value="Cancel"> <input type="button" class="btn btn-primary" value="Add"> </div> </div> </form> </div> </div> </div> </div> </div> </div> @endsection
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMasterClassesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('master_classes', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('master_classes'); } }
<?php if ( ! $isWizard or ! empty(PMXI_Plugin::$session->deligate) and PMXI_Plugin::$session->deligate == 'wpallexport' or $isWizard and "new" != $post['wizard_type']): ?> <h4><?php _e('When WP All Import finds new or changed data...', PMWI_Plugin::TEXT_DOMAIN); ?></h4> <?php else: ?> <h4><?php _e('If this import is run again and WP All Import finds new or changed data...', PMWI_Plugin::TEXT_DOMAIN); ?></h4> <?php endif; ?> <div class="input"> <input type="hidden" name="create_new_records" value="0" /> <input type="checkbox" id="create_new_records" name="create_new_records" value="1" <?php echo $post['create_new_records'] ? 'checked="checked"' : '' ?> /> <label for="create_new_records"><?php _e('Create new orders from records newly present in your file', PMWI_Plugin::TEXT_DOMAIN) ?></label> <?php if ( ! empty(PMXI_Plugin::$session->deligate) and PMXI_Plugin::$session->deligate == 'wpallexport' ): ?> <a href="#help" class="wpallimport-help" title="<?php _e('New orders will only be created when ID column is present and value in ID column is unique.', PMWI_Plugin::TEXT_DOMAIN) ?>" style="top: -1px;">?</a> <?php endif; ?> </div> <div class="switcher-target-auto_matching"> <div class="input"> <input type="hidden" name="is_delete_missing" value="0" /> <input type="checkbox" id="is_delete_missing" name="is_delete_missing" value="1" <?php echo $post['is_delete_missing'] ? 'checked="checked"': '' ?> class="switcher" <?php if ( "new" != $post['wizard_type']): ?>disabled="disabled"<?php endif; ?>/> <label for="is_delete_missing" <?php if ( "new" != $post['wizard_type']): ?>style="color:#ccc;"<?php endif; ?>><?php _e('Delete orders that are no longer present in your file', PMWI_Plugin::TEXT_DOMAIN) ?></label> <?php if ( "new" != $post['wizard_type']): ?> <a href="#help" class="wpallimport-help" title="<?php _e('Records removed from the import file can only be deleted when importing into New Items. This feature cannot be enabled when importing into Existing Items.', PMWI_Plugin::TEXT_DOMAIN) ?>" style="position:relative; top: -1px;">?</a> <?php endif; ?> </div> <div class="switcher-target-is_delete_missing" style="padding-left:17px;"> <div class="input"> <input type="hidden" name="is_keep_attachments" value="0" /> <input type="checkbox" id="is_keep_attachments" name="is_keep_attachments" value="1" <?php echo $post['is_keep_attachments'] ? 'checked="checked"': '' ?> <?php if ( "new" != $post['wizard_type']): ?>disabled="disabled"<?php endif; ?>/> <label for="is_keep_attachments"><?php _e('Do not remove attachments', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_keep_imgs" value="0" /> <input type="checkbox" id="is_keep_imgs" name="is_keep_imgs" value="1" <?php echo $post['is_keep_imgs'] ? 'checked="checked"': '' ?> <?php if ( "new" != $post['wizard_type']): ?>disabled="disabled"<?php endif; ?>/> <label for="is_keep_imgs"><?php _e('Do not remove images', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_missing_cf" value="0" /> <input type="checkbox" id="is_update_missing_cf" name="is_update_missing_cf" value="1" <?php echo $post['is_update_missing_cf'] ? 'checked="checked"': '' ?> class="switcher" <?php if ( "new" != $post['wizard_type']): ?>disabled="disabled"<?php endif; ?>/> <label for="is_update_missing_cf"><?php _e('Instead of deletion, set Custom Field', PMWI_Plugin::TEXT_DOMAIN) ?></label> <div class="switcher-target-is_update_missing_cf" style="padding-left:17px;"> <div class="input"> <?php _e('Name', PMWI_Plugin::TEXT_DOMAIN) ?> <input type="text" name="update_missing_cf_name" value="<?php echo esc_attr($post['update_missing_cf_name']) ?>" /> <?php _e('Value', PMWI_Plugin::TEXT_DOMAIN) ?> <input type="text" name="update_missing_cf_value" value="<?php echo esc_attr($post['update_missing_cf_value']) ?>" /> </div> </div> </div> <div class="input"> <input type="hidden" name="set_missing_to_draft" value="0" /> <input type="checkbox" id="set_missing_to_draft" name="set_missing_to_draft" value="1" <?php echo $post['set_missing_to_draft'] ? 'checked="checked"': '' ?> <?php if ( "new" != $post['wizard_type']): ?>disabled="disabled"<?php endif; ?>/> <label for="set_missing_to_draft"><?php _e('Instead of deletion, change post status to Draft', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> </div> </div> <div class="input"> <input type="hidden" id="is_keep_former_posts" name="is_keep_former_posts" value="yes" /> <input type="checkbox" id="is_not_keep_former_posts" name="is_keep_former_posts" value="no" <?php echo "yes" != $post['is_keep_former_posts'] ? 'checked="checked"': '' ?> class="switcher" /> <label for="is_not_keep_former_posts"><?php _e('Update existing orders with changed data in your file', PMWI_Plugin::TEXT_DOMAIN) ?></label> <?php if ( $isWizard and "new" == $post['wizard_type'] and empty(PMXI_Plugin::$session->deligate)): ?> <a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php _e('These options will only be used if you run this import again later. All data is imported the first time you run an import.<br/><br/>Note that WP All Import will only update/remove posts created by this import. If you want to match to posts that already exist on this site, use Existing Items in Step 1.', PMWI_Plugin::TEXT_DOMAIN) ?>">?</a> <?php endif; ?> <div class="switcher-target-is_not_keep_former_posts" style="padding-left:17px;"> <input type="radio" id="update_all_data" class="switcher" name="update_all_data" value="yes" <?php echo 'no' != $post['update_all_data'] ? 'checked="checked"': '' ?>/> <label for="update_all_data"><?php _e('Update all data', PMWI_Plugin::TEXT_DOMAIN )?></label><br> <input type="radio" id="update_choosen_data" class="switcher" name="update_all_data" value="no" <?php echo 'no' == $post['update_all_data'] ? 'checked="checked"': '' ?>/> <label for="update_choosen_data"><?php _e('Choose which data to update', PMWI_Plugin::TEXT_DOMAIN )?></label><br> <div class="switcher-target-update_choosen_data" style="padding-left:27px;"> <div class="input"> <h4 class="wpallimport-trigger-options wpallimport-select-all" rel="<?php _e("Unselect All", PMWI_Plugin::TEXT_DOMAIN); ?>"><?php _e("Select All", PMWI_Plugin::TEXT_DOMAIN); ?></h4> </div> <div class="input"> <input type="hidden" name="is_update_status" value="0" /> <input type="checkbox" id="is_update_status" name="is_update_status" value="1" <?php echo $post['is_update_status'] ? 'checked="checked"': '' ?> /> <label for="is_update_status"><?php _e('Order status', PMWI_Plugin::TEXT_DOMAIN) ?></label> <a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php _e('Hint: uncheck this box to keep trashed orders in the trash.', PMWI_Plugin::TEXT_DOMAIN) ?>">?</a> </div> <div class="input"> <input type="hidden" name="is_update_excerpt" value="0" /> <input type="checkbox" id="is_update_excerpt" name="is_update_excerpt" value="1" <?php echo $post['is_update_excerpt'] ? 'checked="checked"': '' ?> /> <label for="is_update_excerpt"><?php _e('Customer Note', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_dates" value="0" /> <input type="checkbox" id="is_update_dates" name="is_update_dates" value="1" <?php echo $post['is_update_dates'] ? 'checked="checked"': '' ?> /> <label for="is_update_dates"><?php _e('Dates', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_billing_details" value="0" /> <input type="checkbox" id="is_update_billing_details" name="is_update_billing_details" value="1" <?php echo $post['is_update_billing_details'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_billing_details"><?php _e('Billing Details', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_shipping_details" value="0" /> <input type="checkbox" id="is_update_shipping_details" name="is_update_shipping_details" value="1" <?php echo $post['is_update_shipping_details'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_shipping_details"><?php _e('Shipping Details', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_payment" value="0" /> <input type="checkbox" id="is_update_payment" name="is_update_payment" value="1" <?php echo $post['is_update_payment'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_payment"><?php _e('Payment Details', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_notes" value="0" /> <input type="checkbox" id="is_update_notes" name="is_update_notes" value="1" <?php echo $post['is_update_notes'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_notes"><?php _e('Order Notes', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_products" value="0" /> <input type="checkbox" id="is_update_products" name="is_update_products" value="1" <?php echo $post['is_update_products'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_products"><?php _e('Product Items', PMWI_Plugin::TEXT_DOMAIN) ?></label> <div class="switcher-target-is_update_products" style="padding-left:17px;"> <div class="input" style="margin-bottom:3px;"> <input type="radio" id="update_products_logic_full_update" name="update_products_logic" value="full_update" <?php echo ( "full_update" == $post['update_products_logic'] ) ? 'checked="checked"': '' ?> /> <label for="update_products_logic_full_update"><?php _e('Update all products', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input" style="margin-bottom:3px;"> <input type="radio" id="update_products_logic_add_new" name="update_products_logic" value="add_new" <?php echo ( "add_new" == $post['update_products_logic'] ) ? 'checked="checked"': '' ?> /> <label for="update_products_logic_add_new"><?php _e('Don\'t touch existing products, append new products', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> </div> </div> <div class="input"> <input type="hidden" name="is_update_fees" value="0" /> <input type="checkbox" id="is_update_fees" name="is_update_fees" value="1" <?php echo $post['is_update_fees'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_fees"><?php _e('Fees Items', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_coupons" value="0" /> <input type="checkbox" id="is_update_coupons" name="is_update_coupons" value="1" <?php echo $post['is_update_coupons'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_coupons"><?php _e('Coupon Items', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_shipping" value="0" /> <input type="checkbox" id="is_update_shipping" name="is_update_shipping" value="1" <?php echo $post['is_update_shipping'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_shipping"><?php _e('Shipping Items', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_taxes" value="0" /> <input type="checkbox" id="is_update_taxes" name="is_update_taxes" value="1" <?php echo $post['is_update_taxes'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_taxes"><?php _e('Tax Items', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_refunds" value="0" /> <input type="checkbox" id="is_update_refunds" name="is_update_refunds" value="1" <?php echo $post['is_update_refunds'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_refunds"><?php _e('Refunds', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="hidden" name="is_update_total" value="0" /> <input type="checkbox" id="is_update_total" name="is_update_total" value="1" <?php echo $post['is_update_total'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_total"><?php _e('Order Total', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <!-- Do not update order custom fields --> <!-- <input type="hidden" name="is_update_custom_fields" value="0" /> --> <div class="input"> <input type="hidden" name="custom_fields_list" value="0" /> <input type="hidden" name="is_update_custom_fields" value="0" /> <input type="checkbox" id="is_update_custom_fields" name="is_update_custom_fields" value="1" <?php echo $post['is_update_custom_fields'] ? 'checked="checked"': '' ?> class="switcher"/> <label for="is_update_custom_fields"><?php _e('Custom Fields', PMWI_Plugin::TEXT_DOMAIN) ?></label> <!--a href="#help" class="wpallimport-help" title="<?php _e('If Keep Custom Fields box is checked, it will keep all Custom Fields, and add any new Custom Fields specified in Custom Fields section, as long as they do not overwrite existing fields. If \'Only keep this Custom Fields\' is specified, it will only keep the specified fields.', PMWI_Plugin::TEXT_DOMAIN) ?>">?</a--> <div class="switcher-target-is_update_custom_fields" style="padding-left:17px;"> <div class="input"> <input type="radio" id="update_custom_fields_logic_full_update" name="update_custom_fields_logic" value="full_update" <?php echo ( "full_update" == $post['update_custom_fields_logic'] ) ? 'checked="checked"': '' ?> class="switcher"/> <label for="update_custom_fields_logic_full_update"><?php _e('Update all Custom Fields', PMWI_Plugin::TEXT_DOMAIN) ?></label> </div> <div class="input"> <input type="radio" id="update_custom_fields_logic_only" name="update_custom_fields_logic" value="only" <?php echo ( "only" == $post['update_custom_fields_logic'] ) ? 'checked="checked"': '' ?> class="switcher"/> <label for="update_custom_fields_logic_only"><?php _e('Update only these Custom Fields, leave the rest alone', PMWI_Plugin::TEXT_DOMAIN) ?></label> <div class="switcher-target-update_custom_fields_logic_only pmxi_choosen" style="padding-left:17px;"> <span class="hidden choosen_values"><?php if (!empty($existing_meta_keys)) echo esc_html(implode(',', $existing_meta_keys));?></span> <input class="choosen_input" value="<?php if (!empty($post['custom_fields_list']) and "only" == $post['update_custom_fields_logic']) echo esc_html(implode(',', $post['custom_fields_list'])); ?>" type="hidden" name="custom_fields_only_list"/> </div> </div> <div class="input"> <input type="radio" id="update_custom_fields_logic_all_except" name="update_custom_fields_logic" value="all_except" <?php echo ( "all_except" == $post['update_custom_fields_logic'] ) ? 'checked="checked"': '' ?> class="switcher"/> <label for="update_custom_fields_logic_all_except"><?php _e('Leave these fields alone, update all other Custom Fields', PMWI_Plugin::TEXT_DOMAIN) ?></label> <div class="switcher-target-update_custom_fields_logic_all_except pmxi_choosen" style="padding-left:17px;"> <span class="hidden choosen_values"><?php if (!empty($existing_meta_keys)) echo esc_html(implode(',', $existing_meta_keys));?></span> <input class="choosen_input" value="<?php if (!empty($post['custom_fields_list']) and "all_except" == $post['update_custom_fields_logic']) echo esc_html(implode(',', $post['custom_fields_list'])); ?>" type="hidden" name="custom_fields_except_list"/> </div> </div> </div> </div> <?php // add-ons re-import options do_action('pmxi_reimport', $post_type, $post); ?> </div> </div> </div>