text
stringlengths
2
1.03M
@extends('user.template') @section('content') <div class="content"> <div class="page-inner"> <div class="page-header"> <h4 class="page-title">Dashboard</h4> <ul class="breadcrumbs"> <li class="nav-home"> <a href="#"> <i class="flaticon-home"></i> </a> </li> <li class="separator"> <i class="flaticon-right-arrow"></i> </li> <li class="nav-item"> <a href="#">Pages</a> </li> <li class="separator"> <i class="flaticon-right-arrow"></i> </li> <li class="nav-item"> <a href="#">Starter Page</a> </li> </ul> </div> <div class="card-header"> </div> <div class="card-body"> <form action="{{ route('guru.update', $user->id) }}" method="post"> @csrf @method('put') <b style="font-size: 15px;">Edit User Guru</b> <div class="form-group"> <label for="exampleFormControlFile1">nama :</label> <input type="text" name="name" value="{{ $user->name }}" class="form-control-file" id="exampleFormControlFile1"> </div> <div class="form-group"> <label for="namalengkap">email :</label> <input type="email" name="email" value="{{ $user->email }}" class="form-control" id="email" placeholder="email"> </div> <div class="form-group"> <label for="exampleFormControlSelect1">peran :</label> <select name="role" class="form-control" id="exampleFormControlSelect1"> <option value="Guru">Guru</option> <option value="Admin">Admin</option> </select> </div> <div class="form-group"> <label for="namalengkap">Password :</label> <input type="password" name="password" class=" form-control" placeholder="pass"> </div> <button type="submit" class="btn btn-outline-primary">Edit</button> </form> </div> </div> </div> @endsection
<?php namespace Illuminate\Tests\Integration\Queue; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Queue; use Orchestra\Testbench\TestCase; class JobChainingTest extends TestCase { public static $catchCallbackRan = false; protected function getEnvironmentSetUp($app) { $app['config']->set('app.debug', 'true'); $app['config']->set('database.default', 'testbench'); $app['config']->set('queue.connections.sync1', [ 'driver' => 'sync', ]); $app['config']->set('queue.connections.sync2', [ 'driver' => 'sync', ]); } protected function tearDown(): void { JobChainingTestFirstJob::$ran = false; JobChainingTestSecondJob::$ran = false; JobChainingTestThirdJob::$ran = false; static::$catchCallbackRan = false; } public function testJobsCanBeChainedOnSuccess() { JobChainingTestFirstJob::dispatch()->chain([ new JobChainingTestSecondJob, ]); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsCanBeChainedOnSuccessUsingPendingChain() { JobChainingTestFirstJob::withChain([ new JobChainingTestSecondJob, ])->dispatch(); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsCanBeChainedOnSuccessUsingBusFacade() { Bus::dispatchChain([ new JobChainingTestFirstJob, new JobChainingTestSecondJob, ]); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsCanBeChainedOnSuccessUsingBusFacadeAsArguments() { Bus::dispatchChain( new JobChainingTestFirstJob, new JobChainingTestSecondJob ); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsChainedOnExplicitDelete() { JobChainingTestDeletingJob::dispatch()->chain([ new JobChainingTestSecondJob, ]); $this->assertTrue(JobChainingTestDeletingJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsCanBeChainedOnSuccessWithSeveralJobs() { JobChainingTestFirstJob::dispatch()->chain([ new JobChainingTestSecondJob, new JobChainingTestThirdJob, ]); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); $this->assertTrue(JobChainingTestThirdJob::$ran); } public function testJobsCanBeChainedOnSuccessUsingHelper() { dispatch(new JobChainingTestFirstJob)->chain([ new JobChainingTestSecondJob, ]); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testJobsCanBeChainedViaQueue() { Queue::connection('sync')->push((new JobChainingTestFirstJob)->chain([ new JobChainingTestSecondJob, ])); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(JobChainingTestSecondJob::$ran); } public function testSecondJobIsNotFiredIfFirstFailed() { Queue::connection('sync')->push((new JobChainingTestFailingJob)->chain([ new JobChainingTestSecondJob, ])); $this->assertFalse(JobChainingTestSecondJob::$ran); } public function testSecondJobIsNotFiredIfFirstReleased() { Queue::connection('sync')->push((new JobChainingTestReleasingJob)->chain([ new JobChainingTestSecondJob, ])); $this->assertFalse(JobChainingTestSecondJob::$ran); } public function testThirdJobIsNotFiredIfSecondFails() { Queue::connection('sync')->push((new JobChainingTestFirstJob)->chain([ new JobChainingTestFailingJob, new JobChainingTestThirdJob, ])); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertFalse(JobChainingTestThirdJob::$ran); } public function testCatchCallbackIsCalledOnFailure() { Bus::chain([ new JobChainingTestFirstJob, new JobChainingTestFailingJob, new JobChainingTestSecondJob, ])->catch(static function () { self::$catchCallbackRan = true; })->dispatch(); $this->assertTrue(JobChainingTestFirstJob::$ran); $this->assertTrue(static::$catchCallbackRan); $this->assertFalse(JobChainingTestSecondJob::$ran); } public function testChainJobsUseSameConfig() { JobChainingTestFirstJob::dispatch()->allOnQueue('some_queue')->allOnConnection('sync1')->chain([ new JobChainingTestSecondJob, new JobChainingTestThirdJob, ]); $this->assertSame('some_queue', JobChainingTestFirstJob::$usedQueue); $this->assertSame('sync1', JobChainingTestFirstJob::$usedConnection); $this->assertSame('some_queue', JobChainingTestSecondJob::$usedQueue); $this->assertSame('sync1', JobChainingTestSecondJob::$usedConnection); $this->assertSame('some_queue', JobChainingTestThirdJob::$usedQueue); $this->assertSame('sync1', JobChainingTestThirdJob::$usedConnection); } public function testChainJobsUseOwnConfig() { JobChainingTestFirstJob::dispatch()->allOnQueue('some_queue')->allOnConnection('sync1')->chain([ (new JobChainingTestSecondJob)->onQueue('another_queue')->onConnection('sync2'), new JobChainingTestThirdJob, ]); $this->assertSame('some_queue', JobChainingTestFirstJob::$usedQueue); $this->assertSame('sync1', JobChainingTestFirstJob::$usedConnection); $this->assertSame('another_queue', JobChainingTestSecondJob::$usedQueue); $this->assertSame('sync2', JobChainingTestSecondJob::$usedConnection); $this->assertSame('some_queue', JobChainingTestThirdJob::$usedQueue); $this->assertSame('sync1', JobChainingTestThirdJob::$usedConnection); } public function testChainJobsUseDefaultConfig() { JobChainingTestFirstJob::dispatch()->onQueue('some_queue')->onConnection('sync1')->chain([ (new JobChainingTestSecondJob)->onQueue('another_queue')->onConnection('sync2'), new JobChainingTestThirdJob, ]); $this->assertSame('some_queue', JobChainingTestFirstJob::$usedQueue); $this->assertSame('sync1', JobChainingTestFirstJob::$usedConnection); $this->assertSame('another_queue', JobChainingTestSecondJob::$usedQueue); $this->assertSame('sync2', JobChainingTestSecondJob::$usedConnection); $this->assertNull(JobChainingTestThirdJob::$usedQueue); $this->assertNull(JobChainingTestThirdJob::$usedConnection); } } class JobChainingTestFirstJob implements ShouldQueue { use Dispatchable, Queueable; public static $ran = false; public static $usedQueue = null; public static $usedConnection = null; public function handle() { static::$ran = true; static::$usedQueue = $this->queue; static::$usedConnection = $this->connection; } } class JobChainingTestSecondJob implements ShouldQueue { use Dispatchable, Queueable; public static $ran = false; public static $usedQueue = null; public static $usedConnection = null; public function handle() { static::$ran = true; static::$usedQueue = $this->queue; static::$usedConnection = $this->connection; } } class JobChainingTestThirdJob implements ShouldQueue { use Dispatchable, Queueable; public static $ran = false; public static $usedQueue = null; public static $usedConnection = null; public function handle() { static::$ran = true; static::$usedQueue = $this->queue; static::$usedConnection = $this->connection; } } class JobChainingTestDeletingJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable; public static $ran = false; public function handle() { static::$ran = true; $this->delete(); } } class JobChainingTestReleasingJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable; public function handle() { $this->release(30); } } class JobChainingTestFailingJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable; public function handle() { $this->fail(); } }
<?php namespace app\common\model\shop; use app\common\model\BaseModel; /** * 商家用户权限模型 */ class Access extends BaseModel { protected $name = 'shop_access'; protected $pk = 'access_id'; /* * 获取所有权限 */ protected static function getAll($isShow = 1) { if($isShow != -1){ $data = static::withoutGlobalScope() ->where('is_show', '=', $isShow) ->order(['sort' => 'asc', 'create_time' => 'asc']) ->select(); }else{ $data = static::withoutGlobalScope() ->order(['sort' => 'asc', 'create_time' => 'asc']) ->select(); } return $data ? $data->toArray() : []; } protected static function getAllByAccessIds($where) { $sql = 'SELECT * FROM `kmdshop_shop_access` WHERE `access_id` IN (' . implode(',', $where) . ')'; return static::query($sql); } /** * 权限信息 */ public static function detail($where) { if(is_array($where)){ return static::where($where)->find(); } else{ return static::where('access_id', '=', $where)->find(); } } /** * 获取权限url集 */ public static function getAccessUrls($accessIds) { $urls = []; foreach (static::getAll(1) as $item) { in_array($item['access_id'], $accessIds) && $urls[] = $item['path']; } return $urls; } /** * 获取权限url集 */ public static function getAccessList($accessIds) { return (new static)::withoutGlobalScope()->where('access_id', 'in', $accessIds) ->order(['sort' => 'asc', 'create_time' => 'asc']) ->select(); } /** * 通过插件分类id查询 */ public static function getListByPlusCategoryId($category_id){ $model = new static(); return $model::withoutGlobalScope()->where('plus_category_id', '=', $category_id) ->where('is_show', '=', 1) ->order(['sort' => 'asc', 'create_time' => 'asc']) ->select(); } }
<?php use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model app\models\Usuario */ ?> <div class="usuario-create"> <?= $this->render('_form', [ 'model' => $model, ]) ?> </div>
<?php /** * This file is part of the Spryker Suite. * For full license information, please view the LICENSE file that was distributed with this source code. */ namespace Pyz\Zed\Quote; use Generated\Shared\Transfer\QuoteTransfer; use Spryker\Zed\Quote\QuoteConfig as SprykerQuoteConfig; class QuoteConfig extends SprykerQuoteConfig { /** * @return string[] */ public function getQuoteFieldsAllowedForSaving() { return array_merge(parent::getQuoteFieldsAllowedForSaving(), [ QuoteTransfer::BUNDLE_ITEMS, QuoteTransfer::CART_NOTE, #CartNoteFeature, QuoteTransfer::EXPENSES, #QuoteApprovalFeature QuoteTransfer::VOUCHER_DISCOUNTS, #QuoteApprovalFeature QuoteTransfer::GIFT_CARDS, QuoteTransfer::CART_RULE_DISCOUNTS, #QuoteApprovalFeature QuoteTransfer::PROMOTION_ITEMS, #QuoteApprovalFeature QuoteTransfer::IS_LOCKED, #QuoteApprovalFeature QuoteTransfer::QUOTE_REQUEST_VERSION_REFERENCE, QuoteTransfer::QUOTE_REQUEST_REFERENCE, QuoteTransfer::MERCHANT_REFERENCE, ]); } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>SB Admin - Login</title> <!-- Custom fonts for this template--> <link href="<?php echo base_url();?>/assets/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <!-- Custom styles for this template--> <link href="<?php echo base_url();?>/assets/css/sb-admin.css" rel="stylesheet"> </head> <body class="bg-dark"> <div class="container"> <div class="card card-login mx-auto mt-5"> <div class="card-header">Login</div> <div class="card-body"> <?php if ($this->session->flashdata('message')) { echo '<div class="alert alert-success">'.$this->session->flashdata('message').'</div>'; } ?> <form method="post" action="<?php echo base_url()?>admin/login/validation"> <div class="form-group"> <div class="form-label-group"> <input type="text" id="inputEmail" class="form-control" placeholder="Email address" name="admin_email" autofocus="autofocus" value="<?php echo set_value('admin_email');?>"> <label for="inputEmail">Email address</label> </div> </div> <div class="form-group"> <div class="form-label-group"> <input type="password" id="inputPassword" class="form-control" name="admin_password" placeholder="Password" value="<?php echo set_value('admin_password');?>"> <label for="inputPassword">Password</label> </div> </div> <div class="form-group"> <div class="checkbox"> <label> <input type="checkbox" value="remember-me"> Remember Password </label> </div> </div> <input type="submit" name="submit" class="btn btn-primary btn-block" value="Login"> <!-- <a class="btn btn-primary btn-block" href="index.html">Login</a> --> </form> <div class="text-center"> <a class="d-block small mt-3" href="<?php echo base_url();?>admin/register/">Register an Account</a> <a class="d-block small" href="forgot-password.html">Forgot Password?</a> </div> </div> </div> </div> <!-- Bootstrap core JavaScript--> <script src="<?php echo base_url();?>/assets/vendor/jquery/jquery.min.js"></script> <script src="<?php echo base_url();?>/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="<?php echo base_url();?>/assets/vendor/jquery-easing/jquery.easing.min.js"></script> </body> </html>
<?php namespace AppBundle\Controller; use AppBundle\Entity\Activity; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Request; /** * @Route("activity") */ class ActivityController extends Controller { /** * @Route("/", name="activity_index") * @Method("GET") */ public function indexAction() { $em = $this->getDoctrine()->getManager(); $activities = $em->getRepository('AppBundle:Activity')->findAll(); return $this->render('activity/index.html.twig', array( 'activities' => $activities, )); } /** * @Route("/new", name="activity_new") * @Method({"GET", "POST"}) */ public function newAction(Request $request) { $activity = new Activity(); $form = $this->createForm('AppBundle\Form\ActivityType', $activity); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { //var_dump($activity);exit; if ($activity->getSituation() == true) { $activity->setSituation(true); } $em = $this->getDoctrine()->getManager(); $em->persist($activity); $em->flush(); return $this->redirectToRoute('activity_index'); } return $this->render('activity/new.html.twig', array( 'activity' => $activity, 'form' => $form->createView(), )); } /** * @Route("/{id}", name="activity_show") * @Method("GET") */ public function showAction(Activity $activity) { $deleteForm = $this->createDeleteForm($activity); return $this->render('activity/show.html.twig', array( 'activity' => $activity, 'delete_form' => $deleteForm->createView(), )); } /** * @Route("/{id}/edit", name="activity_edit") * @Method({"GET", "POST"}) */ public function editAction(Request $request, Activity $activity) { $deleteForm = $this->createDeleteForm($activity); $editForm = $this->createForm('AppBundle\Form\ActivityType', $activity); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $this->getDoctrine()->getManager()->flush(); return $this->redirectToRoute('activity_index'); } return $this->render('activity/edit.html.twig', array( 'activity' => $activity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); } }
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Aviso extends Model { protected $fillable = [ 'tags', ]; // N aviso - 1 user public function user() { return $this->belongsTo(User::class); } // 1 aviso - 1 categoria public function categoria() { return $this->belongsTo(Categoria::class); } // 1 aviso - 1 eixo public function eixo() { return $this->belongsTo(Eixo::class); } }
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Schema; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { // Schema::defaultStringLength(191); } /** * Register any application services. * * @return void */ public function register() { // } }
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Anuncios_model extends CI_Model { const TABLE_NAME = 'anuncios'; const PRI_INDEX = 'id'; public function get($where = NULL) { $this->db->select('*'); $this->db->from(self::TABLE_NAME); if ($where !== NULL) { if (is_array($where)) { foreach ($where as $field=>$value) { $this->db->where($field, $value); } } else { $this->db->where(self::PRI_INDEX, $where); } } $result = $this->db->get()->result(); if ($result) { if ($where !== NULL) { return array_shift($result); } else { return $result; } } else { return false; } } public function get_all($where = NULL) { $this->db->select('*'); $this->db->from(self::TABLE_NAME); if ($where !== NULL) { if (is_array($where)) { foreach ($where as $field=>$value) { $this->db->where($field, $value); } } else { $this->db->where(self::PRI_INDEX, $where); } } $result = $this->db->get()->result(); if ($result) { return $result; } else { return false; } } public function insert(Array $data) { if ($this->db->insert(self::TABLE_NAME, $data)) { return $this->db->insert_id(); } else { return false; } } public function update(Array $data, $where = array()) { if (!is_array($where)) { $where = array(self::PRI_INDEX => $where); } $this->db->update(self::TABLE_NAME, $data, $where); return $this->db->affected_rows(); } public function delete($where = array()) { if (!is_array($where)) { $where = array(self::PRI_INDEX => $where); } $this->db->delete(self::TABLE_NAME, $where); return $this->db->affected_rows(); } }
{{-- @extends('layouts.app') @section('content') department.edit template @endsection --}}
<!DOCTYPE html> <html> <head> <?php include "description.php"; ?> <title><?php print $event_description; ?> - ScaleCycle Visualization</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map-canvas { height: 100% } #tool { top: 0; position: absolute } h1 { position:absolute; } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> </head> <body> <div id="tool" style="padding-left: 8px; padding-right: 8px"> <?php ini_set("display_errors", 1); include $_SERVER["DOCUMENT_ROOT"]."/server.php"; $is_valid = true; if(!isset($_POST["db_name_"])) $is_valid = false; if(!isset($_POST["tb_name_"])) $is_valid = false; if(!isset($_POST["tp_name_"])) $is_valid = false; if(!$is_valid) die("<p>Invalid rquest to this URL.</p>".PHP_EOL); $db_name = $_POST["db_name_"]; $tb_name = $_POST["tb_name_"]; $tp_name = $_POST["tp_name_"]; print "<p>Using database: {$db_name}</p>".PHP_EOL; print "<p>From table: {$tb_name}</p>".PHP_EOL; print "<p>With event type: {$tp_name}</p>".PHP_EOL; $mysqli = new mysqli($db_host, $db_user, $db_pwd, $db_name); if($mysqli->connect_errno) die("<p>Cannot connect to server: ".$db_host."</p>".PHP_EOL); $like_str = "heartbeat"; $res = $mysqli->query("SELECT timestamp, geotag, value_json FROM {$tb_name} WHERE event='{$tp_name}' AND geotag IS NOT NULL AND value_json LIKE '%{$like_str}%'"); print "<p>Fetched number of geotagged record(s): ".$res->num_rows."</p>".PHP_EOL; ?> <button onclick="drawOutput()">Layout</button> </div> <div id="map-canvas"></div> <script> function isNormalInteger(str) { var n = ~~Number(str); return String(n) === str && n >= 0; } function isFloat(val) { if(!val || (typeof val != "string" || val.constructor != String)) { return(false); } var isNumber = !isNaN(new Number(val)); if(isNumber) { if(val.indexOf('.') != -1) { return(true); } else { return(false); } } else { return(false); } } function drawOutput(){ var items = []; <?php $avg_lat = 0; $avg_lon = 0; $count = 0; while($row = $res->fetch_assoc()): $timestamp = $row["timestamp"]; $geotag = json_decode(str_replace("NaN", "null", $row["geotag"]), true); $lat = $geotag["lat"]; $lon = $geotag["lon"]; if($lat == 0 || $lon == 0) continue; $avg_lat += $lat; $avg_lon += $lon; $count += 1; print "items.push(new google.maps.LatLng({$lat}, {$lon}));".PHP_EOL; endwhile; if($count > 0) { $avg_lat /= $count; $avg_lon /= $count; } ?> //console.log(items); drawMap(items); } function squareDist(pFrom, pTo){ return (pFrom.lat()-pTo.lat())*(pFrom.lat()-pTo.lat()) +(pFrom.lng()-pTo.lng())*(pFrom.lng()-pTo.lng()); } function drawMap(items){ /* // map center: Aldrich Park, University of California, Irvine var myLatlng = new google.maps.LatLng(33.646052, -117.842745); */ // map center <?php print "var avgLat = ".$avg_lat.";".PHP_EOL; print "var avgLon = ".$avg_lon.";".PHP_EOL; ?> var myLatlng = new google.maps.LatLng(avgLat, avgLon); // map options var myOptions = { zoom: 16, center: myLatlng }; // standard map map = new google.maps.Map(document.getElementById("map-canvas"), myOptions); var markerDot = { url: "/img/red_dot.png", size: new google.maps.Size(9, 9), // The origin for this image is 0,0. origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(4, 4) } // To add the marker to the map, use the 'map' property // var marker = new google.maps.Marker({ // position: new google.maps.LatLng(33.646052, -117.842745), // map: map, // title:"Aldrich Park" // }); var segments = []; var segDist = 0.0003; var connects = []; for (var i = 0; i < items.length; ++i) { if(i == 0 || squareDist(items[i-1], items[i]) > segDist*segDist){ segments.push([]); if(i > 0){ connects.push([ items[i-1], items[i] ]); } } segThis = segments[segments.length-1]; segThis.push(items[i]); } for (var i = 0; i < segments.length; ++i) { // new google.maps.Marker({ // position: segments[i][0], // icon: markerDot, // map: map // }); if(segments[i].length > 1){ new google.maps.Polyline({ path: segments[i], geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 5, map: map }); } else { new google.maps.Marker({ position: segments[i][0], icon: markerDot, map: map }); } } for (var i = 0; i < connects.length; ++i) { new google.maps.Polyline({ path: connects[i], geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2, map: map }); } }; </script> </body> </html>
<?php /** * XSLT for XML sitemap * * @module sitemaps */ $xsl = '<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>' . esc_html( ent2ncr( __( 'XML Sitemap', 'jetpack' ) ) ) . '</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> body { font: 14px "Open Sans", Helvetica, Arial, sans-serif; margin: 0; } a { color: #3498db; text-decoration: none; } h1 { margin: 0; } #description { background-color: #81a844; color: #FFF; padding: 30px 30px 20px; } #description a { color: #fff; } #content { padding: 10px 30px 30px; background: #fff; } a:hover { border-bottom: 1px solid; } th, td { font-size: 12px; } th { text-align: left; border-bottom: 1px solid #ccc; } th, td { padding: 10px 15px; } .odd { background-color: #E7F1D4; } #footer { margin: 20px 30px; font-size: 12px; color: #999; } #footer a { color: inherit; } #description a, #footer a { border-bottom: 1px solid; } #description a:hover, #footer a:hover { border-bottom: none; } </style> </head> <body> <div id="description"> <h1>' . esc_html( ent2ncr( __( 'XML Sitemap', 'jetpack' ) ) ) . '</h1> <p>' . wp_kses( ent2ncr( sprintf( __( 'This is an XML Sitemap generated by <a href="%s" target="_blank">Jetpack</a>, meant to be consumed by search engines like <a href="%s" target="_blank">Google</a> or <a href="%s" target="_blank">Bing</a>.', 'jetpack' ), 'http://jetpack.com/', 'https://www.google.com', 'https://www.bing.com/' ) ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p> <p>' . wp_kses( ent2ncr( sprintf( __( 'You can find more information on XML sitemaps at <a href="%s" target="_blank">sitemaps.org</a>', 'jetpack' ), 'http://sitemaps.org' ) ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p> </div> <div id="content"> <table> <tr> <th>' . esc_html( ent2ncr( __( 'URL', 'jetpack' ) ) ) . '</th> <th>' . esc_html( ent2ncr( __( 'Images', 'jetpack' ) ) ) . '</th>'; if ( empty( $type ) ) : $xsl .= ' <th>' . esc_html( ent2ncr( __( 'Change Frequency', 'jetpack' ) ) ) . '</th> <th>' . esc_html( ent2ncr( __( 'Last Updated', 'jetpack' ) ) ) . '</th>'; endif; $xsl .= ' </tr> <xsl:variable name="lower" select="\'abcdefghijklmnopqrstuvwxyz\'"/> <xsl:variable name="upper" select="\'ABCDEFGHIJKLMNOPQRSTUVWXYZ\'"/> <xsl:for-each select="sitemap:urlset/sitemap:url"> <tr> <xsl:choose> <xsl:when test="position() mod 2 != 1"> <xsl:attribute name="class">odd</xsl:attribute> </xsl:when> </xsl:choose> <td> <xsl:variable name="itemURL"> <xsl:value-of select="sitemap:loc"/> </xsl:variable> <a href="{$itemURL}"> <xsl:value-of select="sitemap:loc"/> </a> </td> <td> <xsl:value-of select="count(image:image)"/> </td>'; if ( empty( $type ) ) : $xsl .= ' <td> <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/> </td> <td> <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(\' \', substring(sitemap:lastmod,12,5)))"/> </td>'; endif; $xsl .= ' </tr> </xsl:for-each> </table> </div> <div id="footer"> <p>' . wp_kses( sprintf( ent2ncr( __( '<em>Generated</em> by <a href="%s" target="_blank">Jetpack for WordPress</a>', 'jetpack' ) ), 'https://jetpack.com' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p> </div> </body> </html> </xsl:template> </xsl:stylesheet>';
<?php namespace Payjs\Payjs\Actions; use Dcat\Admin\Form; use Dcat\Admin\Grid\RowAction; class Refund extends RowAction { protected static $resolvedWindow; /** * @return array|null|string */ public function title() { return '<i class="feather icon-refresh-ccw"></i> 退款'; } public function render() { if (! static::$resolvedWindow) { static::$resolvedWindow = true; [$width, $height] = $this->parent->option('dialog_form_area'); Form::dialog('退款') ->click(".{$this->getElementClass()}") ->dimensions($width, $height) ->forceRefresh() ->success('Dcat.reload()'); } $this->setHtmlAttribute([ 'data-url' => "{$this->resource()}/refund?id=".$this->getKey(), ]); return parent::render(); // TODO: Change the autogenerated stub } }
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Anggota extends Model { protected $table='anggota'; use HasFactory; }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class AddFieldsToUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users', function (Blueprint $table) { $table->string('provider')->nullable(); $table->string('provider_id')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { $table->dropColumn('provider'); $table->dropColumn('provider_id'); }); } }
--TEST-- SPL: RecursiveTreeIterator --INI-- error_reporting=E_ALL&~E_NOTICE --FILE-- <?php $ary = array( 0 => array( "a", 1, ), "a" => array( 2, "b", 3 => array( 4, "c", ), "3" => array( 4, "c", ), ), ); $it = new RecursiveArrayIterator($ary); echo "-- flags = BYPASS_KEY --\n"; foreach(new RecursiveTreeIterator($it) as $k => $v) { echo "[$k] => $v\n"; } echo "-- flags = BYPASS_CURRENT --\n"; foreach(new RecursiveTreeIterator($it, RecursiveTreeIterator::BYPASS_CURRENT) as $k => $v) { echo "[$k] => $v\n"; } echo "-- flags = BYPASS_KEY|BYPASS_KEY --\n"; foreach(new RecursiveTreeIterator($it, RecursiveTreeIterator::BYPASS_CURRENT|RecursiveTreeIterator::BYPASS_KEY) as $k => $v) { echo "[$k] => $v\n"; } echo "-- flags = 0 --\n"; foreach(new RecursiveTreeIterator($it, 0) as $k => $v) { echo "[$k] => $v\n"; } echo "-- flags = 0, caching_it_flags = CachingIterator::CATCH_GET_CHILD --\n"; foreach(new RecursiveTreeIterator($it, 0, CachingIterator::CATCH_GET_CHILD) as $k => $v) { echo "[$k] => $v\n"; } ?> ===DONE=== --EXPECTF-- -- flags = BYPASS_KEY -- [0] => |-Array [0] => | |-a [1] => | \-1 [a] => \-Array [0] => |-2 [1] => |-b [3] => \-Array [0] => |-4 [1] => \-c -- flags = BYPASS_CURRENT -- [|-0] => Array [| |-0] => a [| \-1] => 1 [\-a] => Array [ |-0] => 2 [ |-1] => b [ \-3] => Array [ |-0] => 4 [ \-1] => c -- flags = BYPASS_KEY|BYPASS_KEY -- [0] => Array [0] => a [1] => 1 [a] => Array [0] => 2 [1] => b [3] => Array [0] => 4 [1] => c -- flags = 0 -- [|-0] => |-Array [| |-0] => | |-a [| \-1] => | \-1 [\-a] => \-Array [ |-0] => |-2 [ |-1] => |-b [ \-3] => \-Array [ |-0] => |-4 [ \-1] => \-c -- flags = 0, caching_it_flags = CachingIterator::CATCH_GET_CHILD -- [|-0] => |-Array [| |-0] => | |-a [| \-1] => | \-1 [\-a] => \-Array [ |-0] => |-2 [ |-1] => |-b [ \-3] => \-Array [ |-0] => |-4 [ \-1] => \-c ===DONE===
@include('layout.head') @include('layout.header') <!-- Left side column. contains the logo and sidebar --> @include('layout.sidebar') <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> EDIT EXISTING POSTS </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Dashboard</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <!-- left column --> <div class="col-md-8 col-md-offset-2"> <!-- general form elements --> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Edit Existing Posts</h3> </div> <!-- /.box-header --> <!-- form start --> <form method="POST" enctype="multipart/form-data" action="{{ route('editpost') }}"> @csrf <div class="box-body"> <div class="form-group"> <label for="exampleInputEmail1">Blog title</label> <input type="hidden" name="id" value="{{ $postedit->id }}" /> <input type="text" class="form-control" value="{{ $postedit->blog_title }}" name="blogtitle" required> </div> <div class="form-group"> <label for="exampleInputEmail1">Blog Content</label> <textarea cols=10 rows=10 name="blogpost" class="form-control" required>{{ $postedit->blog_post }}</textarea> </div> <div class="form-group"> <label for="exampleInputPassword1">Blog Image</label> <div class="col-md-7"> <input type="file" class="form-control" name="blogimg"> </div> <div class="col-md-4"> <img src="{{ asset('storage/blog/img/'.$postedit->image) }}" width="100" height="100" /> </div> </div> </div> <!-- /.box-body --> <div class="box-footer"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> </div> <!-- /.box --> </div> <!--/.col (left) --> </div> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> @include('layout.footer')
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model common\models\Locality */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="locality-form"> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'short_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'long_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'short_name_en')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'long_name_en')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'administritative_level_area_1_id')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'administritative_level_area_2_id')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'type')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'postal_code')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'latitude')->textInput() ?> <?= $form->field($model, 'longitude')->textInput() ?> <?= $form->field($model, 'created_at')->textInput() ?> <?= $form->field($model, 'updated_at')->textInput() ?> <div class="form-group"> <?= Html::submitButton(Yii::t('sys.erp', 'Save'), ['class' => 'btn btn-success']) ?> </div> <?php ActiveForm::end(); ?> </div>
<!doctype html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ config('app.name', 'Laravel-2FA') }}</title> <link rel="stylesheet" href="{{ mix('css/app.css') }}"> <style> html, body { height: 100%; } body { display: flex; align-items: center; padding-top: 75px; padding-bottom: 75px; background-color: #f5f5f5; } .auth-form { width: 100%; min-width: 450px; padding: 25px; margin: auto; } </style> <script src="{{ mix('js/app.js') }}" defer></script> </head> <body class="d-flex h-100 text-center"> <div class="cover-container d-flex mx-auto flex-column "> @yield('content') </div> </body> </html>
@extends('main') @section('title', ' - Utilisateur') @section('main-content') <div class="container col-lg-10 col-md-12 col-xs-12"> <br> <h3>Modifier l'utilisateur</h3> <br> <form method="POST" enctype="multipart/form-data" action="{{ route('saveupdateuser') }}"> @csrf <div class="row"> <div class="col-md-6"> <input type="hidden" name="id" id="id" value="{{ $id }}"> <input type="text" name="name" id="name" value="{{ $user->name }}" class="form-control shadow" required /> <br/> <input type="email" name="email" id="email" value="{{ $user->email }}" class="form-control shadow" required /> <br/> <input type="password" name="password" id="password" placeholder="Mot de passe" class="form-control shadow" /> <br/> <input type="file" name="image" id="image" placeholder="Votre photo" class="form-control shadow" required /> <br/> </div> <div class="col-md-6"> <select name="genre" id="genre" class="form-control shadow" required> <option value="{{ $user->genre }}">{{ $user->genre }}</option> <option value="Homme">Homme</option> <option value="Femme">Femme</option> </select> <br/> <input type="phone" name="phone" id="phone" value="{{ $user->phone }}" class="form-control shadow" required /> <br/> <input type="text" name="poste" id="poste" value="{{ $user->poste }}" class="form-control shadow" required /> <br/> <select name="ville_name" id="ville_name" class="form-control shadow" required> <option value="{{ $user->ville_name }}">{{ $user->ville_name }}</option> <option value="Douala">Douala</option> <option value="Yaounde">Yaounde</option> <option value="Edea">Edea</option> <option value="Belabo">Belabo</option> <option value="Mbitom">Mbitom</option> <option value="Ngaoundere">Ngaoundere</option> </select> <br/> <select name="type_user" id="type_user" class="form-control shadow" required> <option value="">Type de prescripteur</option> <option value="doctor">Doctor</option> <option value="director">Director</option> </select> <br/> </div> </div> <br> <button type="submit" class="btn btn-success shadow">Enregistrer</button> </form> <br> </div> </div> @endsection
<div class="content"> @can('hospital_five_c_network_create') <div style="margin-bottom: 10px;" class="row"> <div class="col-lg-12"> <a class="btn btn-success" href="{{ route('admin.hospital-five-c-networks.create') }}"> {{ trans('global.add') }} {{ trans('cruds.hospitalFiveCNetwork.title_singular') }} </a> </div> </div> @endcan <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> {{ trans('cruds.hospitalFiveCNetwork.title_singular') }} {{ trans('global.list') }} </div> <div class="panel-body"> <div class="table-responsive"> <table class=" table table-bordered table-striped table-hover datatable datatable-mmConfigurationHospitalFiveCNetworks"> <thead> <tr> <th width="10"> </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.id') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.name') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.user_name') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.connection_date') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.cr_router_license_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.dr_router_license_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.mm_router_license_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.ct_router_license_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.mri_router_license_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.router_reinstallation_date') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.connection_status') }} </th> <th> {{ trans('cruds.hospitalFiveCNetwork.fields.machine_available_profile') }} </th> <th> &nbsp; </th> </tr> </thead> <tbody> @foreach($hospitalFiveCNetworks as $key => $hospitalFiveCNetwork) <tr data-entry-id="{{ $hospitalFiveCNetwork->id }}"> <td> </td> <td> {{ $hospitalFiveCNetwork->id ?? '' }} </td> <td> {{ $hospitalFiveCNetwork->name ?? '' }} </td> <td> {{ $hospitalFiveCNetwork->user_name ?? '' }} </td> <td> {{ $hospitalFiveCNetwork->connection_date ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::CR_ROUTER_LICENSE_STATUS_SELECT[$hospitalFiveCNetwork->cr_router_license_status] ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::DR_ROUTER_LICENSE_STATUS_SELECT[$hospitalFiveCNetwork->dr_router_license_status] ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::MM_ROUTER_LICENSE_STATUS_SELECT[$hospitalFiveCNetwork->mm_router_license_status] ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::CT_ROUTER_LICENSE_STATUS_SELECT[$hospitalFiveCNetwork->ct_router_license_status] ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::MRI_ROUTER_LICENSE_STATUS_SELECT[$hospitalFiveCNetwork->mri_router_license_status] ?? '' }} </td> <td> {{ $hospitalFiveCNetwork->router_reinstallation_date ?? '' }} </td> <td> {{ App\Models\HospitalFiveCNetwork::CONNECTION_STATUS_SELECT[$hospitalFiveCNetwork->connection_status] ?? '' }} </td> <td> {{ $hospitalFiveCNetwork->machine_available_profile->hospital_name ?? '' }} </td> <td> @can('hospital_five_c_network_show') <a class="btn btn-xs btn-primary" href="{{ route('admin.hospital-five-c-networks.show', $hospitalFiveCNetwork->id) }}"> {{ trans('global.view') }} </a> @endcan @can('hospital_five_c_network_edit') <a class="btn btn-xs btn-info" href="{{ route('admin.hospital-five-c-networks.edit', $hospitalFiveCNetwork->id) }}"> {{ trans('global.edit') }} </a> @endcan @can('hospital_five_c_network_delete') <form action="{{ route('admin.hospital-five-c-networks.destroy', $hospitalFiveCNetwork->id) }}" method="POST" onsubmit="return confirm('{{ trans('global.areYouSure') }}');" style="display: inline-block;"> <input type="hidden" name="_method" value="DELETE"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="submit" class="btn btn-xs btn-danger" value="{{ trans('global.delete') }}"> </form> @endcan </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> @section('scripts') @parent <script> $(function () { let dtButtons = $.extend(true, [], $.fn.dataTable.defaults.buttons) @can('hospital_five_c_network_delete') let deleteButtonTrans = '{{ trans('global.datatables.delete') }}' let deleteButton = { text: deleteButtonTrans, url: "{{ route('admin.hospital-five-c-networks.massDestroy') }}", className: 'btn-danger', action: function (e, dt, node, config) { var ids = $.map(dt.rows({ selected: true }).nodes(), function (entry) { return $(entry).data('entry-id') }); if (ids.length === 0) { alert('{{ trans('global.datatables.zero_selected') }}') return } if (confirm('{{ trans('global.areYouSure') }}')) { $.ajax({ headers: {'x-csrf-token': _token}, method: 'POST', url: config.url, data: { ids: ids, _method: 'DELETE' }}) .done(function () { location.reload() }) } } } dtButtons.push(deleteButton) @endcan $.extend(true, $.fn.dataTable.defaults, { orderCellsTop: true, order: [[ 1, 'desc' ]], pageLength: 100, }); let table = $('.datatable-mmConfigurationHospitalFiveCNetworks:not(.ajaxTable)').DataTable({ buttons: dtButtons }) $('a[data-toggle="tab"]').on('shown.bs.tab click', function(e){ $($.fn.dataTable.tables(true)).DataTable() .columns.adjust(); }); }) </script> @endsection
<?php declare(strict_types=1); namespace App\Entity\ApiGenerator; use App\Entity; use Psr\Http\Message\UriInterface; class StationQueueApiGenerator { protected SongApiGenerator $songApiGenerator; public function __construct(SongApiGenerator $songApiGenerator) { $this->songApiGenerator = $songApiGenerator; } public function __invoke( Entity\StationQueue $record, ?UriInterface $baseUri = null, bool $allowRemoteArt = false ): Entity\Api\NowPlaying\StationQueue { $response = new Entity\Api\NowPlaying\StationQueue(); $response->cued_at = $record->getTimestampCued(); $response->played_at = $record->getTimestampPlayed(); $response->duration = (int)$record->getDuration(); $response->is_request = $record->getRequest() !== null; if ($record->getPlaylist() instanceof Entity\StationPlaylist) { $response->playlist = $record->getPlaylist()->getName(); } else { $response->playlist = ''; } $recordMedia = $record->getMedia(); if (null !== $recordMedia) { $response->song = ($this->songApiGenerator)( song: $recordMedia, station: $record->getStation(), baseUri: $baseUri, allowRemoteArt: $allowRemoteArt ); } else { $response->song = ($this->songApiGenerator)( song: $record, station: $record->getStation(), baseUri: $baseUri, allowRemoteArt: $allowRemoteArt ); } return $response; } }
<?php use App\Category; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; class CategorySeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { DB::table('categories')->truncate(); factory(Category::class, 60)->create(); } }
<?php /** * @copyright Frederic G. Østby * @license http://www.makoframework.com/license */ namespace mako\http\routing; use Closure; /** * Route. * * @author Frederic G. Østby */ class Route { /** * Methods. * * @var array */ protected $methods; /** * Route. * * @var string */ protected $route; /** * Route action. * * @var string|\Closure */ protected $action; /** * Route name. * * @var string */ protected $name; /** * Route action namespace. * * @var string */ protected $namespace; /** * Route prefix. * * @var string */ protected $prefix; /** * Does the route have a trailing slash? * * @var bool */ protected $hasTrailingSlash; /** * Route patterns. * * @var array */ protected $patterns = []; /** * Middleware. * * @var array */ protected $middleware = []; /** * Constraints. * * @var array */ protected $constraints = []; /** * Parameters. * * @var array */ protected $parameters = []; /** * Constructor. * * @param array $methods Route methods * @param string $route Route * @param string|\Closure $action Route action * @param string|null $name Route name */ public function __construct(array $methods, string $route, $action, string $name = null) { $this->methods = $methods; $this->route = $route; $this->action = $action; $this->name = $name; $this->hasTrailingSlash = (substr($route, -1) === '/'); } /** * Returns the HTTP methods the route responds to. * * @return array */ public function getMethods(): array { return $this->methods; } /** * Returns the route. * * @return string */ public function getRoute(): string { return $this->prefix . $this->route; } /** * Returns the route action. * * @return string|\Closure */ public function getAction() { if($this->action instanceof Closure || empty($this->namespace)) { return $this->action; } return $this->namespace . $this->action; } /** * Returns the route name. * * @return string|null */ public function getName() { return $this->name; } /** * Returns the middleware. * * @return array */ public function getMiddleware(): array { return $this->middleware; } /** * Returns the constraints. * * @return array */ public function getConstraints(): array { return $this->constraints; } /** * Sets the route parameters. * * @param array $parameters Parameters */ public function setParameters(array $parameters) { $this->parameters = $parameters; } /** * Returns all the route parameters. * * @return array */ public function getParameters(): array { return $this->parameters; } /** * Returns the named parameter value. * * @param string $name Parameter name * @param mixed $default Default value * @return mixed */ public function getParameter(string $name, $default = null) { return $this->parameters[$name] ?? $default; } /** * Sets the route action namespace. * * @param string $namespace Route action namespace * @return \mako\http\routing\Route */ public function namespace(string $namespace): Route { $this->namespace .= $namespace . '\\'; return $this; } /** * Adds a prefix to the route. * * @param string $prefix Route prefix * @return \mako\http\routing\Route */ public function prefix(string $prefix): Route { if(!empty($prefix)) { $this->prefix .= '/' . trim($prefix, '/'); } return $this; } /** * Sets the custom patterns. * * @param array $patterns Array of patterns * @return \mako\http\routing\Route */ public function patterns(array $patterns): Route { $this->patterns = $patterns + $this->patterns; return $this; } /** * Adds a set of middleware. * * @param array|string $middleware Middleware * @return \mako\http\routing\Route */ public function middleware($middleware): Route { $this->middleware = array_merge($this->middleware, (array) $middleware); return $this; } /** * Adds a set of constraints. * * @param array|string $constraint Constraint * @return \mako\http\routing\Route */ public function constraint($constraint): Route { $this->constraints = array_merge($this->constraints, (array) $constraint); return $this; } /** * Returns TRUE if the route allows the specified method or FALSE if not. * * @param string $method Method * @return bool */ public function allowsMethod(string $method): bool { return in_array($method, $this->methods); } /** * Returns TRUE if the route has a trailing slash and FALSE if not. * * @return bool */ public function hasTrailingSlash(): bool { return $this->hasTrailingSlash; } /** * Returns the regex needed to match the route. * * @return string */ public function getRegex(): string { $route = $this->getRoute(); if(strpos($route, '?')) { $route = preg_replace('/\/{(\w+)}\?/', '(?:/{$1})?', $route); } if(!empty($this->patterns)) { foreach($this->patterns as $key => $pattern) { $route = str_replace('{' . $key . '}', '(?P<' . $key . '>' . $pattern . ')', $route); } } $route = preg_replace('/{((\d*[a-z_]\d*)+)}/i', '(?P<$1>[^/]++)', $route); if($this->hasTrailingSlash) { $route .= '?'; } return '#^' . $route . '$#su'; } }
<?php /** * Trean application API * * Copyright 2002-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (BSD). If you * did not receive this file, see http://www.horde.org/licenses/bsdl.php. * * @author Mike Cochrane <mike@graftonhall.co.nz> */ /* Determine the base directories. */ if (!defined('TREAN_BASE')) { define('TREAN_BASE', realpath(__DIR__ . '/..')); } if (!defined('HORDE_BASE')) { /* If Horde does not live directly under the app directory, the HORDE_BASE * constant should be defined in config/horde.local.php. */ if (file_exists(TREAN_BASE . '/config/horde.local.php')) { include TREAN_BASE . '/config/horde.local.php'; } else { define('HORDE_BASE', realpath(TREAN_BASE . '/..')); } } /* Load the Horde Framework core (needed to autoload * Horde_Registry_Application::). */ require_once HORDE_BASE . '/lib/core.php'; class Trean_Application extends Horde_Registry_Application { /** */ public $version = 'H5 (1.1.0-git)'; /** * Global variables defined: * - $trean_db: Horde_Db object * - $trean_gateway: Trean_Bookmarks object */ protected function _init() { /* For now, autoloading the Content_* classes depend on there being a * registry entry for the 'content' application that contains at least * the fileroot entry. */ $GLOBALS['injector']->getInstance('Horde_Autoloader') ->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix( '/^Content_/', $GLOBALS['registry']->get('fileroot', 'content') . '/lib/' )); if (!class_exists('Content_Tagger')) { throw new Horde_Exception('The Content_Tagger class could not be found. Make sure the Content application is installed.'); } $GLOBALS['injector']->bindFactory('Trean_TagBrowser', 'Trean_Factory_TagBrowser', 'create'); // Set the timezone variable. $GLOBALS['registry']->setTimeZone(); // Create db and gateway instances. $GLOBALS['trean_db'] = $GLOBALS['injector'] ->getInstance('Horde_Core_Factory_Db') ->create('trean', 'storage'); $GLOBALS['trean_gateway'] = $GLOBALS['injector'] ->getInstance('Trean_Bookmarks'); } /** */ public function perms() { return array( 'max_bookmarks' => array( 'title' => _("Maximum Number of Bookmarks"), 'type' => 'int' ), ); } /** */ public function menu($menu) { $menu->add(Horde::url('browse.php'), _("_Browse"), 'trean-browse', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null); $menu->add(Horde::url('data.php'), _("_Import"), 'horde-data'); } /** * Add additional items to the sidebar. * * @param Horde_View_Sidebar $sidebar The sidebar object. */ public function sidebar($sidebar) { $sidebar->addNewButton(_("_New Bookmark"), Horde::url('add.php')); $sidebar->containers['tags'] = array( 'header' => array( 'id' => 'trean-toggle-tags', 'label' => _("Tags"), 'collapsed' => false, ), ); $tagger = $GLOBALS['injector']->getInstance('Trean_Tagger'); $tags = $tagger->listBookmarkTags(); natcasesort($tags); foreach ($tags as $tag) {; $url = Horde::url('tag/' . urlencode($tag)); $row = array( 'url' => $url, 'cssClass' => 'trean-tag', 'label' => $tag, ); $sidebar->addRow($row, 'tags'); } } /** */ public function cleanupData() { $GLOBALS['import_step'] = 1; return Horde_Data::IMPORT_FILE; } /** */ public function removeUserData($user) { global $injector; try { $userId = current($injector->getInstance('Content_Users_Manager')->ensureUsers($user)); $bookmarks = $GLOBALS['trean_gateway']->listBookmarks('title', 0, 0, 0, $userId); foreach ($bookmarks as $bookmark) { $GLOBALS['trean_gateway']->removeBookmark($bookmark); } } catch (Content_Exception $e) { throw new Trean_Exception(sprintf(_("There was an error removing bookmarks for %s. Details have been logged."), $user)); Horde::log($e, 'NOTICE'); } } }
<?php namespace framework\tests\Container\mock; class DependencyLoopB { public function __construct(DependencyLoopC $c) {} }
<?php namespace App\Http\Controllers; use Illuminate\Support\Facades\Auth; use Illuminate\Http\Request; use App\Models\User; use App\Models\Subscriptions; use App\Models\AdminSettings; use App\Models\Withdrawals; use App\Models\Notifications; use App\Models\Transactions; use Fahim\PaypalIPN\PaypalIPNListener; use App\Helper; use Mail; use Carbon\Carbon; use Illuminate\Support\Facades\Validator; use App\Models\PaymentGateways; use Image; class SubscriptionsController extends Controller { use Traits\Functions; public function __construct(Request $request, AdminSettings $settings) { $this->request = $request; $this->settings = $settings::first(); } /** * Buy subscription * * @return Response */ public function buy() { // Find the User $user = User::whereVerifiedId('yes') ->whereId($this->request->id) ->where('id', '<>', auth()->user()->id) ->firstOrFail(); // Check if subscription exists $checkSubscription = auth()->user()->mySubscriptions() ->whereStripePrice($user->plan) ->where('ends_at', '>=', now())->first(); if ($checkSubscription) { return response()->json([ 'success' => false, 'errors' => ['error' => trans('general.subscription_exists')], ]); } //<---- Validation $validator = Validator::make($this->request->all(), [ 'payment_gateway' => 'required', 'agree_terms' => 'required', ]); if ($validator->fails()) { return response()->json([ 'success' => false, 'errors' => $validator->getMessageBag()->toArray(), ]); } // Wallet if ($this->request->payment_gateway == 'wallet') { return $this->sendWallet(); } // Get name of Payment Gateway $payment = PaymentGateways::findOrFail($this->request->payment_gateway); // Send data to the payment processor return redirect()->route(str_slug($payment->name), $this->request->except(['_token'])); }// End Method Send /** * Free subscription * */ public function subscriptionFree() { // Find user $creator = User::whereId($this->request->id) ->whereFreeSubscription('yes') ->whereVerifiedId('yes') ->firstOrFail(); // Verify subscription exists $subscription = Subscriptions::whereUserId(auth()->user()->id) ->whereStripePrice($creator->plan) ->whereFree('yes') ->first(); if ($subscription) { return response()->json([ 'success' => false, 'error' => trans('general.subscription_exists'), ]); } // Insert DB $sql = new Subscriptions(); $sql->user_id = auth()->user()->id; $sql->stripe_price = $creator->plan; $sql->free = 'yes'; $sql->save(); // Send Email to User and Notification Subscriptions::sendEmailAndNotify(auth()->user()->name, $creator->id); return response()->json([ 'success' => true, ]); } // End Method SubscriptionFree public function cancelFreeSubscription($id) { $checkSubscription = auth()->user()->userSubscriptions()->whereId($id)->firstOrFail(); $creator = User::wherePlan($checkSubscription->stripe_price)->first(); // Delete Subscription $checkSubscription->delete(); session()->put('subscription_cancel', trans('general.subscription_cancel')); return redirect($creator->username); }// End Method cancelFreeSubscription public function cancelWalletSubscription($id) { $subscription = auth()->user()->userSubscriptions()->whereId($id)->firstOrFail(); $creator = User::wherePlan($subscription->stripe_price)->first(); // Delete Subscription $subscription->cancelled = 'yes'; $subscription->save(); session()->put('subscription_cancel', trans('general.subscription_cancel')); return redirect($creator->username); }// End Method cancelWalletSubscription /** * Send Tip Wallet * * @return Response */ protected function sendWallet() { // Find user $creator = User::whereId($this->request->id) ->whereVerifiedId('yes') ->firstOrFail(); $amount = $creator->price; if (auth()->user()->wallet < $amount) { return response()->json([ "success" => false, "errors" => ['error' => __('general.not_enough_funds')] ]); } // Insert DB $subscription = new Subscriptions(); $subscription->user_id = auth()->user()->id; $subscription->stripe_price = $creator->plan; $subscription->ends_at = now()->add(1, 'month'); $subscription->rebill_wallet = 'on'; $subscription->save(); // Admin and user earnings calculation $earnings = $this->earningsAdminUser($creator->custom_fee, $amount, null, null); // Insert Transaction // $txnId, $userId, $subscriptionsId, $subscribed, $amount, $userEarning, $adminEarning, $paymentGateway, $type, $percentageApplied $this->transaction('subw_'.str_random(25), auth()->user()->id, $subscription->id, $creator->id, $amount, $earnings['user'], $earnings['admin'], 'Wallet', 'subscription', $earnings['percentageApplied']); // Subtract user funds auth()->user()->decrement('wallet', $amount); // Add Earnings to User $creator->increment('balance', $earnings['user']); // Send Email to User and Notification Subscriptions::sendEmailAndNotify(auth()->user()->name, $creator->id); return response()->json([ 'success' => true, 'url' => url('buy/subscription/success', $creator->username) ]); } // End sendTipWallet }
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v9/enums/search_engine_results_page_type.proto namespace Google\Ads\GoogleAds\V9\Enums; if (false) { /** * This class is deprecated. Use Google\Ads\GoogleAds\V9\Enums\SearchEngineResultsPageTypeEnum\SearchEngineResultsPageType instead. * @deprecated */ class SearchEngineResultsPageTypeEnum_SearchEngineResultsPageType {} } class_exists(SearchEngineResultsPageTypeEnum\SearchEngineResultsPageType::class); @trigger_error('Google\Ads\GoogleAds\V9\Enums\SearchEngineResultsPageTypeEnum_SearchEngineResultsPageType is deprecated and will be removed in the next major release. Use Google\Ads\GoogleAds\V9\Enums\SearchEngineResultsPageTypeEnum\SearchEngineResultsPageType instead', E_USER_DEPRECATED);
@if(count($errors) > 0) @foreach($errors->all() as $error) <div class= "alert alert-danger"> {{$error}} </div> @endforeach @endif @if(session('success')) <div class="alert alert-success alert-dismissible text-center animated fadeInDown" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> {{session('success')}} </div> @endif @if(session('error')) <div class="alert alert-danger alert-dismissible text-center animated fadeInDown" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> {{session('error')}} </div> @endif <script> $(document).ready(function(){     setTimeout(function(){ if ($('.alert').length > 0) { $('.alert').addClass("fadeOutUp"); } }, 4000); }); </script>
<?php namespace Ciencuadras\Resource; use Ciencuadras\AuthManager; /** * Created by PhpStorm. * User: ralmira * Date: 8/10/2018 * Time: 8:38 AM */ class DistribucionEspacio extends BaseResource { public function __construct(AuthManager $authManager) { parent::__construct("distribuciones-espacio", $authManager); } }
<!-- @extends('/layouts.master') @section('title', 'Partida') @section('movimiento') class="active" @endsection @section('content') @parent @if(Auth::user() AND Auth::user()->tienePermiso('Agregar Transaccion') AND $date = date('Y') == $anno->iValor) <section class="container-fluid"> <br> @if (count($errors) > 0) <div class="alert alert-danger"> <strong>Oops!</strong> Error en la transaccion<br><br> <ul> @foreach ($errors->all() as $error) <li><% $error %></li> @endforeach </ul> </div> @endif @if (session('mensaje')) <div class="alert alert-success"> <strong>Bien!</strong><br><br> <ul> <li>Se agrego la Factura</li> </ul> </div> @endif <form class="col-md-12 alert container-fluid table-responsive form-horizontal" method="post" action="/transaccion" onsubmit="buttonName.disabled=true; return true;"> {!!csrf_field()!!} <div class="col-md-12"> <h2>Nuevo Movimiento de Presupuesto</h2> <h3>Factura Pendiente</h3> </div> <div class="container-fluid col-md-7"> <div class="form-group"> <label class="col-md-6 control-label" >Tipo de Transacción:</label> <div class="col-md-6"> <input type="text" name="vTipoFactura" value="Factura pendiente" readonly> <!--<select name="vTipoFactura" class="form-control" required ng-model="tipo"> <option value="Factura credito" ng-selected="true" >Factura Credito</option> <option value="Factura pendiente" >Factura Pendiente</option> <option value="Reintegro de caja chica" >Reintegro de Caja Chica</option> <option value="Solicitud GECO" >Solicitud GECO</option> <option value="Cancelacion GECO">Cancelacion GECO</option> <option value="Pases Adicionales" >Pases Adicionales</option> <option value="Pases Anulacion" >Pases Anulación</option> <option value="Requisicion" >Requesición Paq. Basico</option> <option value="Orden de servicio" >Ordenes de Servicio</option> <option value="Otros">Otros</option> </select>--> </div> </div> <div class="form-group"> <label class="col-md-6 control-label">Observacion:</label> <div class="col-md-6"> <textarea name="vDescripcionFactura" class="form-control" rows="2"></textarea> </div> </div> </div> <div class="container-fluid col-md-5"> <div class="form-group"> <label class="col-md-5 control-label">Fecha:</label> <div class="col-md-7"> <input type="date" class="form-control" name="dFechaFactura" max="<%date('Y-m-d')%>" required placeholder="AAAA-MM-DD" maxlength="10"> </div> </div> <div class="form-group text-left"> <label class="col-md-6 control-label">Num. Documento:</label> <div class="col-md-6"> <input type="text" class="form-control" name="vDocumento" value="N/A"> </div> </div > </div> <div class="container-fluid table-responsive col-md-12" ng-controller="facturaTemplate"> <button class="btn btn-primary btn-sm" ng-click="agregarFila()">Agregar Partida</button> <table class="table table-condensed text-center col-md-12"> <thead> <tr> <th class="col-md-6 text-center">Partida</th> <th class="col-md-3 text-center">Detalle</th> <th class="col-md-3 text-center">Monto</th> </tr> </thead> <tbody id="factura"> <tr ng-repeat="x in factura"> <td> <div ng-controller="coordinacionTemplate"> <div class="container-fluid search-container form-horizontal" ng-controller="presupuestoTemplate"> <div class="container-fluid" ng-controller="partidaTemplate" > <div class="col-md-12"> <div class="panel panel-primary"> <div class="panel-body"> <div class="form-group col-md-12"> <strong>Unidad Ejecutora</strong> <select ng-model="coorSelected" ng-change="pSelected = 0; partSelected = 0" class="form-control"> <option ng-repeat="coordinacion in modelC" value="{{coordinacion.idCoordinacion}}">{{coordinacion.idCoordinacion}}-{{coordinacion.vNombreCoordinacion}}</option> </select> </div> <div class="form-group col-md-12" > <strong>Presupuesto</strong> <select ng-model="pSelected" class="form-control"> <option ng-if="presupuesto.tCoordinacion_idCoordinacion == coorSelected" ng-repeat="presupuesto in modelPr" value="{{presupuesto.idPresupuesto}}">{{presupuesto.vNombrePresupuesto}}-{{presupuesto.anno}}</option> </select> </div> <strong>Partida</strong> <div class="form-group col-md-12"> <select ng-model="partSelected" class="form-control"> <option ng-if="partida.tPresupuesto_idPresupuesto == pSelected" ng-repeat="partida in modelP" value="{{partida.id}}" >{{partida.codPartida}}-{{partida.vNombrePartida}}</option> </select> </div> <div> <hr> <div ng-if="partida.id == partSelected" ng-repeat="partida in modelP" ng-init="x.partida=partida.id"> <strong>Presupuesto Incial: <small>{{partida.iPresupuestoInicial | currency: "₡":0}}</small><br> Presupuesto Modificado: <small>{{partida.iPresupuestoModificado | currency: "₡":0}}</small> <br> Gasto: <small>{{partida.iGasto | currency: "₡":0}} </small> <br> Reserva: <small>{{partida.iReserva | currency: "₡":0}} </small> <br> Saldo: <small>{{partida.iSaldo | currency: "₡":0}}</small></strong> <div ng-if="tipo != 'Pases Anulacion'" ng-init="x.maximo=partida.iSaldo"> </div> </div> <input type="hidden" name="id{{$index}}" required value="{{x.partida}}"> </div> </div> </div> </div> </div> </div> </div> </td> <td>{{}} <div class="form-group"> <div class="col-md-12"> <div ng-if="tipo != 'Cancelacion GECO' && tipo != 'Pases Anulacion' && tipo != 'Pases Adicionales'"> <input type="text" class="form-control" ng-model="x.detalle" required name="detalle{{$index}}"> </div> <div ng-if="tipo == 'Cancelacion GECO' || tipo == 'Pases Anulacion'" ng-controller="reservaTemplate"> <select class="form-control" required name="detalle{{$index}}" ng-model="resSelected"> <option ng-repeat="reserva in modelRe | filter : search | orderBy : myOrder track by $index" ng-if="reserva.tPartida_idPartida == x.partida" value="{{reserva.vReserva}}"> {{reserva.vDocumento}}-{{reserva.vDetalle}}- {{reserva.iMontoFactura | currency: "₡":0}} </option> </select> <div ng-repeat="reserva in modelRe" ng-if="resSelected == reserva.vReserva" ng-init="x.maximo = reserva.iMontoFactura"> </div> </div> <div ng-if="tipo == 'Pases Adicionales'" ng-controller="reservaTemplate"> <select class="form-control" required name="detalle{{$index}}" > <option ng-repeat="reserva in modelRe | filter : search | orderBy : myOrder track by $index" ng-if="reserva.tPartida_idPartida == x.partida" value="{{reserva.vReserva}}"> {{reserva.vDocumento}}-{{reserva.vDetalle}}- {{reserva.iMontoFactura | currency: "₡":0}} </option> </select> </div> </div> </div> </td> <td> <div class="form-group"> <div class="col-md-12"> <div ng-if="tipo == 'Cancelacion GECO' || tipo == 'Pases Anulacion' || tipo == 'Pases Adicionales'"> <input type="number" class="form-control" required name="iMontoFactura{{$index}}" min="1" max="{{x.maximo}}" > </div> <div ng-if="tipo != 'Cancelacion GECO' && tipo != 'Pases Anulacion' && tipo != 'Pases Adicionales'"> <input type="number" class="form-control" required name="iMontoFactura{{$index}}" min="1" max="{{x.maximo}}"> </div> </div> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <button type="button" class="btn btn-sm btn-danger" ng-click="eliminarFila($index)">Remover fila</button> </div> </td> </tr> </tbody> </table> <div class="form-group"> <input type="submit" value="Agregar Factura" name="buttonName" class="btn btn-primary pull-right"> </div> </form> </div> </section> @else @if(date('Y') != $anno->iValor) Solo se pueden agregar movimientos al presente año. <br> Para agregar un nuevo movimiento presupuestatio debe <br><br> <a href="/configuracion" class="btn btn-info">Configurar Año de Sistema</a> @else Debe estar autenticado y tener permisos para ver esta pagina @endif @endif @endsection
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Article extends Model { use HasFactory; protected $fillable = [ 'name', 'photo', 'content', 'category_id', 'tags' ]; public function User() { return $this->belongsTo(User::class); } public function Category() { return $this->belongsTo(Category::class); } }
<?php use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ /*Route::group(['prefix' => '', 'middleware' => Fruitcake\Cors\HandleCors::class], function() {*/ Route::apiResource('users','UsersController'); Route::apiResource('unidades','unidadesController'); Route::apiResource('bloques','bloquesController'); Route::apiResource('tipoaptos','TipoAptosController'); Route::apiResource('aptos','AptosController'); Route::apiResource('facturas','facturasController'); /*});*/
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Level extends Model { protected $table = "levels"; protected $fillable = ['nama_level']; }
<x-app_admin> @section('title') {{ Breadcrumbs::render('users') }} @endsection <style> tr:nth-child(even) { background-color: rgb(214, 222, 230); } tr:nth-child(odd) { background-color: rgb(250, 250, 250); } </style> <main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-200"> <div class="py-3 relative"> <div class="max-w-6xl mx-auto sm:px-6 lg:px-8"> <div class="overflow-hidden shadow-xs sm:rounded-lg"> <h3 class="text-gray-900 text-4xl font-sm">Edit Desigination</h3> <h5 class="text-blue-900 text-1xl font-sm">Blue Hex Software Pvt Limited</h5> <div class="my-4"> <!-- Validation Errors --> <x-auth-validation-errors class="mb-4" :errors="$errors" /> <form method="POST" action="{{ route('admin.desiginations.update', $desigination) }}"> @csrf @method('PATCH') <div class="flex flex-col my-6"> <div class="flex flex-col my-6 align-middle inline-block min-w-full bg-white shadow-md px-4 sm:px-6 md:px-8 lg:px-10 py-8 rounded-3xl w-80 max-w-md " > {{-- <div class="font-medium self-center text-xl sm:text-2xl text-gray-800"> Blue Hex Software </div> --}} <div class="mt-4 self-center text-xl sm:text-sm sm:text-2xl text-gray-800"> Edit Desigination </div> <div class="mt-5"> <div class="flex flex-col mb-5"> <label for="name" class="mb-1 text-xs tracking-wide text-gray-900" >Desigination</label > <div class="relative"> <div class=" inline-flex items-center justify-center absolute left-0 top-0 h-full w-10 text-gray-400 " > <i class="fas fa-at text-blue-500"></i> </div> <input id="name" type="text" name="name" value="{{$desigination->name}}" class=" text-sm placeholder-gray-500 pl-10 pr-4 rounded-2xl border border-gray-400 w-full py-2 focus:outline-none focus:border-blue-400 " placeholder="Enter your Name" /> </div> </div> <div class="mt-5"> <span> <i class="fas fa-lock text-blue-500"></i> </span> </div> <div class="flex w-full"> <button type="submit" class=" flex mt-2 items-center justify-center focus:outline-none text-white text-sm sm:text-base bg-gray-600 hover:bg-blue-600 rounded-2xl py-2 w-full transition duration-150 ease-in " > <span class="mr-2 uppercase ">Update Desigination</span> <span> <svg class="h-6 w-6" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor" > <path d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </span> </button> </div> </form> </div> </div> </div> </div> </main> </x-app_admin>
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateBahanBakusTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('bahan_bakus', function (Blueprint $table) { $table->id(); $table->string('kode_material')->unique(); $table->string('nama_material'); $table->integer('jumlah_material'); $table->integer('harga'); $table->string('satuan'); $table->string('jenis_material'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('bahan_bakus'); } }
<?php /** * @file * Contains \Drupal\worksheet\Form\SettingForm. */ namespace Drupal\worksheet\Form; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; class CommentForm extends FormBase { protected $wid; protected $entity_type; /** * {@inheritdoc} */ public function getFormId() { return 'comment_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state,$wid='',$entity_type='') { $this->wid = $wid; $this->entity_type = $entity_type; $list = \Drupal::service('worksheet.dbservice')->getCommentByid($this->wid,$this->entity_type); $comment_uid =\Drupal::service('worksheet.dbservice')->getCommentuid($this->wid,$this->entity_type); $commentlist = array(); foreach($comment_uid as $item){ $commentlist[$item->uid] = entity_load('user', $item->uid)->label(); } $form['filters'] = array( '#type' => 'details', '#title' => '工单评价', '#open' => True, ); $form['filters']['if_question'] = array( '#type' => 'select', '#title' => '工单是否有问题', '#options' => array( '0'=>'正常', '1'=>'异常', ), '#default_value'=>$list?$list[0]->if_question:0 ); $form['filters']['if_right'] = array( '#type' => 'select', '#title' => '定位分类是否正确', '#options' => array( '0'=>'正常', '1'=>'异常', ), '#default_value'=>$list?$list[0]->if_right:0 ); $form['filters']['if_deal'] = array( '#type' => 'select', '#title' => '是否正确处理', '#options' => array( '0'=>'正常', '1'=>'异常', ), '#default_value'=>$list?$list[0]->if_deal:0 ); $form['filters']['if_quality'] = array( '#type' => 'select', '#title' => '是否是优质工单', '#options' => array( '0'=>'否', '1'=>'是', ), '#default_value'=>$list?$list[0]->if_quality:0 ); $form['filters']['comment_note'] = array( '#type' => 'textarea', '#title' => '备注', '#default_value'=>$list?$list[0]->comment_note:'' ); $form['filters']['performance'] = array( '#type' => 'select', '#title' => '绩效加分', '#options' => array( '0'=>'0', '-1'=>'-1', '-2'=>'-2', '-3'=>'-3', '-4'=>'-4', '-5'=>'-5', '-6'=>'-6', '-7'=>'-7', '-8'=>'-8', '-9'=>'-9', '-10'=>'-10', '1'=>'1', '2'=>'2', '3'=>'3', '4'=>'4', '5'=>'5', '6'=>'6', '7'=>'7', '8'=>'8', '9'=>'9', '10'=>'10', ), '#default_value'=>$list?$list[0]->performance:0, ); $form['filters']['comment_uid'] = array( '#type' => 'select', '#title' => '评论对象', '#options' =>$commentlist, '#default_value'=>$list[0]->comment_uid?entity_load('user',$list[0]->comment_uid)->label():0 ); $form['filters']['submit'] = array( '#type' => 'submit', '#value' => '保存' ); $form['#theme'] = 'comment_form'; return $form; } /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { } /** * {@inheritdoc}cornsilk */ public function submitForm(array &$form, FormStateInterface $form_state) { $wid = $this->wid; $type = $this->entity_type; $if_question = $form_state->getValue('if_question'); $if_right = $form_state->getValue('if_right'); $if_deal = $form_state->getValue('if_deal'); $if_quality = $form_state->getValue('if_quality'); $comment_note = $form_state->getValue('comment_note'); $performance = $form_state->getValue('performance'); $comment_uid = $form_state->getValue('comment_uid'); $fields = array( 'if_question'=>$if_question, 'if_right'=>$if_right, 'if_deal'=>$if_deal, 'if_quality'=>$if_quality, 'comment_note'=>$comment_note, 'performance'=>$performance, 'isno_comment'=>1, 'comment_uid'=>$comment_uid ); $rs = \Drupal::service('worksheet.dbservice')->saveWorkSheetComment($fields,$wid,$type); if($rs){ drupal_set_message('评论提交成功'); }else{ drupal_set_message('评论提交失败或者该类型不需要评论','error'); } } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProductsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('products', function (Blueprint $table) { $table->id(); $table->string("name"); $table->string("price"); $table->string("category"); $table->string("descreption"); $table->string("gallery"); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('products'); } }
<?php namespace tsvetkov\telegram_bot\entities\inputMessage; /** * OfficialDocs: https://core.telegram.org/bots/api#inputmessagecontent * * Interface InputMessageContent * @package tsvetkov\telegram_bot\entities\inputMessage */ interface InputMessageContent { }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ namespace app\admin\controller; class Manage extends AdminBase { /** * 首页方法 */ public function index() { $where = $this->logicManage->getWhere($this->param); $aid = isset($this->param['aid']) ? $this->param['aid'] : "0"; $gid = isset($this->param['gid']) ? $this->param['gid'] : "0"; $kewword = isset($this->param['search_data']) ? $this->param['search_data'] : ""; $gardenname=""; $arenname=""; /*树形结构开始*/ $gardenlist= $this->logicCemeteryGarden->getCemeteryGardenList(NULL,NULL,NULL,false); $arealist= $this->logicCemeteryArea->getCemeteryAreaList(NULL,'a.*,g.name as garden_title','gardenID,a.create_time desc',false); $comapnyinfo = parse_config_array('comapnyinfo'); $url= url("manage/index"); $zj_treestr= "{id:'z0',pid:'0',name:'" . $comapnyinfo[1] . "',open:true,icon:'/static/module/admin/img/1_open.png',font:{'font-weight':'bold'},url:'$url',target:'_self'},"; foreach ($gardenlist as $key => $value) { $url= url("manage/index",["gid"=>$value["id"]]); if ($gid==$value["id"]) $gardenname=$value["name"]; $zj_treestr .= "{id:'t" . $value["id"] . "',pid:'z0',name:'" . $value["name"] . "',open:true,icon:'/static/module/admin/img/1_open.png',font:{'font-weight':'bold'},url:'$url',target:'_self'},"; foreach ($arealist as $cval) { if ($aid==$cval["id"]) { $arenname=$cval["name"]; $gardenname=$cval["garden_title"]; } if ($cval["gardenID"] == $value["id"]) { $url= url("manage/index",["gid"=>$value["id"],"aid"=>$cval["id"]]); $zj_treestr .= "{id:'c" . $cval["id"] . "',pId:'t" . $cval["gardenID"] . "',name:'" . $cval["name"] . "',icon:'/static/module/admin/img/t2.png',url:'$url',target:'_self'},"; } } } $zj_treestr = rtrim($zj_treestr, ","); $this->assign('treestr', $zj_treestr); /*树形结构结束*/ if ($kewword=="" && $arenname=="" && $gardenname=="") $title= $comapnyinfo[1]; else { $title=$gardenname."&nbsp&nbsp".$arenname; if ($kewword!="") $title.=" 查询关键字:" .$kewword; } $this->assign('seachinfo', $title); $this->assign('list', $this->logicManage->getManageList($where,'a.*,t.hrm,g.name as garden_name,r.name as area_name,t.name as type_name,s.name as style_name', 'a.vno desc',28)); $tjinfo = $this->logicManage->get_cemetery_usestatus_tj($where); $zs = 0; if (!empty($tjinfo)) { foreach ($tjinfo as $value) { $zs = $zs + $value["sl"]; } } $this->assign('tjinfo', $tjinfo); $this->assign('zs', $zs); $this->assign('formvalue', $this->param); return $this->fetch('index'); } public function work_show_ajax() { if (empty($this->param['cid'])) { $result = array("code" => 1, "msg" => "参数错误"); exit(json_encode($result)); } $info = $this->logicCemetery->getCemeteryList(['a.id' => $this->param['cid']], "a.*,g.name as gardename ,r.name as areaname,t.name as typename , s.name as stylename", null, 1); if (empty($info[0])) { $result = array("code" => 1, "msg" => "参数错误"); exit(json_encode($result)); } $cemeteryinfo=$info[0]["gardename"]."/".$info[0]["areaname"]."/".$info[0]["name"]; $this->assign('info', $info[0]); $this->assign('cid', $this->param['cid']); /////预定信息列表 $Schedulelist=$this->logicSchedule->getScheduleList(["cid"=>$this->param['cid']], 's.*,c.name,g.name as garden_name,r.name as area_name', 'ordainbegin asc', 20); if (!empty($Schedulelist)) { foreach ($Schedulelist as $key => $value) { if ($value["orderstatus"]==1) { $Schedulelist[$key]["ts"]=get_datestate($value["ordainend"]); } else { $Schedulelist[$key]["ts"]=""; } } } $this->assign('list', $Schedulelist); $table_lsit = $this->fetch("schedule/schedule_table"); $this->assign('schedule_table', $table_lsit); ///////////////// $infohtml = $this->fetch("work"); $result = array("code" => 0, "msg" => "", "data" => $infohtml,"cinfo"=>$cemeteryinfo); exit(json_encode($result)); } }
<button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#Delete<?= $galeri->id_galeri ?>"> <i class="fa fa-trash-o"></i> Delete </button> <!-- Modal --> <div class="modal modal-danger fade" id="Delete<?= $galeri->id_galeri ?>"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Menghapus data: </h4> </div> <div class="modal-body"> <p>Yakin ingin menghapus data ini ?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button> <button type="button" class="btn btn-outline pull-right" data-dismiss="modal"><i class="fa fa-backward"></i> Tidak, Batalkan</button> <a href="<?= base_url('admin/galeri/delete/'.$galeri->id_galeri) ?>" class="btn btn-outline pull-right"><i class="fa fa-trash-o"></i> Ya, Hapus Data Ini</a> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal -->
@extends('backend.layouts.master') @section('page-title','Category List') @section('page-content') <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="responsive-table"> <a href="{{route('blogCat.create')}}" class="btn btn-outline-success">Create A new category</a> <table class="table table-bordered table-hover"> <thead> <th>Sl.</th> <th>Category</th> <th>Category Image</th> <th>Category Description</th> <th>Category Status</th> <th>Status</th> <th>Created At</th> <th>Action</th> </thead> <tbody> <?php $i = 0;?> @foreach($category as $data) <?php $i++;?> <tr> <td>{{$i}}</td> <td> <a href="{{url('admin',$data->slug)}}">{{$data->category_name}}</a> </td> <td> <?php echo "<img src='".asset($data->category_image)."' alt='' style='height:50px;width:50px'>"; ?> </td> <td>{{$data->category_description}}</td> <td>{{$data->status}}</td> <td>{{$data->created_at}}</td> <td>action</td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> @endsection
<?php namespace Areanet\PIM\Classes\Types; use Areanet\PIM\Classes\Api; use Areanet\PIM\Classes\Type; use Areanet\PIM\Entity\Base; class SelectType extends Type { public function getPriority() { return 10; } public function getAlias() { return 'select'; } public function getAnnotationFile() { return 'Select'; } public function doMatch($propertyAnnotations){ if(!isset($propertyAnnotations['Areanet\\PIM\\Classes\\Annotations\\Select'])) { return false; } return true; } public function processSchema($key, $defaultValue, $propertyAnnotations, $entityName){ $schema = parent::processSchema($key, $defaultValue, $propertyAnnotations, $entityName); $propertyAnnotations = $propertyAnnotations['Areanet\\PIM\\Classes\\Annotations\\Select']; $options = explode(',', $propertyAnnotations->options); $optionsData = array(); $count = 0; foreach($options as $option){ $optionSplit = explode('=', $option); if(count($optionSplit) == 1){ $optionsData[] = array( "id" => trim($optionSplit[0]), "name" => trim($optionSplit[0]) ); $count++; }else{ $optionsData[] = array( "id" => trim($optionSplit[0]), "name" => trim($optionSplit[1]) ); } } $schema['options'] = $optionsData; return $schema; } public function toDatabase(Api $api, Base $object, $property, $value, $entityName, $schema, $user, $data = null, $lang = null) { $setter = 'set'.ucfirst($property); if($schema[ucfirst($entityName)]['properties'][$property]['dbtype'] == 'integer'){ $object->$setter(intval($value)); }else{ $object->$setter($value); } } }
<div class="container-fluid"> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-0 text-gray-800"><?= $title ?></h1> </div> <a class="btn btn-sm btn-success mb-3" href="<?= base_url('admin/dataJabatan/tambahData') ?>"> <i class= "fas fa-plus"> </i> Tambah Data </a> <?= $this->session->flashdata('pesan') ?> <table class="table table-borderd table-striped mt-2"> <tr> <th class="text-center">No</th> <th class="text-center">Nama Jabatan</th> <th class="text-center">Gaji Pokok</th> <th class="text-center">Gaji Lembur</th> <th class="text-center">Tunjangan Kesehatan</th> <th class="text-center">Total</th> <th class="text-center">Action</th> </tr> <?php $no=1; foreach ($jabatan as $j) : ?> <tr> <td><?= $no++ ?></td> <td><?= $j->nama_jabatan ?></td> <td>Rp. <?= number_format($j->gaji_pokok,0,',','.') ?></td> <td>Rp. <?= number_format($j->gaji_lembur,0,',','.') ?></td> <td>Rp. <?= number_format($j->tj_kesehatan,0,',','.') ?></td> <td>Rp. <?= number_format($j->gaji_pokok + $j->gaji_lembur + $j->tj_kesehatan ,0,',','.') ?></td> <td> <center> <a class="btn btn-sm btn-primary" href="<?= base_url('admin/dataJabatan/updateData/' .$j->id_jabatan) ?>"> <i class= "fas fa-edit"> </i> </a> <a onclick="return confirm('Yakin, Hapus <?= $j->nama_jabatan ?> ?')" class="btn btn-sm btn-danger" href="<?= base_url('admin/dataJabatan/deleteData/' .$j->id_jabatan) ?>"> <i class= "fas fa-trash"> </i> </a> </center> </td> </tr> <?php endforeach; ?> </table> </div>
<?php namespace App\Http\Controllers; use App\Http\Requests; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\User; class UserController extends Controller { public function index(Request $request) { $users = User::orderBy('created_at', 'asc')->get(); return view('users.index', [ 'users' => $users, ]); } public function create(Request $request) { return view('users.create'); } public function store(Request $request) { $user = new User; $user->mapRequest(['name', 'email', 'password']); $user->save(); return redirect()->route('user.index')->withSuccess('Użytkownik dodany pomyślnie!'); } }
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\ProductBundle\Doctrine\ORM; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; /** * Variant repository. * * @author Alexandre Bacco <alexandre.bacco@gmail.com> */ class VariantRepository extends EntityRepository { protected function getCollectionQueryBuilder() { return parent::getCollectionQueryBuilder() ->join($this->getAlias().'.object', 'product') ->addSelect('product') ->leftJoin($this->getAlias().'.options', 'option') ->addSelect('option') ; } protected function getAlias() { return 'variant'; } }
<!DOCTYPE html> <html lang="en"> <head> <!-- Meta Tags --> <meta charset="utf-8"> <meta name="author" content="shifttechplus"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!--[if IE]> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]--> <title>{{$settings->website_title}}</title> <meta name=description content="{{$settings->website_description}}"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="{{asset('homepage/css/bootstrap.min.css')}}"> <!-- Style CSS --> <link rel="stylesheet" href="{{asset('homepage/css/style.css')}}"> <!-- Responsive CSS --> <link rel="stylesheet" href="{{asset('homepage/css/responsive.css')}}"> <!-- Favicon --> <link rel="shortcut icon" href="{{URL::to('/')}}/images/{{$settings->favicon}}" type="image/png"> </head> <body> <div class="wrapper"> <!-- Strat Preloder --> <div class="preloader"></div> <!-- End Preloder --> <!-- Header Strat --> <header class="header-transparent hdrone"> <!-- Main Menu Start --> <div class="menu-nav-sec"> <div class="container"> <div class="row menu-area"> <div class="col-xs-8 mobile-logo"> @if($settings->logoOrText == 0) <a href="{{route('landing')}}"><h3>{{$settings->text_logo}}</h3></a> @else <a href="/"><img src="{{URL::to('/')}}/images/{{$setting->logo}}" alt="logo"/></a> @endif </div> <div class="mobile-nav-menu"></div> <div class="col-lg-3 col-md-3 col-sm-4"> <div class="header-logo"> @if($settings->logoOrText == 0) <a href="{{route('landing')}}"><h3>{{$settings->text_logo}}</h3></a> @else <a href="/"><img src="{{URL::to('/')}}/images/{{$setting->logo}}" alt="logo"/></a> @endif </div> </div> <div class="col-lg-9 col-md-9 col-sm-8"> <div class="menu pull-right"> <nav id="main-menu" class="main-menu"> <ul> <li><a href="/">Home <i class="icofont-caret-down"></i></a></li> @if(count($headerPages) > 0) @foreach($headerPages as $headerPage) <li><a href="{{ route('page', $headerPage->slug) }}">{{$headerPage->title}}</a></li> @endforeach @endif @if (Route::has('login')) @auth <li><a href="{{ url('/home') }}">Dashboard</a></li> @else <li><a href="{{ route('login') }}">Login</a></li> @if (Route::has('register')) <li><a href="{{ route('register') }}">Register</a></li> @endif @endauth @endif </ul> </nav> </div> </div> </div> </div> </div> <!-- Main Menu End --> </header> <!-- Header End --> <!-- Home div Start --> <div class="home-banner banner-one"> <img class="slider-float" src="{{URL::to('/homepage/')}}/images/slider-float.png" alt="image"> <div class="inner"> <div class="container"> <img class="bgicon icon-1" src="{{URL::to('/homepage/')}}/images/icon/bgicon1.png" alt="icon"> <img class="bgicon icon-2" src="{{URL::to('/homepage/')}}/images/icon/bgicon2.png" alt="icon"> <img class="bgicon icon-3" src="{{URL::to('/homepage/')}}/images/icon/bgicon3.png" alt="icon"> <div class="row"> <div class="col-md-7"> <div class="banner-caption"> <div class="banner-caption-desc"> <h1>{{$content->header_title}}</h1> <p>{{$content->header_subtitle}}</p> </div> <a class="btn-hm" href="/login">Login</a> <a class="btn-hm" href="/register">Register</a> </div> </div> <img class="slayer-img" src="{{URL::to('/')}}/images/{{$content->header_image1}}" alt="image"> </div> </div> </div> </div> <!-- Home div End --> @if($settings->partners_section_status) <!-- Partner div Start --> <div class="partner-sec bg-deep-gray"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="partner-items"> @if(count($partners) > 0) @foreach($partners as $partner) <div class="item"> <div class="partner-item"> <a href="{{$partner->link}}" target="_blank"><img src="{{URL::to('/')}}/images/{{$partner->image}}" alt="image" style="width:50%"></a> </div> </div> @endforeach @endif </div> </div> </div> </div> </div> <!-- Partner div End --> @endif <div class="about-us-sec pt-70"> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="about-us-img"> <img src="{{URL::to('/')}}/images/{{$content->about_us_image}}" alt=""/> </div> </div> <div class="col-md-6 align-self-center"> <div class="about-us-desc"> <h2 class="sec-title">About Us</h2> <p>{{$content->about_us_title}}</p> <p>{{$content->about_us_subtitle}}</p> </div> </div> </div> </div> </div> <!-- Functionalities div Start --> <div class="functionalities-div pb-70"> <div class="container"> <div class="row"> <div class="col-md-6 align-self-center"> <div class="intro-text"> <h2 class="sec-title">How It's Work</h2> <p>{{$content->how_it_works_title}}</p> <p>{{$content->how_it_works_subtitle}}</p> </div> </div> <div class="col-md-6"> <div class="about-us-img"> <img src="{{URL::to('/')}}/images/{{$content->header_image2}}" alt=""/> </div> </div> </div> </div> </div> <!-- Functionalities div End --> <!-- Pricing div Start --> <div class="pricing-sec curve-sec"> <div class="container"> <div class="row"> <div class="col-lg-8 offset-lg-2 stitle-center"> <h2 class="sec-title">{{$content->summary_title}}</h2> <p class="sec-text">{{$content->summary_subtitle}}</p> </div> </div> <div class="row pricing-tab"> @if(count($plans) > 0) @foreach($plans as $plan) <div class="col-lg-4 col-md-4 col-sm-12 col-12"> <div class="pricing-item item-one private-price"> <div class="content"> <h3 class="title">{{$plan->title}}</h3> <span class="dollar_amaunt">Min: {{$plan->minimum}} {{$settings->currency}}</span> <div class="price"><span>{{$plan->return}}%</span></div> <span class="dollar_amaunt mb-20">Max: {{$plan->maximum}} {{$settings->currency}}</span> </div> <div class="custome-price-input input-group mb-3"> <div class="input-group-prepend"> <span class="price-input-text input-group-text">{{$settings->currency_symbol}}</span> </div> <input type="text" class="form-control"> <div class="input-group-prepend"> <span class="price-input-text input-group-text">{{$settings->currency}}</span> </div> </div> <ul class="p-info"> <li>Investment Durations</li> <li>{{$plan->duration}} Day(S)</li> </ul> <div class="btn-center"> <a class="btn-thm" href="/login">Get Started</a> </div> </div> </div> @endforeach @endif </div> </div> </div> <!-- Exclusive Features div End --> <div class="about-us-sec pt-70 pb-40"> <div class="container padding_none"> <div class="row"> <div class="col-md-6"> <div class="about-us-img"> <img src="{{URL::to('/')}}/images/{{$content->expertise_image}}" alt=""/> </div> </div> <div class="col-md-6 align-self-center"> <div class="about-us-desc"> <h2 class="sec-title">Expertise</h2> <p>{{$content->expertise_title}}</p> <p>{{$content->expertise_subtitle}}</p> </div> </div> </div> </div> </div> @if($settings->testimonials_section_status) <!-- Testimonial div Start --> <div class="testimonial-sec pt-70 pb-40"> <div class="container"> <div class="row"> <div class="col-lg-6 offset-lg-3 stitle-center"> <h2 class="sec-title">Testimonial</h2> </div> <div class="col-lg-10 offset-lg-1"> <div class="testimonial-carousel owl-carousel owl-theme"> @if(count($testimonials) > 0) @foreach($testimonials as $testimonial) <div class="item"> <div class="testimonial-item"> <div class="thumb"> <img src="{{URL::to('/')}}/images/{{$testimonial->image}}" alt="image"> </div> <div class="content"> <h4>{{$testimonial->name}}</h4> <h6>{{$testimonial->website}}</h6> </div> <p class="pra-text">{{$testimonial->overview}}</p> <span class="testi-rating"> <i class="f-icon fa fa-star"></i> <i class="f-icon fa fa-star"></i> <i class="f-icon fa fa-star"></i> <i class="f-icon fa fa-star"></i> <i class="f-icon fa fa-star"></i> </span> </div> </div> @endforeach @endif </div> </div> </div> </div> </div> <!-- Testimonial div End --> @endif <!-- Funfact div Start --> <div class="funfact-sec"> <div class="container"> <div class="row"> <div class="col-lg-8 offset-lg-2 stitle-center"> <h2 class="sec-title">{{$content->achiv_title}}</h2> <p class="sec-text">{{$content->achiv_subtitle}}</p> </div> </div> <div class="row funfact-items"> <div class="col-lg-3 offset-lg-1 col-sm-4"> <div class="funfact-item"> <div class="inner"> <span class="timer" data-from="10" data-to="25" data-speed="5000" data-refresh-interval="50">{{$totalMembers->id}}</span> </div> <h4 class="title">Members</h4> </div> </div> <div class="col-lg-3 col-sm-4"> <div class="funfact-item"> <div class="inner"> <span class="timer" data-from="110" data-to="150" data-speed="5000" data-refresh-interval="50">{{$investments}}</span> </div> <h4 class="title">Total Investments</h4> </div> </div> <div class="col-lg-4 col-sm-4"> <div class="funfact-item"> <div class="inner"> <span class="timer" data-from="60" data-to="100" data-speed="5000" data-refresh-interval="50">{{$deposits}}</span> </div> <h4 class="title">Total Deposited</h4> </div> </div> </div> </div> </div> <!-- Funfact div End --> <!-- Footer Start --> <footer class="footer curve-sec"> <div class="container"> <div class="row"> <div class="col-md-4"> <div class="footer-widget"> <h5 class="widget-title">About Our App</h5> <div class="footer-info"> @if($settings->logoOrText == 0) <a href="{{route('landing')}}"><h3 class="text-white">{{$settings->text_logo}}</h3></a> @else <a href="/"><img class="footer-logo" src="{{URL::to('/')}}/images/{{$settings->logo}}" alt="logo"></a> @endif <p>{{$settings->website_description}}</p> </div> </div> </div> <div class="col-md-3"> <div class="footer-widget widget-contact"> <h5 class="widget-title">Address</h5> <div class="single-contact-widget"> <p><span>Company</span>: {{$settings->company_name}}</p> <p><span>Address</span>: {{$settings->company_address}}</p> <p><span>Country</span>: {{$settings->company_country}}</p> <p><span>City</span>: {{$settings->company_city}}</p> </div> </div> </div> <div class="col-md-2"> <div class="footer-widget widget-links"> <h5 class="widget-title">Quick Links</h5> <ul> @if(count($footerPages) > 0) @foreach($footerPages as $footerPage) <li><a href="{{route('page', $footerPage->slug)}}">{{$footerPage->title}}</a></li> @endforeach @endif </ul> </div> </div> <div class="col-md-2"> <div class="footer-widget widget-social"> <h5 class="widget-title">Share</h5> <div class="soical-profile"> <ul> <li><a href="{{$settings->facebook_link}}"><i class="icofont-facebook"></i></a></li> <li><a href="{{$settings->twitter_link}}"><i class="icofont-twitter"></i></a></li> <li><a href="{{$settings->telegram_link}}"><i class="icofont-telegram"></i></a></li> </ul> </div> <p><a href="{{URL::to('/')}}">{{URL::to('/')}}</a></p> </div> </div> <div class="col-md-12 copyright"><p>{{$settings->copyright}}</p></div> </div> </div> </footer> <!-- Footer End --> <a href="#" class="scrollup"> <i class="icofont-long-arrow-up" aria-hidden="true"></i> </a> </div> <!-- Modernizr Js --> <script src="{{asset('homepage/js/modernizr.min.js')}}"></script> <!-- Jquery 1.12.4 Js --> <script src="{{asset('homepage/js/jquery-1.12.4.min.js')}}"></script> <!-- Bootstrap 4 Js --> <script src="{{asset('homepage/js/bootstrap.min.js')}}"></script> <!-- Menu Js --> <script src="{{asset('homepage/js/jquery.meanmenu.min.js')}}"></script> <!-- Owl Carusel Js --> <script src="{{asset('homepage/js/owl.carousel.min.js')}}"></script> <script src="{{asset('homepage/js/owl.animate.js')}}"></script> <!-- Custom Script Js --> <script src="{{asset('homepage/js/script.js')}}"></script> {{$settings->footer_codes}} </body> </html>
@extends('layouts.cms') @section('body') <div class="main" style="height: 1000px"> <table class="table" dir="rtl"> <thead class="thead" style="background-color: #38c172"> <tr> <th scope="col">#id</th> <th scope="col">نام و نام خانودگی</th> <th scope="col">نوع دستگاه</th> <th scope="col">مدل دستگاه</th> <th scope="col">نام تحویل گیرنده</th> <th scope="col">تاریخ تحویل</th> <th scope="col">وضعیت تعمیر</th> <th scope="col">ویرایش</th> <th scope="col">گزارش تعمیر</th> <th scope="col">تحویل</th> </tr> </thead> <tbody> @foreach ($data as $item) <tr> <th scope="row">{{ $item->id}}</th> <td>{{ $item->name}}</td> <td>{{ $item->type}}</td> <td>{{ $item->model}}</td> <td>{{ $item->getter_name}}</td> <td>{{ $item->get_date}}</td> <td>{{ $item->situation_name}}</td> <td><a href="/edit?id={{ $item->id}}"><i class="fa fa-edit text-primary" style="font-size: 30px;"></i></a></td> <td><a href="#"><i class="fa fa-wrench text-primary" data-toggle="modal" data-target="#d-{{ $item->id}}" style="font-size: 30px;"></i></a></td> <td><a href="#"><i class="fa fa-check text-primary" data-toggle="modal" data-target="#dd-{{ $item->id}}" style="font-size: 30px;"></i></a></td> </tr> <div class="modal fade" id="d-{{ $item->id}}" tabindex="-1" role="dialog" dir="rtl"> <div class="modal-dialog" role="document"> <form method="POST" action="{{ route("changeSituation")}}" > @csrf <input name="id" type="hidden" value="{{ $item->id}}"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"> تغییر وضعیت دستگاه {{ $item->name}}</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <p> تعیین وضعیت دستگاه : </p> <div class="form-check"> <input type="radio" class="form-check-input " id="materialUnchecked" name="situation" value="1"> <label class="form-check-label mr-3" for="materialUnchecked">تعمیر انجام شد</label> {{-- {{ ($item->situation == 1) ? 'active' : ''}} --}} </div> <div class="form-check"> <input type="radio" class="form-check-input" id="materialUnchecked" name="situation" value="2"> <label class="form-check-label mr-3" for="materialUnchecked">تعمیر انجام نشد</label> </div> <div class="form-check"> <input type="radio" class="form-check-input" id="materialUnchecked" name="situation" value="3"> <label class="form-check-label mr-3" for="materialUnchecked">در حال تعمیر</label> </div> <div class="form-group mt-3 row"> <label class="col-4">شرح کار انجام شده:</label> <textarea class="form-control col-8" name="situation_text"></textarea> </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary">ذخیره</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">بستن</button> </div> </div> </form> </div> </div> <div class="modal fade" id="dd-{{ $item->id}}" tabindex="-1" role="dialog" dir="rtl"> <div class="modal-dialog" role="document"> <form method="POST" action="{{ route("exit")}}" > @csrf <input name="id" type="hidden" value="{{ $item->id}}"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title"> تحویل دستگاه {{ $item->name}}</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <p> آیا از تحویل این دستگاه به صاحب آن مطمئنید؟ </p> </div> <div class="modal-footer"> <button type="submit" class="btn btn-success">بله</button> <button type="button" class="btn btn-danger" data-dismiss="modal">خیر</button> </div> </div> </form> </div> </div> @endforeach </tbody> </table> <script> $('#myModal').on('shown.bs.modal', function () { $('#myInput').trigger('focus') }) </script> </div> @endsection
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * NbPersonne * * @ORM\Table(name="nb_personne") * @ORM\Entity(repositoryClass="AppBundle\Repository\NbPersonneRepository") */ class NbPersonne { /** * @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 int * * @ORM\Column(name="nbpersonne", type="integer") */ private $nbpersonne; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set nom * * @param string $nom * @return NbPersonne */ public function setNom($nom) { $this->nom = $nom; return $this; } /** * Get nom * * @return string */ public function getNom() { return $this->nom; } /** * Set nbpersonne * * @param integer $nbpersonne * @return NbPersonne */ public function setNbpersonne($nbpersonne) { $this->nbpersonne = $nbpersonne; return $this; } /** * Get nbpersonne * * @return integer */ public function getNbpersonne() { return $this->nbpersonne; } }
<section class="content-header"> <h1>Data Berita</h1> </section> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-body"> <div class="table-responsive"> <button class="btn btn-success" onClick="tambah_berita()"><i class="glyphicon glyphicon-plus"></i> Tambah</button> <br /> <br /> <table id="table_berita" class="table table-striped table-bordered" cellspacing="0" width="100%"> <thead> <tr> <th width="3">No</th> <th width="279">ID Berita</th> <th width="279">Judul Berita</th> <th width="276">Deskripsi</th> <th width="198">Tanggal Posting</th> <th width="130">File</th> <th width="145" style="width:125px;">Action</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> </div> </section> <script src="<?php echo base_url('assets/jQuery/jquery-2.1.4.min.js'); ?>"></script> <script src="<?php echo base_url('assets/bootstrap/js/bootstrap.min.js')?>"></script> <script src="<?php echo base_url('assets/datatables/jquery.dataTables.min.js')?>"></script> <script src="<?php echo base_url('assets/datatables/dataTables.bootstrap.min.js')?>"></script> <script src="<?php echo base_url('assets/bootstrap-datepicker/js/bootstrap-datepicker.min.js'); ?>"></script> <script src="<?php echo base_url('assets/fancybox/dist/jquery.fancybox.js');?>"></script> <script type="text/javascript"> $().fancybox({ selector : '[data-fancybox="images"]', thumbs : false, hash : false, }); var save_method; //for save method string var table; $(document).ready(function() { //datatables table = $('#table_berita').DataTable({ "processing": true, //Feature control the processing indicator. "serverSide": true, //Feature control DataTables' server-side processing mode. "order": [], //Initial no order. "ajax": { "url": "<?php echo site_url('akademik/berita/show_berita_DT')?>", "type": "POST" }, "columnDefs": [ { "targets": [ 0,6 ], "orderable": false, }, { "targets": [ 1 ], "visible": false, "searchable": false, }, ], }); //datepicker $('.datepicker').datepicker({ autoclose: true, format: "yyyy-mm-dd", }); //set input/textarea/select event when change value, remove class error and remove text help block $("input").change(function(){ $(this).parent().parent().removeClass('has-error'); $(this).next().empty(); }); $("textarea").change(function(){ $(this).parent().parent().removeClass('has-error'); $(this).next().empty(); }); $("select").change(function(){ $(this).parent().parent().removeClass('has-error'); $(this).next().empty(); }); }); function tambah_berita() { save_method = 'add'; $('#form')[0].reset(); // reset form on modals $('.form-group').removeClass('has-error'); // clear error class $('.help-block').empty(); // clear error string $('#modal_form').modal('show'); // show bootstrap modal //$('.modal-title').text('Tambah Berita'); // Set Title to Bootstrap modal title $('#photo-preview').hide(); // hide photo preview modal $('#label-photo').text('Upload File'); // label photo upload } function update_berita(id) { save_method = 'update'; $('#form')[0].reset(); // reset form on modals $('.form-group').removeClass('has-error'); // clear error class $('.help-block').empty(); // clear error string //Ajax Load data from ajax $.ajax({ url : "<?php echo site_url('index.php/akademik/berita/ajax_edit')?>/" + id, type: "GET", dataType: "JSON", success: function(data) { $('[name="id_berita"]').val(data.id_berita); $('[name="judul_berita"]').val(data.judul_berita); $('[name="deskripsi"]').val(data.deskripsi); $('[name="tgl_posting"]').datepicker('update',data.tgl_posting); $('#modal_form').modal('show'); // show bootstrap modal when complete loaded $('.modal-title').text('Edit Berita'); // Set title to Bootstrap modal title $('#photo-preview').show(); // show photo preview modal if(data.file) { $('#label-photo').text('Change File'); // label photo upload $('#photo-preview div').html('<img src="'+base_url+'berita/'+data.file+'" class="img-responsive">'); // show photo $('#photo-preview div').append('<input type="checkbox" name="remove_photo" value="'+data.file+'"/> Remove photo when saving'); // remove photo } else { $('#label-photo').text('Upload File'); // label photo upload $('#photo-preview div').text('(No File)'); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Error get data from ajax'); } }); } function reload_table() { table.ajax.reload(null,false); //reload datatable ajax } function save() { $('#btnSave').text('Saving...'); //change button text $('#btnSave').attr('Disabled',true); //set button disable var url; if(save_method == 'add') { url = "<?php echo site_url('index.php/akademik/berita/tambah_berita')?>"; } else { url = "<?php echo site_url('index.php/akademik/berita/update_berita')?>"; } // ajax adding data to database var formData = new FormData($('#form')[0]); $.ajax({ url : url, type: "POST", data: formData, contentType: false, processData: false, dataType: "JSON", success: function(data) { if(data.status) //if success close modal and reload ajax table { $('#modal_form').modal('hide'); reload_table(); } else { for (var i = 0; i < data.inputerror.length; i++) { $('[name="'+data.inputerror[i]+'"]').parent().parent().addClass('has-error'); //select parent twice to select div form-group class and add has-error class $('[name="'+data.inputerror[i]+'"]').next().text(data.error_string[i]); //select span help-block class set text error string } } $('#btnSave').text('Save'); //change button text $('#btnSave').attr('Disabled',false); //set button enable }, error: function (jqXHR, textStatus, errorThrown) { alert('Error adding / update data'); $('#btnSave').text('Save'); //change button text $('#btnSave').attr('Disabled',false); //set button enable } }); } function hapus_berita(id) { if(confirm('Are you sure delete this data?')) { // ajax delete data to database $.ajax({ url : "<?php echo site_url('index.php/akademik/berita/hapus_berita')?>/"+id, type: "POST", dataType: "JSON", success: function(data) { //if success reload ajax table $('#modal_form').modal('hide'); reload_table(); }, error: function (jqXHR, textStatus, errorThrown) { alert('Error deleting data'); } }); } } </script> <!-- Bootstrap modal --> <div class="modal fade" id="modal_form" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Form Berita</h3> </div> <div class="modal-body form"> <form action="#" id="form" class="form-horizontal"> <input type="hidden" value="" name="id_berita"/> <div class="form-body"> <div class="form-group"> <label class="control-label col-md-3">Judul</label> <div class="col-md-9"> <input name="judul_berita" placeholder="Judul Berita" class="form-control" type="text"> <span class="help-block"></span> </div> </div> <div class="form-group"> <label class="control-label col-md-3">Deskripsi</label> <div class="col-md-9"> <textarea name="deskripsi" class="form-control" placeholder="Deskripsi"></textarea> <span class="help-block"></span> </div> </div> <div class="form-group" id="photo-preview"> <label class="control-label col-md-3">Photo</label> <div class="col-md-9"> <span class="help-block"></span> </div> </div> <div class="form-group"> <label class="control-label col-md-3">File</label> <div class="col-md-9"> <input type="file" name="file" /> <span class="help-block"></span> </div> </div> <div class="form-group"> <label class="control-label col-md-3">Tanggal Posting</label> <div class="col-md-9"> <input name="tgl_posting" id="datepicker" placeholder="" class="form-control datepicker" type="text"> <span class="help-block"></span> </div> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" id="btnSave" onClick="save()" class="btn btn-primary">Save</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <!-- End Bootstrap modal --> </body> </html>
<?php use yii\helpers\Url; use yii\widgets\Breadcrumbs; ?> <?= Breadcrumbs::widget([ 'tag' => 'h1', 'options' => ['class' => 't_nav'], 'itemTemplate' => "{link}\n", 'activeItemTemplate' => "<a href='javascript:;' class='n2'>{link}</a>\n", 'homeLink' => false, 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], ]) ?>
<?php use App\User; use App\Product; use App\Category; use App\Transaction; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; class DatabaseSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // $this->call(UsersTableSeeder::class); // Verifies the foreign keys at the moment of truncate DB::statement('SET FOREIGN_KEY_CHECKS = 0'); User::truncate(); Category::truncate(); Product::truncate(); Transaction::truncate(); DB::table('category_product')->truncate(); User::flushEventListeners(); Category::flushEventListeners(); Product::flushEventListeners(); Transaction::flushEventListeners(); $usersQuantity = 1000; $categoriesQuantity = 30; $productsQuantity = 1000; $transactionsQuantity = 1000; factory(User::class, $usersQuantity)->create(); factory(Category::class, $categoriesQuantity)->create(); factory(Product::class, $productsQuantity)->create()->each( function ($product) { $categories = Category::all()->random(mt_rand(1, 5))->pluck('id'); $product->categories()->attach($categories); }); factory(Transaction::class, $transactionsQuantity)->create(); } }
<?php /** * @copyright Copyright (C) 2015-2020 AIZAWA Hina * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT * @author AIZAWA Hina <hina@fetus.jp> * @author Starwort <tcphone93@gmail.com> */ declare(strict_types=1); return [ '(3rd party defined)' => '', '(Session)' => '', '(Twitter)' => '', 'A token used for the auto login feature' => '', 'A token used to avoid CSRF vulnerability' => '', 'Cookie ID (Name)' => '', 'Cookies' => '', 'descriptions' => '', 'Expires' => '', 'I agree' => '', 'Issued and used by CloudFlare' => '', 'Issued and used by Twitter' => '', 'Keep your input data while verifying email address' => '', 'Origin' => '', 'Privacy policy' => '', 'privacy policy' => '', 'Saving "Enable machine-translation" option state' => '', 'Saving the specified or automatically detected language setting' => '', 'Saving the specified or automatically detected time zone setting' => '', 'Saving the specified or default theme (color scheme) setting' => 'Saving the specified or default theme (colour scheme) setting', 'Their privacy policy' => '', 'Track your login status' => '', 'Visit their {description} and/or {privacy} for more details' => '', 'We use cookies to ensure you get the best experience on our website.' => '', 'What to use' => '', ];
<?php require('fpdf/fpdf.php'); include '../includes/dbcon.php'; //$id = $_GET['cash_receipt_no']; $pdf = new FPDF(); ///var_dump(get_class_methods($pdf)); $pdf->AddPage('L'); $pdf->SetFont('Arial', '', 10); $pdf->Cell(50, 10, 'Date:' . date('d-m-Y') . '', 0, "R"); $pdf->Ln(15); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(80, 10, 'Suppliers', 1,1, "C"); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(20, 10, 'Supplier ID.', 1); $pdf->Cell(30, 10, 'Supplier Name', 1); $pdf->Cell(30, 10, 'Supplier Number', 1); $query = "SELECT * FROM supplier"; $result = mysqli_query($con, $query); $no = 0; while ($row = mysqli_fetch_array($result)) { $no = $no + 1; $pdf->Ln(10); $pdf->SetFont('Arial', '', 8); $pdf->Cell(20, 10, $row['supplier_id'], 1); $pdf->Cell(30, 10, $row['Name'], 1); $pdf->Cell(30, 10, $row['Supplier_Number'], 1); } $pdf->Output(); ?>
<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; use App\Http\Resources\TagResource; use App\PostTag; use App\Tag; class PostTagResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array */ public function toArray($request) { return [ 'post_id' => $this->post_id, 'tag_id' => $this->tag_id ]; } }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Live; use App\Models\Location; use App\Models\Information; use App\Models\Property; use App\Models\Currency; use App\Models\SystemSetting; use App\Models\Http\Helper; class HomeController { /** * Show the application dashboard. * * @return \Illuminate\Contracts\Support\Renderable */ public function index(Request $request) { $site_status = Live::first(); if (!$site_status->make_live ) { return view('index'); } else { //Show site if admin is logged in if ( auth()->check() && auth()->user()->isAdmin()){ return view('index'); } return view('underconstruction.index'); } } public function home() { $site_status = Live::first(); $states = Location::where('location_type', 'state')->has('properties')->latest()->get(); $cities = Location::where('location_type', 'city')->has('properties')->latest()->get(); $featureds = Property::where('featured',true)->take(4)->get(); $posts = Information::orderBy('created_at','DESC')->where('blog',true)->take(3)->get(); $saved = auth()->check() ? auth()->user()->favorites->pluck('property_id')->toArray() : []; if (!$site_status->make_live ) { return view('index',compact('states','posts','featureds','cities','saved')); } else { //Show site if admin is logged in if ( auth()->check() && auth()->user()->isAdmin()){ return view('index',compact('states','posts','featureds','cities','saved')); } return view('underconstruction.index'); } } }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Setting extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model(array( 'mail/setting_model' )); if ($this->session->userdata('isLogIn') == false || $this->session->userdata('user_role') != 1 ) redirect('login'); } public function index() { $data['title'] = display('mail_setting'); #-------------------------------# $this->form_validation->set_rules('protocol',display('protocol'),'required|max_length[20]'); $this->form_validation->set_rules('mailpath', display('mailpath') ,'required|max_length[255]'); $this->form_validation->set_rules('mailtype',display('mailtype'),'required|max_length[20]'); $this->form_validation->set_rules('validate_email',display('validate_email'),'required|max_length[20]'); $this->form_validation->set_rules('wordwrap',display('wordwrap'),'required|max_length[20]'); #-------------------------------# $postData = array( 'id' => $this->input->post('id'), 'protocol' => $this->input->post('protocol'), 'mailpath' => $this->input->post('mailpath'), 'mailtype' => $this->input->post('mailtype'), 'validate_email' => $this->input->post('validate_email'), 'wordwrap' => $this->input->post('wordwrap') ); $data['setting'] = $this->setting_model->read(); if (empty($data['setting'])) { $data['setting'] = (object)$postData; } #-------------------------------# if ($this->form_validation->run() === true) { #if empty $id then insert data if (empty($postData['id'])) { if ($this->setting_model->create($postData)) { #set success message $this->session->set_flashdata('message',display('save_successfully')); } else { #set exception message $this->session->set_flashdata('exception',display('please_try_again')); } } else { if ($this->setting_model->update($postData)) { #set success message $this->session->set_flashdata('message',display('update_successfully')); } else { #set exception message $this->session->set_flashdata('exception', display('please_try_again')); } } redirect('mail/setting'); } else { $data['content'] = $this->load->view('mail/setting',$data,true); $this->load->view('layout/main_wrapper',$data); } } }
<?php use common\components\ClaHost; use yii\helpers\Url; ?> <?php if (isset($data) && $data) { ?> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <div class="cate-news-index"> <div class="title-cate-news-index"> <a href="<?= Url::to(['/news/news/category', 'id' => $category['id'], 'alias' => $category['alias']]) ?>" title="<?= $category['name'] ?>"><?= $category['name'] ?></a> </div> <div class="avarta-cate"> <?php $url = Url::to(['/news/news/detail', 'id' => $data['0']['id'], 'alias' => $data['0']['alias']]); $name = $data['0']['title']; $img = ClaHost::getImageHost(). $data['0']['avatar_path']. 's400_400/'. $data['0']['avatar_name']; unset($data['0']); ?> <div class="img"> <a href="<?= $url ?>" title="<?= $name ?>"> <?php if($img) { ?> <img src="<?= $img ?>" alt="<?= $name ?>" /> <?php } ?> </a> </div> <h2><a href="<?= $url ?>" title="<?= $name ?>"><?= $name ?></a></h2> </div> <div class="list-news-incate"> <?php foreach ($data as $item) { $url = Url::to(['/news/news/detail', 'id' => $item['id'], 'alias' => $item['alias']]); ?> <div class="item-news-incate"> <div class="img"> <a href="<?= $url ?>" title="<?= $item['title'] ?>"> <?php if($item['avatar_name']) { ?> <img src="<?= ClaHost::getImageHost(), $item['avatar_path'], 's200_200/', $item['avatar_name'] ?>" alt="<?= $item['title'] ?>" /> <?php } ?> </a> </div> <h3> <a href="<?= $url ?>" title="<?= $item['title'] ?>"><?= $item['title'] ?></a> </h3> </div> <?php } ?> </div> </div> </div> <?php } ?>
<!DOCTYPE html> <html> <head> <title>Listado de mascotas</title> </head> <body> <h1>Listado de mascotas</h1> <?php // Abrir conexión contra la BD $srv = "localhost"; $usu = "pruebas"; $pwd = "123456"; $bd = "pruebas"; $con = mysqli_connect($srv, $usu, $pwd, $bd); // Preparar sentencia $sql = "select * from Mascotas order by nombre "; // Ejecutar sentencia // Obtener resultados $resul = mysqli_query($con, $sql); // ¿Hay resultados? if (mysqli_num_rows($resul) > 0) { // Recorrer resultados echo("<ul>"); while ($fila = mysqli_fetch_array($resul)) { // Hacer algo para cada resultado echo('<li>' . $fila['nombre'] . "</li>"); } echo("</ul>"); } else { echo("No hay resultados"); } // Cerrar conexión mysqli_close($con); ?> </body> </html>
<?php class Controller_Users extends Controller_Account { public function action_index() { $data['users'] = Model_User::find('all'); $this->template->title = "Users"; $this->template->content = View::forge(parent::get_prefix() . 'users/index', $data); } public function action_view($id = null) { $data['user'] = Model_User::find($id); $this->template->title = "User"; $this->template->content = View::forge(parent::get_prefix() . 'users/view', $data); } public function action_create() { if (Input::method() == 'POST') { $val = Model_User::validate('create'); $_POST['bdate'] = Date::create_from_string(Input::post('bdate') , "us")->get_timestamp(); if ($val->run()) { $user = Model_User::forge(array( 'fname' => Input::post('fname'), 'mname' => Input::post('mname'), 'lname' => Input::post('lname'), 'email' => Input::post('email'), 'username' => Input::post('username'), 'password' => Auth::instance()->hash_password(Input::post('password')), 'address' => Input::post('address'), 'bdate' => Input::post('bdate'), 'gender' => Input::post('gender'), 'contact' => Input::post('contact'), 'prof_pic' => Input::post('prof_pic') ?: 'ic_avatar.jpg', 'group' => Input::post('group'), 'last_login' => Input::post('last_login'), 'login_hash' => Input::post('login_hash'), 'profile_fields' => Input::post('profile_fields'), 'course_id' => Input::post('course_id'), 'yearlevel_id' => Input::post('yearlevel_id') )); Upload::process(Config::get('upload_prof_pic')); if (Upload::is_valid()) { Upload::save(); $value = Upload::get_files(); $user->prof_pic = $value[0]['saved_as']; if ($user and $user->save()) { Session::set_flash('success', e('Succesfully Added teacher')); Response::redirect(parent::get_prefix() . 'users'); } else { Session::set_flash('error', e('Could not save user.')); } } else { Session::set_flash('error', e('Uploaded photo is invalid.')); } } else { Session::set_flash('error', $val->error()); } if (Input::post('bdate')) { $_POST['bdate'] = Date::forge($_POST['bdate'])->format("%m/%d/%Y", true); } } $this->template->title = "Users"; $this->template->content = View::forge(parent::get_prefix() . 'users/create'); } public function action_edit($id = null) { $user = Model_User::find($id); $val = Model_User::validate('edit', $user); if (Input::post('bdate')) { $_POST['bdate'] = Date::create_from_string(Input::post('bdate'), "us")->get_timestamp(); } if (!Input::post('prof_pic')) { $_POST['prof_pic'] = $user->prof_pic; } $_POST['username'] = $user->username; $_POST['bdate'] = $user->bdate; $_POST['gender'] = $user->gender; $_POST['yearlevel_id'] = $user->yearlevel_id; $_POST['course_id'] = $user->course_id; if ($val->run()) { if ($id == Auth::get('id') && (Input::post('password') == '••••••' || !Input::post('password'))) { $_POST['password'] = Auth::get('password'); } else { $_POST['password'] = Auth::instance()->hash_password(Input::post('password')); } $user->fname = Input::post('fname'); $user->mname = Input::post('mname'); $user->lname = Input::post('lname'); $user->email = Input::post('email'); $user->username = Input::post('username'); $user->password = Input::post('password'); $user->address = Input::post('address'); $user->bdate = Input::post('bdate'); $user->gender = Input::post('gender'); $user->contact = Input::post('contact'); $user->prof_pic = Input::post('prof_pic'); $user->last_login = Input::post('last_login'); $user->login_hash = Input::post('login_hash'); $user->profile_fields = Input::post('profile_fields'); $user->course_id = Input::post('course_id'); $user->yearlevel_id = Input::post('yearlevel_id'); Upload::process(Config::get('upload_prof_pic')); if (Upload::is_valid() || $user->prof_pic) { Upload::save(); $value = Upload::get_files(); if (sizeof($value) > 0) { $user->prof_pic = $value[0]['saved_as']; } if ($user->save()) { Session::set_flash('success', e('You Succesfully Updated your Profile')); Response::redirect('account'); } else { Session::set_flash('error', e('Could not update user #' . $id)); } } } else { if (Input::method() == 'POST') { $user->fname = $val->validated('fname'); $user->mname = $val->validated('mname'); $user->lname = $val->validated('lname'); $user->email = $val->validated('email'); $user->username = $val->validated('username'); $user->password = $val->validated('password'); $user->address = $val->validated('address'); $user->bdate = $val->validated('bdate'); $user->gender = $val->validated('gender'); $user->contact = $val->validated('contact'); $user->prof_pic = $val->validated('prof_pic'); // $user->group = $val->validated('group'); $user->last_login = $val->validated('last_login'); $user->login_hash = $val->validated('login_hash'); $user->profile_fields = $val->validated('profile_fields'); $user->course_id = $val->validated('course_id'); $user->yearlevel_id = $val->validated('yearlevel_id'); Session::set_flash('error', $val->error()); } $_POST['bdate'] = $user->bdate = Date::forge($user->bdate)->format("%m/%d/%Y", true); $this->template->set_global('user', $user, false); } $this->template->title = "Edit Profile"; $this->template->content = View::forge('edit_profile'); } public function action_delete($id = null) { if ($user = Model_User::find($id)) { $user->delete(); Session::set_flash('success', e('Deleted user #'.$id)); } else { Session::set_flash('error', e('Could not delete user #'.$id)); } Response::redirect(parent::get_prefix() . 'users'); } public function action_get_student($id) { return Format::forge(Model_User::find($id))->to_json(); } }
<?php if(!isset($Translation)) die('No direct access allowed.'); ?> <?php $current_table = 'sessions'; ?> <?php $cleaner = new CI_Input(); $cleaner->charset = datalist_db_encoding; ?> <script> <?php echo $current_table; ?>GetChildrenRecordsList = function(command){ var param = { ChildTable: "<?php echo $parameters['ChildTable']; ?>", ChildLookupField: "<?php echo $parameters['ChildLookupField']; ?>", SelectedID: "<?php echo addslashes($parameters['SelectedID']); ?>", Page: <?php echo addslashes($parameters['Page']); ?>, SortBy: <?php echo ($parameters['SortBy'] === false ? '""' : $parameters['SortBy']); ?>, SortDirection: '<?php echo $parameters['SortDirection']; ?>', AutoClose: <?php echo ($config['auto-close'] ? 'true' : 'false'); ?> }; var panelID = "panel_<?php echo "{$parameters['ChildTable']}-{$parameters['ChildLookupField']}"; ?>"; var mbWidth = window.innerWidth * 0.9; var mbHeight = window.innerHeight * 0.8; if(mbWidth > 1000){ mbWidth = 1000; } if(mbHeight > 800){ mbHeight = 800; } switch(command.Verb){ case 'sort': /* order by given field index in 'SortBy' */ post("parent-children.php", { ChildTable: param.ChildTable, ChildLookupField: param.ChildLookupField, SelectedID: param.SelectedID, Page: param.Page, SortBy: command.SortBy, SortDirection: command.SortDirection, Operation: 'get-records' }, panelID, undefined, 'pc-loading'); break; case 'page': /* next or previous page as provided by 'Page' */ if(command.Page.toLowerCase() == 'next'){ command.Page = param.Page + 1; } else if(command.Page.toLowerCase() == 'previous'){ command.Page = param.Page - 1; } if(command.Page < 1 || command.Page > <?php echo ceil($totalMatches / $config['records-per-page']); ?>){ return; } post("parent-children.php", { ChildTable: param.ChildTable, ChildLookupField: param.ChildLookupField, SelectedID: param.SelectedID, Page: command.Page, SortBy: param.SortBy, SortDirection: param.SortDirection, Operation: 'get-records' }, panelID, undefined, 'pc-loading'); break; case 'new': /* new record */ var url = $j('#' + param.ChildTable + '_hclink').val() + '&addNew_x=1&Embedded=1' + (param.AutoClose ? '&AutoClose=1' : ''); modal_window({ url: url, close: function(){ <?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'reload' }); }, size: 'full', title: '<?php echo addslashes("{$config['tab-label']}: {$Translation['Add New']}"); ?>' }); break; case 'open': /* opens the detail view for given child record PK provided in 'ChildID' */ var url = param.ChildTable + '_view.php?Embedded=1&SelectedID=' + escape(command.ChildID) + (param.AutoClose ? '&AutoClose=1' : ''); modal_window({ url: url, close: function(){ <?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'reload' }); }, size: 'full', title: '<?php echo addslashes($config['tab-label']); ?>' }); break; case 'reload': /* just a way of refreshing children, retaining sorting and pagination & without reloading the whole page */ post("parent-children.php", { ChildTable: param.ChildTable, ChildLookupField: param.ChildLookupField, SelectedID: param.SelectedID, Page: param.Page, SortBy: param.SortBy, SortDirection: param.SortDirection, Operation: 'get-records' }, panelID, undefined, 'pc-loading'); break; } }; </script> <div class="row"> <div class="col-xs-11 col-md-12"> <?php if($config['display-add-new']){ ?> <?php if(stripos($_SERVER['HTTP_USER_AGENT'], 'msie ')){ ?> <a href="<?php echo $parameters['ChildTable']; ?>_view.php?filterer_<?php echo $parameters['ChildLookupField']; ?>=<?php echo urlencode($parameters['SelectedID']); ?>&addNew_x=1" target="_viewchild" class="btn btn-success hspacer-sm vspacer-md"><i class="glyphicon glyphicon-plus-sign"></i> <?php echo html_attr($Translation['Add New']); ?></a> <?php }else{ ?> <a href="#" onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'new' }); return false;" class="btn btn-success hspacer-sm vspacer-md"><i class="glyphicon glyphicon-plus-sign"></i> <?php echo html_attr($Translation['Add New']); ?></a> <?php } ?> <?php } ?> <?php if($config['display-refresh']){ ?><a href="#" onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'reload' }); return false;" class="btn btn-default hspacer-sm vspacer-md"><i class="glyphicon glyphicon-refresh"></i></a><?php } ?> <div class="table-responsive"> <table class="table table-striped table-hover table-condensed table-bordered"> <thead> <tr> <?php if($config['open-detail-view-on-click']){ ?> <th>&nbsp;</th> <?php } ?> <?php if(is_array($config['display-fields'])) foreach($config['display-fields'] as $fieldIndex => $fieldLabel){ ?> <th <?php if($config['sortable-fields'][$fieldIndex]){ ?> onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'sort', SortBy: <?php echo $fieldIndex; ?>, SortDirection: '<?php echo ($parameters['SortBy'] == $fieldIndex && $parameters['SortDirection'] == 'asc' ? 'desc' : 'asc'); ?>' });" style="cursor: pointer;" <?php } ?> class="<?php echo "{$current_table}-{$config['display-field-names'][$fieldIndex]}"; ?>"> <?php echo $fieldLabel; ?> <?php if($parameters['SortBy'] == $fieldIndex && $parameters['SortDirection'] == 'desc'){ ?> <i class="glyphicon glyphicon-sort-by-attributes-alt text-warning"></i> <?php }elseif($parameters['SortBy'] == $fieldIndex && $parameters['SortDirection'] == 'asc'){ ?> <i class="glyphicon glyphicon-sort-by-attributes text-warning"></i> <?php } ?> </th> <?php } ?> </tr> </thead> <tbody> <?php if(is_array($records)) foreach($records as $pkValue => $record){ ?> <tr> <?php if($config['open-detail-view-on-click']){ ?> <?php if(stripos($_SERVER['HTTP_USER_AGENT'], 'msie ')){ ?> <td class="text-center view-on-click"><a href="<?php echo $parameters['ChildTable']; ?>_view.php?SelectedID=<?php echo urlencode($record[$config['child-primary-key-index']]); ?>" target="_viewchild" class="h6"><i class="glyphicon glyphicon-new-window hspacer-md"></i></a></td> <?php }else{ ?> <td class="text-center view-on-click"><a href="#" onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'open', ChildID: '<?php echo html_attr($record[$config['child-primary-key-index']]); ?>'}); return false;" class="h6"><i class="glyphicon glyphicon-new-window hspacer-md"></i></a></td> <?php } ?> <?php } ?> <td class="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][1]}"; ?>" id="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][1]}-" . html_attr($record[$config['child-primary-key-index']]); ?>"><?php echo safe_html($record[1]); ?></td> <td class="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][2]}"; ?>" id="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][2]}-" . html_attr($record[$config['child-primary-key-index']]); ?>"><?php echo safe_html($record[2]); ?></td> <td class="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][3]}"; ?>" id="<?php echo "{$parameters['ChildTable']}-{$config['display-field-names'][3]}-" . html_attr($record[$config['child-primary-key-index']]); ?>"><?php echo safe_html($record[3]); ?></td> </tr> <?php } ?> </tbody> <tfoot> <tr> <td colspan="<?php echo (count($config['display-fields']) + ($config['open-detail-view-on-click'] ? 1 : 0)); ?>"> <?php if($totalMatches){ ?> <?php if($config['show-page-progress']){ ?> <span style="margin: 10px;"> <?php $firstRecord = ($parameters['Page'] - 1) * $config['records-per-page'] + 1; ?> <?php echo str_replace(array('<FirstRecord>', '<LastRecord>', '<RecordCount>'), array($firstRecord, $firstRecord + count($records) - 1, $totalMatches), $Translation['records x to y of z']); ?> </span> <?php } ?> <?php }else{ ?> <span class="text-danger" style="margin: 10px;"><?php echo $Translation['No matches found!']; ?></span> <?php } ?> </td> </tr> </tfoot> </table> </div> <?php if($totalMatches){ ?> <div class="row hidden-print"> <div class="col-xs-12"> <button type="button" class="btn btn-default" onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'page', Page: 'previous' });"><i class="glyphicon glyphicon-chevron-left"></i></button> <button type="button" class="btn btn-default" onclick="<?php echo $current_table; ?>GetChildrenRecordsList({ Verb: 'page', Page: 'next' });"><i class="glyphicon glyphicon-chevron-right"></i></button> </div> </div> <?php } ?> </div> <div class="col-xs-1 md-hidden lg-hidden"></div> </div> <script>$j(function(){ $j('img[src^="thumbnail.php?i=&"').parent().hide(); });</script>
<?php namespace DoctorsBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Blockdays * * @ORM\Table(name="blockdays", indexes={@ORM\Index(name="doctor_bd_fk_idx", columns={"Doctor"})}) * @ORM\Entity */ class Blockdays { /** * @var integer * * @ORM\Column(name="Id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string * * @ORM\Column(name="Day", type="string", length=45, nullable=true) */ private $day; /** * @var \Doctors * * @ORM\ManyToOne(targetEntity="Doctors") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="Doctor", referencedColumnName="id") * }) */ private $doctor; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set day * * @param string $day * * @return Blockdays */ public function setDay($day) { $this->day = $day; return $this; } /** * Get day * * @return string */ public function getDay() { return $this->day; } /** * Set doctor * * @param \DoctorsBundle\Entity\Doctors $doctor * * @return Blockdays */ public function setDoctor(\DoctorsBundle\Entity\Doctors $doctor = null) { $this->doctor = $doctor; return $this; } /** * Get doctor * * @return \DoctorsBundle\Entity\Doctors */ public function getDoctor() { return $this->doctor; } }
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Validator */ namespace Zend\Validator\File; use Zend\Stdlib\ErrorHandler; use Zend\Validator\AbstractValidator; use Zend\Validator\Exception; /** * Validator for the image size of a image file * * @category Zend * @package Zend_Validator */ class ImageSize extends AbstractValidator { /** * @const string Error constants */ const WIDTH_TOO_BIG = 'fileImageSizeWidthTooBig'; const WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall'; const HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig'; const HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall'; const NOT_DETECTED = 'fileImageSizeNotDetected'; const NOT_READABLE = 'fileImageSizeNotReadable'; /** * @var array Error message template */ protected $messageTemplates = array( self::WIDTH_TOO_BIG => "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected", self::WIDTH_TOO_SMALL => "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected", self::HEIGHT_TOO_BIG => "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected", self::HEIGHT_TOO_SMALL => "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected", self::NOT_DETECTED => "The size of image '%value%' could not be detected", self::NOT_READABLE => "File '%value%' is not readable or does not exist", ); /** * @var array Error message template variables */ protected $messageVariables = array( 'minwidth' => array('options' => 'minWidth'), 'maxwidth' => array('options' => 'maxWidth'), 'minheight' => array('options' => 'minHeight'), 'maxheight' => array('options' => 'maxHeight'), 'width' => 'width', 'height' => 'height' ); /** * Detected width * * @var integer */ protected $width; /** * Detected height * * @var integer */ protected $height; /** * Options for this validator * * @var array */ protected $options = array( 'minWidth' => null, // Minimum image width 'maxWidth' => null, // Maximum image width 'minHeight' => null, // Minimum image height 'maxHeight' => null, // Maximum image height ); /** * Sets validator options * * Accepts the following option keys: * - minheight * - minwidth * - maxheight * - maxwidth * * @param array|\Traversable $options */ public function __construct($options = null) { if (1 < func_num_args()) { if (!is_array($options)) { $options = array('minWidth' => $options); } $argv = func_get_args(); array_shift($argv); $options['minHeight'] = array_shift($argv); if (!empty($argv)) { $options['maxWidth'] = array_shift($argv); if (!empty($argv)) { $options['maxHeight'] = array_shift($argv); } } } parent::__construct($options); } /** * Returns the minimum allowed width * * @return integer */ public function getMinWidth() { return $this->options['minWidth']; } /** * Sets the minimum allowed width * * @param integer $minWidth * @return ImageSize Provides a fluid interface * @throws Exception\InvalidArgumentException When minwidth is greater than maxwidth */ public function setMinWidth($minWidth) { if (($this->getMaxWidth() !== null) && ($minWidth > $this->getMaxWidth())) { throw new Exception\InvalidArgumentException("The minimum image width must be less than or equal to the " . " maximum image width, but {$minWidth} > {$this->getMaxWidth()}"); } $this->options['minWidth'] = (int) $minWidth; return $this; } /** * Returns the maximum allowed width * * @return integer */ public function getMaxWidth() { return $this->options['maxWidth']; } /** * Sets the maximum allowed width * * @param integer $maxWidth * @return ImageSize Provides a fluid interface * @throws Exception\InvalidArgumentException When maxwidth is less than minwidth */ public function setMaxWidth($maxWidth) { if (($this->getMinWidth() !== null) && ($maxWidth < $this->getMinWidth())) { throw new Exception\InvalidArgumentException("The maximum image width must be greater than or equal to the " . "minimum image width, but {$maxWidth} < {$this->getMinWidth()}"); } $this->options['maxWidth'] = (int) $maxWidth; return $this; } /** * Returns the minimum allowed height * * @return integer */ public function getMinHeight() { return $this->options['minHeight']; } /** * Sets the minimum allowed height * * @param integer $minHeight * @return ImageSize Provides a fluid interface * @throws Exception\InvalidArgumentException When minheight is greater than maxheight */ public function setMinHeight($minHeight) { if (($this->getMaxHeight() !== null) && ($minHeight > $this->getMaxHeight())) { throw new Exception\InvalidArgumentException("The minimum image height must be less than or equal to the " . " maximum image height, but {$minHeight} > {$this->getMaxHeight()}"); } $this->options['minHeight'] = (int) $minHeight; return $this; } /** * Returns the maximum allowed height * * @return integer */ public function getMaxHeight() { return $this->options['maxHeight']; } /** * Sets the maximum allowed height * * @param integer $maxHeight * @return ImageSize Provides a fluid interface * @throws Exception\InvalidArgumentException When maxheight is less than minheight */ public function setMaxHeight($maxHeight) { if (($this->getMinHeight() !== null) && ($maxHeight < $this->getMinHeight())) { throw new Exception\InvalidArgumentException("The maximum image height must be greater than or equal to the " . "minimum image height, but {$maxHeight} < {$this->getMinHeight()}"); } $this->options['maxHeight'] = (int) $maxHeight; return $this; } /** * Returns the set minimum image sizes * * @return array */ public function getImageMin() { return array('minWidth' => $this->getMinWidth(), 'minHeight' => $this->getMinHeight()); } /** * Returns the set maximum image sizes * * @return array */ public function getImageMax() { return array('maxWidth' => $this->getMaxWidth(), 'maxHeight' => $this->getMaxHeight()); } /** * Returns the set image width sizes * * @return array */ public function getImageWidth() { return array('minWidth' => $this->getMinWidth(), 'maxWidth' => $this->getMaxWidth()); } /** * Returns the set image height sizes * * @return array */ public function getImageHeight() { return array('minHeight' => $this->getMinHeight(), 'maxHeight' => $this->getMaxHeight()); } /** * Sets the minimum image size * * @param array $options The minimum image dimensions * @return ImageSize Provides a fluent interface */ public function setImageMin($options) { $this->setOptions($options); return $this; } /** * Sets the maximum image size * * @param array|\Traversable $options The maximum image dimensions * @return ImageSize Provides a fluent interface */ public function setImageMax($options) { $this->setOptions($options); return $this; } /** * Sets the minimum and maximum image width * * @param array $options The image width dimensions * @return ImageSize Provides a fluent interface */ public function setImageWidth($options) { $this->setImageMin($options); $this->setImageMax($options); return $this; } /** * Sets the minimum and maximum image height * * @param array $options The image height dimensions * @return ImageSize Provides a fluent interface */ public function setImageHeight($options) { $this->setImageMin($options); $this->setImageMax($options); return $this; } /** * Returns true if and only if the image size of $value is at least min and * not bigger than max * * @param string $value Real file to check for image size * @param array $file File data from \Zend\File\Transfer\Transfer * @return boolean */ public function isValid($value, $file = null) { if ($file === null) { $file = array('name' => basename($value)); } // Is file readable ? if (false === stream_resolve_include_path($value)) { return $this->throwError($file, self::NOT_READABLE); } ErrorHandler::start(); $size = getimagesize($value); ErrorHandler::stop(); $this->setValue($file); if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { return $this->throwError($file, self::NOT_DETECTED); } $this->width = $size[0]; $this->height = $size[1]; if ($this->width < $this->getMinWidth()) { $this->throwError($file, self::WIDTH_TOO_SMALL); } if (($this->getMaxWidth() !== null) && ($this->getMaxWidth() < $this->width)) { $this->throwError($file, self::WIDTH_TOO_BIG); } if ($this->height < $this->getMinHeight()) { $this->throwError($file, self::HEIGHT_TOO_SMALL); } if (($this->getMaxHeight() !== null) && ($this->getMaxHeight() < $this->height)) { $this->throwError($file, self::HEIGHT_TOO_BIG); } if (count($this->getMessages()) > 0) { return false; } return true; } /** * Throws an error of the given type * * @param string $file * @param string $errorType * @return false */ protected function throwError($file, $errorType) { if ($file !== null) { if (is_array($file)) { if (array_key_exists('name', $file)) { $this->value = $file['name']; } } elseif (is_string($file)) { $this->value = $file; } } $this->error($errorType); return false; } }
<!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"> <title>Laravel</title> <!-- Fonts --> <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> <!-- Styles --> <style> html, body { background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0; } .full-height { height: 100vh; } .flex-center { align-items: center; display: flex; justify-content: center; } .position-ref { position: relative; } .top-right { position: absolute; right: 10px; top: 18px; } .content { text-align: center; } .title { font-size: 84px; } .links > a { color: #636b6f; padding: 0 25px; font-size: 12px; font-weight: 600; letter-spacing: .1rem; text-decoration: none; text-transform: uppercase; } .m-b-md { margin-bottom: 30px; } </style> </head> <body> <div class="flex-center position-ref full-height"> {{--<div class="top-right links">--}} {{--@auth--}} {{--<a href="{{ url('/home') }}">Home</a>--}} {{--@else--}} {{--<a href="{{ route('login') }}">Login</a>--}} {{--<a href="{{ route('register') }}">Register</a>--}} {{--@endauth--}} {{--</div>--}} <div class="content"> <div class="title m-b-md"> Easy Wait </div> <div class="links"> <a href="/auth/sign-in">SIGN IN NOW</a> </div> </div> </div> </body> </html>
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Venue extends Model { protected $fillable = ['name','address','capacity','price']; }
<?php namespace App\Http\Controllers\Admin\Auth; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Category; use App\Models\Restaurant; use App\DataTables\CategoryDataTable; use App\Contracts\CategoryContract; use App\Repositories\CategoryRepositories; class CategoryController extends Controller { public function __construct(CategoryContract $Category) { $this->Category = $Category; } /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('admin.dashboard.addcategory'); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create(CategoryDataTable $CategoryDataTable) { $Category =$this->Category->create(); return $CategoryDataTable->render('admin.dashboard.listcategory'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $request->validate([ 'restaurants_id' => 'required|not-in:0', 'name' => 'required|regex:/[A-Z]/', 'image' => 'required|mimes:jpeg,png,jpg,gif,svg' ]); $Category =$this->Category->store($request->all()); return redirect()->route('admin.category.create')->with('success','Category successfully added !'); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $data =$this->Category->show($id); return View('admin.dashboard.showcategory',compact('data')); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $datas =$this->Category->edit($id); $data = $datas['dataa']; $restaurant = $datas['restaurant']; return View('admin.dashboard.editcategory',compact('data','restaurant')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $request->validate([ 'restaurants_id' => 'required|not-in:0', 'name' => 'required|regex:/[A-Z]/', ]); $data =$this->Category->update($request->all(),$id); return redirect()->route('admin.category.create')->with('info','Category successfully updated'); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $data =$this->Category->destroy($id); return redirect()->route('admin.category.create')->with('warning','Category successfully Deleted!'); } }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Wallet; class WalletController extends Controller { public function index(){ //Buscamos la información del modelo wallet $wallet = Wallet::firstOrFail(); /** * retornamos la información de la busqueda y * le dicemos que tambien traiga las relaciones de la trasnfers * y le decimos que tambien responda un estatus 200 */ return response()->json($wallet->load('transfers'), 200); } }
<?php /** * Customer processing order email * * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates/Emails * @version 3.7.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /* * @hooked WC_Emails::email_header() Output the email header */ do_action( 'woocommerce_email_header', $email_heading, $email ); ?> <?php /* translators: %s: Customer first name */ ?> <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p> <?php /* translators: %s: Order number */ ?> <p><?php printf( esc_html__( 'Just to let you know &mdash; we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p> <?php /** * Show user-defined additional content - this is set in each email's settings. */ if ( $additional_content ) { echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); } /* * @hooked WC_Emails::order_details() Shows the order details table. * @hooked WC_Structured_Data::generate_order_data() Generates structured data. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. * @since 2.5.0 */ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); /* * @hooked WC_Emails::order_meta() Shows order meta data. */ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); /* * @hooked WC_Emails::customer_details() Shows customer details * @hooked WC_Emails::email_address() Shows email address */ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); /* * @hooked WC_Emails::email_footer() Output the email footer */ do_action( 'woocommerce_email_footer', $email );
<?php declare(strict_types = 1); namespace App\Command; use App\Database\Client; use Dibi\Exception; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class Kraje extends Command { protected static $defaultName = 'app:kraje'; protected function configure() { $this->setDescription('Zpracuje výsledky v jednotlivých krajích.'); } /** * @param InputInterface $input * @param OutputInterface $output * @return int|void|null * @throws Exception */ protected function execute(InputInterface $input, OutputInterface $output) { $db = new Client(); $parser = new \App\Kraje($db->connection()); $parser->parse(); } }
<?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Api\V2010\Account\Sms; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Version; /** * @property string accountSid * @property string apiVersion * @property string body * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property \DateTime dateSent * @property string direction * @property string from * @property string price * @property string priceUnit * @property string sid * @property string status * @property string to * @property string uri */ class SmsMessageInstance extends InstanceResource { /** * Initialize the SmsMessageInstance * * @param \Twilio\Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $accountSid A 34 character string that uniquely identifies * this resource. * @param string $sid The sid * @return \Twilio\Rest\Api\V2010\Account\Sms\SmsMessageInstance */ public function __construct(Version $version, array $payload, $accountSid, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( 'accountSid' => $payload['account_sid'], 'apiVersion' => $payload['api_version'], 'body' => $payload['body'], 'dateCreated' => Deserialize::iso8601DateTime($payload['date_created']), 'dateUpdated' => Deserialize::iso8601DateTime($payload['date_updated']), 'dateSent' => Deserialize::iso8601DateTime($payload['date_sent']), 'direction' => $payload['direction'], 'from' => $payload['from'], 'price' => $payload['price'], 'priceUnit' => $payload['price_unit'], 'sid' => $payload['sid'], 'status' => $payload['status'], 'to' => $payload['to'], 'uri' => $payload['uri'], ); $this->solution = array( 'accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ); } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return \Twilio\Rest\Api\V2010\Account\Sms\SmsMessageContext Context for * this * SmsMessageInstance */ protected function proxy() { if (!$this->context) { $this->context = new SmsMessageContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Deletes the SmsMessageInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->proxy()->delete(); } /** * Fetch a SmsMessageInstance * * @return SmsMessageInstance Fetched SmsMessageInstance */ public function fetch() { return $this->proxy()->fetch(); } /** * Update the SmsMessageInstance * * @param array $options Optional Arguments * @return SmsMessageInstance Updated SmsMessageInstance */ public function update(array $options = array()) { return $this->proxy()->update( $options ); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get($name) { if (array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (property_exists($this, '_' . $name)) { $method = 'get' . ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { $context = array(); foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.SmsMessageInstance ' . implode(' ', $context) . ']'; } }
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/Authentication for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace AuthenticationTest; class SampleTest extends Framework\TestCase { public function testSample() { $this->assertInstanceOf('Zend\Di\LocatorInterface', $this->getLocator()); } }
<?php namespace Drupal\social_user_export\Plugin\UserExportPlugin; use Drupal\Core\Database\Connection; use Drupal\Core\Datetime\DateFormatterInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\group\Entity\Group; use Drupal\social_group\SocialGroupHelperService; use Drupal\social_user_export\Plugin\UserExportPluginBase; use Drupal\user\UserInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides a 'UserGroupMemberships' user export row. * * @UserExportPlugin( * id = "user_group_memberships", * label = @Translation("Group memberships (specified)"), * weight = -198, * ) */ class UserGroupMemberships extends UserExportPluginBase { /** * The group helper service. * * @var \Drupal\social_group\SocialGroupHelperService */ public $groupHelper; /** * UserExportPluginBase constructor. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager. * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter * The date formatter. * @param \Drupal\Core\Database\Connection $database * The database connection. * @param \Drupal\social_group\SocialGroupHelperService $group_helper * The group helper service. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, DateFormatterInterface $date_formatter, Connection $database, SocialGroupHelperService $group_helper) { parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $date_formatter, $database); $this->groupHelper = $group_helper; } /** * The create method. * * @param \Symfony\Component\DependencyInjection\ContainerInterface $container * Container interface. * @param array $configuration * An array of configuration. * @param string $plugin_id * The plugin id. * @param mixed $plugin_definition * The plugin definition. * * @return \Drupal\Core\Plugin\ContainerFactoryPluginInterface|\Drupal\social_user_export\Plugin\UserExportPluginBase * Returns the UserExportPluginBase. */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { return new static( $configuration, $plugin_id, $plugin_definition, $container->get('entity_type.manager'), $container->get('date.formatter'), $container->get('database'), $container->get('social_group.helper_service') ); } /** * {@inheritdoc} */ public function getHeader() { return $this->t('Group memberships (specified)'); } /** * {@inheritdoc} */ public function getValue(UserInterface $entity) { $group_memberships = Group::loadMultiple($this->groupHelper->getAllGroupsForUser($entity->id())); $groups = []; foreach ($group_memberships as $group) { $groups[] = "{$group->label()} ({$group->id()})"; } return implode(', ', $groups); } }
<?php echo js_asset('views/setting/home/main_page.js'); ?> <div class="col-xs-12"> <div class="panel panel-default"> <div class="panel-body"> <h2 style="text-align: center;padding-bottom: 0px;padding-top: 0px;"><?php echo $company; ?></h2><h4 style="text-align: center;"><small><?php echo $address; ?></small></h4> </div> </div> </div> <div class="col-xs-12"> <div class="panel panel-default"> <div class="panel-body"> <div id="ch1" style="width:100%;"></div> </div> </div> </div> <div class="col-xs-12 col-md-6"> <div class="panel panel-default"> <div class="panel-body"> <div id="ch2" style="width:100%"></div> </div> </div> </div> <div class="col-xs-12 col-md-6"> <div class="panel panel-default"> <div class="panel-body"> <div id="ch3" style="width:100%"></div> </div> </div> </div> <div class="col-xs-12" id="div-at"> <div class="panel panel-default"> <div class="panel-body"> <h3 style="color:#d43f3a;">แจ้งเตือนภายในระบบ</h3> <hr> <div id="show-at" class="col-xs-12"> </div> </div> </div> </div>
<div class="text-center"> <a class="btn btn-info" href="<?= base_url('crud/create'); ?>" role="button">Iniciar Registro</a> <!--Formas de botones <a class="btn btn-primary" href="#" role="button">Link</a> <button class="btn btn-primary" type="submit">Button</button> <input class="btn btn-primary" type="button" value="Input"> --> </div>
@extends('layouts.plantilla') @section('title', 'dashboar') @section('cuerpo') <main class="container-fluid p-5"> <img class="imgFondo"src="../img/ferreteria.png" alt="imagen seccion articulos"> <div class="row"> <div class="col-lg-5 miTop"> <form> <div class="form-group"> <label for="act-cedula">Escoja el producto a eliminar</label> <div class="dropdown"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> Varilla 7mm </button> <div class="dropdown-menu"> <a class="dropdown-item" href="#">Cemento Argos</a> <a class="dropdown-item" href="#">Gravilla</a> <a class="dropdown-item" href="#">Arena</a> <a class="dropdown-item" href="#">Varilla 7mm</a> </div> </div> </div> <div class="form-group"> <label for="act-cedula">¿Cuantos artículos desea eliminar?</label> <input type="text" class="form-control" id="categoria" aria-describedby="emailHelp"> <small id="emailHelp" class="form-text text-muted">rellene los campos correspondientes</small> </div> <div class="form-group"> <input type="submit" class="form-control" id="enviar" value="Registrar"> <a href="menu.html">Atras</a> </div> </form> </div> <div class="col-lg-7"> <div class="mi-contenedor-miTabla p-3"> <h3 class="text-center p-2">Listado de Usuarios</h3> <div class="contenedor-tabla table-responsive p-5"> <table class="table table-striped table-dark table-bordered"> <thead class=""> <tr class=""> <th scope="col">ARTICULO</th> <th scope="col">CATEGORIA</th> <th scope="col">N° ARTICULOS</th> <th scope="col">PRECIO UNITARIO</th> <th scope="col">TOTAL</th> </tr> </thead> <tbody> <tr> <td>Cemento</td> <td>Argos</td> <td>300 unidades</td> <td>$25000</td> <td>$100000</td> </tr> <tr> <td>Gravilla</td> <td>----</td> <td>14 mts</td> <td>$35000</td> <td>$45000</td> </tr> <tr> <td>Arena</td> <td>El socio</td> <td>20 mts</td> <td>$10000</td> <td>$35000</td> </tr> <tr> <td>Varilla</td> <td>Argos</td> <td>100 mts</td> <td>$100000/td> <td>1000000</td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> </div> <div class="contenedor-numPaginas"> <nav aria-label="Page navigation example"> <ul class="pagination justify-content-center"> <li class="page-item"> <a class="page-link" href="#">Previous</a> </li> <li class="page-item"><a class="page-link" href="#">1</a></li> <li class="page-item"><a class="page-link" href="#">2</a></li> <li class="page-item"><a class="page-link" href="#">3</a></li> <li class="page-item"> <a class="page-link" href="#">Next</a> </li> </ul> </nav> </div> </div> </div> </div> </main> @endsection
<div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php echo $tituloMantenedor; ?> <small>Panel de Control</small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li><a href="#">Examples</a></li> <li class="active">Blank page</li> </ol> </section> <section class="content"> <div class='row'> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-yellow"> <div class="inner"> <h3>44</h3> <p>Funcionarios</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> <a href="#" class="small-box-footer">Más Información <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-aqua"> <div class="inner"> <h3>44</h3> <p>Párvulos</p> </div> <div class="icon" style='margin-top:-5px'> <i class="fa fa-child"></i> </div> <a href="#" class="small-box-footer">Más Información <i class="fa fa-arrow-circle-right"></i></a> </div> </div> </div> </section> </div>
{!! Form::open(['route' => ['clinics.destroy', $id], 'method' => 'delete']) !!} <div class='btn-group'> <a href="{{ route('clinics.show', $id) }}" class='btn btn-default btn-xs'> <span class="tooltiptext">Show</span><i class="glyphicon glyphicon-eye-open"></i> </a> <a href="{{ route('clinics.edit', $id) }}" class='btn btn-default btn-xs'> <span class="tooltiptext">Edit</span><i class="glyphicon glyphicon-edit"></i> </a> @if(Auth::user()->role_id != 3) {!! Form::button('<span class="tooltiptext">Delete</span><i class="glyphicon glyphicon-trash"></i>', [ 'type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')" ]) !!} @endif </div> {!! Form::close() !!}
<?php namespace Bazavlukd\VueSpaTemplate\Tests; use PHPUnit\Framework\TestCase; class ExampleTest extends TestCase { /** @test */ public function true_is_true() { $this->assertTrue(true); } }
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <title>Hello, world!</title> </head> <body> <div class="container py-3"> <header> <div class="d-flex flex-column flex-md-row align-items-center pb-3 mb-4 border-bottom"> <a href="/" class="d-flex align-items-center text-dark text-decoration-none"> <img src="https://laravel.com/img/logomark.min.svg" width="40" height="32" class="me-2"> <span class="fs-4">Blog Sederhana - Laravel 8</span> </a> <nav class="d-inline-flex mt-2 mt-md-0 ms-md-auto"> <a class="me-3 py-2 text-dark text-decoration-none" href="#">Home</a> <a class="me-3 py-2 text-dark text-decoration-none" href="/posts">Blog</a> <a class="me-3 py-2 text-dark text-decoration-none" href="/about">About</a> @auth <div class="dropdown me-3 py-2"> <a class="dropdown-toggle text-decoration-none text-success fw-bold" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false"> {{ auth()->user()->name }} </a> <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink"> <li><a class="dropdown-item" href="/dashboard">My Dashboard</a></li> <li><hr class="dropdown-devider" href="#"></li> <li> <form action="/logout" method="POST"> @csrf <button class="dropdown-item">Logout</button> </form> </li> </ul> </div> @else <a class="me-3 btn btn-outline-primary" href="/login">Login</a> <a class="me-3 btn btn-warning" href="/register">Register</a> @endauth </nav> </div> </header> <main> @yield('content') </main> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> </body> </html>
<?php namespace App; use Illuminate\Database\Eloquent\Model as Eloquent; class Tbl_category extends Eloquent { // }
<?php namespace app\admin\logic\system; use app\admin\base\BaseLogic; use app\admin\service\TriggerService; use app\common\model\system\SystemAuth; use app\common\model\system\SystemAuthNode; /** * 授权 */ class AuthLogic extends BaseLogic { protected $model_class = SystemAuth::class; public function getAuthorizeNodeListByAdminId(int $id) { try { //code... return $this->model->getAuthorizeNodeListByAdminId($id); } catch (\Throwable $th) { //throw $th; } return []; } public function resetList($delete_id, $node): bool { try { //code... $authNode = new SystemAuthNode(); $authNode->where('auth_id', $delete_id)->delete(); if (!empty($node)) { $saveAll = []; foreach ($node as $vo) { $saveAll[] = [ 'auth_id' => $delete_id, 'node_id' => $vo, ]; } $authNode->saveAll($saveAll); } TriggerService::updateMenu(); return true; } catch (\Throwable $th) { //throw $th; } return false; } }
<?php namespace WeDevs\PM\Task\Transformers; use WeDevs\PM\Task\Models\Task; use League\Fractal\TransformerAbstract; use WeDevs\PM\Task_List\Transformers\Task_List_Transformer; use WeDevs\PM\Common\Transformers\Board_Transformer; use WeDevs\PM\Comment\Transformers\Comment_Transformer; use WeDevs\PM\Common\Transformers\Assignee_Transformer; use WeDevs\PM\File\Transformers\File_Transformer; use League\Fractal\Pagination\IlluminatePaginatorAdapter; use WeDevs\PM\User\Models\User; use WeDevs\PM\User\Transformers\User_Transformer; use WeDevs\PM\Activity\Transformers\Activity_Transformer; use WeDevs\PM\Common\Traits\Resource_Editors; use Illuminate\Pagination\Paginator; use WeDevs\PM\Common\Models\Boardable; class Task_Transformer extends TransformerAbstract { use Resource_Editors; /** * List of resources to automatically include * * @var array */ protected $defaultIncludes = [ 'creator', 'updater', 'task_list', 'assignees' ]; /** * List of resources possible to include * * @var array */ protected $availableIncludes = [ 'boards', 'comments', 'files', 'completer', 'activities' ]; /** * Turn this item object into a generic array * * @return array */ public function transform( Task $item ) { if ( $item->pivot ) { $order = $item->pivot->order; } else { $orderObj = Boardable::where(['boardable_id' => $item->id, 'boardable_type' => 'task'])->first(); if ( $orderObj ) { $order = $orderObj->order; } else { $order = 0; } } return apply_filters( 'pm_task_transform', [ 'id' => (int) $item->id, 'title' => $item->title, 'description' => [ 'html' => pm_get_content( $item->description ), 'content' => $item->description ], 'estimation' => $item->estimation, 'start_at' => format_date( $item->start_at ), 'due_date' => format_date( $item->due_date ), 'complexity' => $item->complexity, 'priority' => $item->priority, 'order' => (int) $order, 'payable' => $item->payable, 'recurrent' => $item->recurrent, 'parent_id' => $item->parent_id, 'status' => $item->status, 'project_id' => $item->project_id, 'category_id' => $item->category_id, 'created_at' => format_date( $item->created_at ), 'completed_at' => format_date( $item->completed_at ), 'updated_at' => format_date( $item->updated_at ), 'task_list_id' => $item->task_list, 'meta' => $this->meta( $item ), ], $item ); } public function meta( Task $item ) { $meta = $item->metas()->get()->toArray(); $meta = wp_list_pluck( $meta, 'meta_value', 'meta_key' ); $metas = array_merge( $meta, [ 'total_comment' => $item->comments->count(), 'total_files' => $item->files->count(), 'total_board' => $item->boards->count(), 'total_assignee' => $item->assignees->count(), 'can_complete_task' => pm_user_can_complete_task( $item ), ] ); return $metas; } /** * Getter for defaultIncludes. * * @return array */ public function getDefaultIncludes() { return apply_filters( "pm_task_transformer_default_includes", $this->defaultIncludes ); } /** * Include task list * * @param Task $item * @return \League\Fractal\Resource\Item */ public function includeTaskList( Task $item ) { $task_list = $item->task_lists->first(); if ( ! empty( $task_list ) ) { return $this->item( $task_list, new Task_List_Transformer ); } return null; } /** * Include boards in which the task is atttached * * @param Task $item * @return \League\Fractal\Resource\Collection */ public function includeBoards( Task $item ) { $page = isset( $_GET['board_page'] ) ? intval($_GET['board_page']) : 1; Paginator::currentPageResolver(function () use ($page) { return $page; }); $boards = $item->boards() ->orderBy( 'created_at', 'DESC' ) ->paginate( 10 ); $board_collection = $boards->getCollection(); $resource = $this->collection( $board_collection, new Board_Transformer ); $resource->setPaginator( new IlluminatePaginatorAdapter( $boards ) ); return $resource; } public function includeComments( Task $item ) { $page = isset( $_GET['comment_page'] ) ? intval( $_GET['comment_page'] ) : 1; Paginator::currentPageResolver(function () use ($page) { return $page; }); $comments = $item->comments() ->orderBy( 'created_at', 'ASC' ) ->paginate( pm_config('app.comment_per_page') ); $comment_collection = $comments->getCollection(); $resource = $this->collection( $comment_collection, new Comment_Transformer ); $resource->setPaginator( new IlluminatePaginatorAdapter( $comments ) ); return $resource; } public function includeAssignees( Task $item ) { $users = $item->user; //pmpr(pm_get_response($this->collection( $users, new User_Transformer ))); die(); return $this->collection( $users, new User_Transformer ); } public function includeActivities( Task $item ) { $page = isset( $_GET['activitie_page'] ) ? intval( $_GET['activitie_page'] ) : 1; Paginator::currentPageResolver(function () use ($page) { return $page; }); $activities = $item->activities()->paginate( 10 ); return $this->collection( $activities, new Activity_Transformer ); } public function includeFiles( Task $item ) { $page = isset( $_GET['file_page'] ) ? intval( $_GET['file_page'] ) : 1; Paginator::currentPageResolver(function () use ($page) { return $page; }); $files = $item->files()->paginate( 10 ); $file_collection = $files->getCollection(); $resource = $this->collection( $file_collection, new File_Transformer ); $resource->setPaginator( new IlluminatePaginatorAdapter( $files ) ); return $resource; } public function includeCompleter( $item ) { $completer = $item->completer; return $this->item( $completer, new User_Transformer ); } }
<?php /** * Representation of a result from a query against the fDatabase class * * @copyright Copyright (c) 2007-2010 Will Bond * @author Will Bond [wb] <will@flourishlib.com> * @license http://flourishlib.com/license * * @package Flourish * @link http://flourishlib.com/fResult * * @version 1.0.0b11 * @changes 1.0.0b11 Backwards Compatibility Break - removed ODBC support [wb, 2010-07-31] * @changes 1.0.0b10 Added IBM DB2 support [wb, 2010-04-13] * @changes 1.0.0b9 Added support for prepared statements [wb, 2010-03-02] * @changes 1.0.0b8 Fixed a bug with decoding MSSQL national column when using an ODBC connection [wb, 2009-09-18] * @changes 1.0.0b7 Added the method ::unescape(), changed ::tossIfNoRows() to return the object for chaining [wb, 2009-08-12] * @changes 1.0.0b6 Fixed a bug where ::fetchAllRows() would throw a fNoRowsException [wb, 2009-06-30] * @changes 1.0.0b5 Added the method ::asObjects() to allow for returning objects instead of associative arrays [wb, 2009-06-23] * @changes 1.0.0b4 Fixed a bug with not properly converting SQL Server text to UTF-8 [wb, 2009-06-18] * @changes 1.0.0b3 Added support for Oracle, various bug fixes [wb, 2009-05-04] * @changes 1.0.0b2 Updated for new fCore API [wb, 2009-02-16] * @changes 1.0.0b The initial implementation [wb, 2007-09-25] */ class fResult implements Iterator { /** * Composes text using fText if loaded * * @param string $message The message to compose * @param mixed $component A string or number to insert into the message * @param mixed ... * @return string The composed and possible translated message */ static protected function compose($message) { $args = array_slice(func_get_args(), 1); if (class_exists('fText', FALSE)) { return call_user_func_array( array('fText', 'compose'), array($message, $args) ); } else { return vsprintf($message, $args); } } /** * The number of rows affected by an `INSERT`, `UPDATE`, `DELETE`, etc * * @var integer */ private $affected_rows = 0; /** * The auto incremented value from the query * * @var integer */ private $auto_incremented_value = NULL; /** * The character set to transcode from for MSSQL queries * * @var string */ private $character_set = NULL; /** * The current row of the result set * * @var array */ private $current_row = NULL; /** * The database object this result was created from * * @var fDatabase */ private $database = NULL; /** * If rows should be converted to objects * * @var boolean */ private $output_objects = FALSE; /** * The position of the pointer in the result set * * @var integer */ private $pointer; /** * The result resource or array * * @var mixed */ private $result = NULL; /** * The number of rows returned by a select * * @var integer */ private $returned_rows = 0; /** * The SQL query * * @var string */ private $sql = ''; /** * Holds the data types for each column to allow for on-the-fly unescaping * * @var array */ private $unescape_map = array(); /** * The SQL from before translation - only applicable to translated queries * * @var string */ private $untranslated_sql = NULL; /** * Configures the result set * * @internal * * @param fDatabase $database The database object this result set was created from * @param string $character_set MSSQL only: the character set to transcode from since MSSQL doesn't do UTF-8 * @return fResult */ public function __construct($database, $character_set=NULL) { if (!$database instanceof fDatabase) { throw new fProgrammerException( 'The database object provided does not appear to be a descendant of fDatabase' ); } $this->database = $database; $this->character_set = $character_set; } /** * Frees up the result object to save memory * * @internal * * @return void */ public function __destruct() { if (!is_resource($this->result) && !is_object($this->result)) { return; } switch ($this->database->getExtension()) { case 'mssql': mssql_free_result($this->result); break; case 'mysql': mysql_free_result($this->result); break; case 'mysqli': if (is_resource($this->result)) { mysqli_free_result($this->result); } break; case 'pgsql': pg_free_result($this->result); break; } $this->result = NULL; } /** * All requests that hit this method should be requests for callbacks * * @internal * * @param string $method The method to create a callback for * @return callback The callback for the method requested */ public function __get($method) { return array($this, $method); } /** * Gets the next row from the result and assigns it to the current row * * @return void */ private function advanceCurrentRow() { $type = $this->database->getType(); $extension = $this->database->getExtension(); switch ($extension) { case 'mssql': $row = mssql_fetch_assoc($this->result); if (!empty($row)) { $row = $this->fixDblibMSSQLDriver($row); } break; case 'mysql': $row = mysql_fetch_assoc($this->result); break; case 'mysqli': if (is_object($this->result)) { $row = mysqli_fetch_assoc($this->result); } else { $row = $this->result[$this->pointer]; } break; case 'pgsql': $row = pg_fetch_assoc($this->result); break; case 'sqlite': $row = sqlite_fetch_array($this->result, SQLITE_ASSOC); break; case 'ibm_db2': case 'oci8': case 'pdo': case 'sqlsrv': $row = $this->result[$this->pointer]; break; } // Fix uppercase column names to lowercase if ($row && ($type == 'oracle' || ($type == 'db2' && $extension != 'ibm_db2'))) { $new_row = array(); foreach ($row as $column => $value) { $new_row[strtolower($column)] = $value; } $row = $new_row; } // This is an unfortunate fix that required for databases that don't support limit // clauses with an offset. It prevents unrequested columns from being returned. if ($row && in_array($type, array('mssql', 'oracle', 'db2'))) { if ($this->untranslated_sql !== NULL && isset($row['flourish__row__num'])) { unset($row['flourish__row__num']); } } // This decodes the data coming out of MSSQL into UTF-8 if ($row && $type == 'mssql') { if ($this->character_set) { foreach ($row as $key => $value) { if (!is_string($value) || strpos($key, 'fmssqln__') === 0 || isset($row['fmssqln__' . $key]) || preg_match('#[\x0-\x8\xB\xC\xE-\x1F]#', $value)) { continue; } $row[$key] = iconv($this->character_set, 'UTF-8', $value); } } $row = $this->decodeMSSQLNationalColumns($row); } if ($this->unescape_map) { foreach ($this->unescape_map as $column => $type) { if (!isset($row[$column])) { continue; } $row[$column] = $this->database->unescape($type, $row[$column]); } } $this->current_row = $row; } /** * Sets the object to return rows as objects instead of associative arrays (the default) * * @return fResult The result object, to allow for method chaining */ public function asObjects() { $this->output_objects = TRUE; return $this; } /** * Returns the number of rows affected by the query * * @return integer The number of rows affected by the query */ public function countAffectedRows() { return $this->affected_rows; } /** * Returns the number of rows returned by the query * * @return integer The number of rows returned by the query */ public function countReturnedRows() { return $this->returned_rows; } /** * Returns the current row in the result set (required by iterator interface) * * @throws fNoRowsException When the query did not return any rows * @throws fNoRemainingException When there are no remaining rows in the result * @internal * * @return array|stdClass The current row */ public function current() { if(!$this->returned_rows) { throw new fNoRowsException('The query did not return any rows'); } if (!$this->valid()) { throw new fNoRemainingException('There are no remaining rows'); } // Primes the result set if ($this->pointer === NULL) { $this->pointer = 0; $this->advanceCurrentRow(); } if ($this->output_objects) { return (object) $this->current_row; } return $this->current_row; } /** * Decodes national (unicode) character data coming out of MSSQL into UTF-8 * * @param array $row The row from the database * @return array The fixed row */ private function decodeMSSQLNationalColumns($row) { if (strpos($this->sql, 'fmssqln__') === FALSE) { return $row; } $columns = array_keys($row); foreach ($columns as $column) { if (substr($column, 0, 9) != 'fmssqln__') { continue; } $real_column = substr($column, 9); $row[$real_column] = iconv('ucs-2le', 'utf-8', $this->database->unescape('blob', $row[$column])); unset($row[$column]); } return $row; } /** * Returns all of the rows from the result set * * @return array The array of rows */ public function fetchAllRows() { $all_rows = array(); foreach ($this as $row) { $all_rows[] = $row; } return $all_rows; } /** * Returns the row next row in the result set (where the pointer is currently assigned to) * * @throws fNoRowsException When the query did not return any rows * @throws fNoRemainingException When there are no rows left in the result * * @return array|stdClass The next row in the result */ public function fetchRow() { $row = $this->current(); $this->next(); return $row; } /** * Wraps around ::fetchRow() and returns the first field from the row instead of the whole row * * @throws fNoRowsException When the query did not return any rows * @throws fNoRemainingException When there are no rows left in the result * * @return string|number|boolean The first scalar value from ::fetchRow() */ public function fetchScalar() { $row = $this->fetchRow(); return array_shift($row); } /** * Warns the user about bugs in the DBLib driver for MSSQL, fixes some bugs * * @param array $row The row from the database * @return array The fixed row */ private function fixDblibMSSQLDriver($row) { static $using_dblib = NULL; if ($using_dblib === NULL) { // If it is not a windows box we are definitely not using dblib if (!fCore::checkOS('windows')) { $using_dblib = FALSE; // Check this windows box for dblib } else { ob_start(); phpinfo(INFO_MODULES); $module_info = ob_get_contents(); ob_end_clean(); $using_dblib = !preg_match('#FreeTDS#ims', $module_info, $match); } } if (!$using_dblib) { return $row; } foreach ($row as $key => $value) { if ($value === ' ') { $row[$key] = ''; trigger_error( self::compose( 'A single space was detected coming out of the database and was converted into an empty string - see %s for more information', 'http://bugs.php.net/bug.php?id=26315' ), E_USER_NOTICE ); } if (strlen($key) == 30) { trigger_error( self::compose( 'A column name exactly 30 characters in length was detected coming out of the database - this column name may be truncated, see %s for more information.', 'http://bugs.php.net/bug.php?id=23990' ), E_USER_NOTICE ); } if (strlen($value) == 256) { trigger_error( self::compose( 'A value exactly 255 characters in length was detected coming out of the database - this value may be truncated, see %s for more information.', 'http://bugs.php.net/bug.php?id=37757' ), E_USER_NOTICE ); } } return $row; } /** * Returns the last auto incremented value for this database connection. This may or may not be from the current query. * * @return integer The auto incremented value */ public function getAutoIncrementedValue() { return $this->auto_incremented_value; } /** * Returns the result * * @internal * * @return mixed The result of the query */ public function getResult() { return $this->result; } /** * Returns the SQL used in the query * * @return string The SQL used in the query */ public function getSQL() { return $this->sql; } /** * Returns the SQL as it was before translation * * @return string The SQL from before translation */ public function getUntranslatedSQL() { return $this->untranslated_sql; } /** * Returns the current row number (required by iterator interface) * * @throws fNoRowsException When the query did not return any rows * @throws fNoRemainingException When there are no remaining rows in the result * @internal * * @return integer The current row number */ public function key() { if ($this->pointer === NULL) { $this->current(); } return $this->pointer; } /** * Advances to the next row in the result (required by iterator interface) * * @throws fNoRowsException When the query did not return any rows * @throws fNoRemainingException When there are no remaining rows in the result * @internal * * @return void */ public function next() { if ($this->pointer === NULL) { $this->current(); } $this->pointer++; if ($this->valid()) { $this->advanceCurrentRow(); } else { $this->current_row = NULL; } } /** * Rewinds the query (required by iterator interface) * * @internal * * @return void */ public function rewind() { try { $this->seek(0); } catch (Exception $e) { } } /** * Seeks to the specified zero-based row for the specified SQL query * * @throws fNoRowsException When the query did not return any rows * * @param integer $row The row number to seek to (zero-based) * @return void */ public function seek($row) { if(!$this->returned_rows) { throw new fNoRowsException('The query did not return any rows'); } if ($row >= $this->returned_rows || $row < 0) { throw new fProgrammerException('The row requested does not exist'); } $this->pointer = $row; switch ($this->database->getExtension()) { case 'mssql': $success = mssql_data_seek($this->result, $row); break; case 'mysql': $success = mysql_data_seek($this->result, $row); break; case 'mysqli': if (is_object($this->result)) { $success = mysqli_data_seek($this->result, $row); } else { $success = TRUE; } break; case 'pgsql': $success = pg_result_seek($this->result, $row); break; case 'sqlite': $success = sqlite_seek($this->result, $row); break; case 'ibm_db2': case 'oci8': case 'pdo': case 'sqlsrv': // Do nothing since we already changed the pointer $success = TRUE; break; } if (!$success) { throw new fSQLException( 'There was an error seeking to row %s', $row ); } $this->advanceCurrentRow(); } /** * Sets the number of affected rows * * @internal * * @param integer $affected_rows The number of affected rows * @return void */ public function setAffectedRows($affected_rows) { if ($affected_rows === -1) { $affected_rows = 0; } $this->affected_rows = (int) $affected_rows; } /** * Sets the auto incremented value * * @internal * * @param integer $auto_incremented_value The auto incremented value * @return void */ public function setAutoIncrementedValue($auto_incremented_value) { $this->auto_incremented_value = ($auto_incremented_value == 0) ? NULL : $auto_incremented_value; } /** * Sets the result from the query * * @internal * * @param mixed $result The result from the query * @return void */ public function setResult($result) { $this->result = $result; } /** * Sets the number of rows returned * * @internal * * @param integer $returned_rows The number of rows returned * @return void */ public function setReturnedRows($returned_rows) { $this->returned_rows = (int) $returned_rows; if ($this->returned_rows) { $this->affected_rows = 0; } } /** * Sets the SQL used in the query * * @internal * * @param string $sql The SQL used in the query * @return void */ public function setSQL($sql) { $this->sql = $sql; } /** * Sets the SQL from before translation * * @internal * * @param string $untranslated_sql The SQL from before translation * @return void */ public function setUntranslatedSQL($untranslated_sql) { $this->untranslated_sql = $untranslated_sql; } /** * Throws an fNoResultException if the query did not return any rows * * @throws fNoRowsException When the query did not return any rows * * @param string $message The message to use for the exception if there are no rows in this result set * @return fResult The result object, to allow for method chaining */ public function tossIfNoRows($message=NULL) { if (!$this->returned_rows && !$this->affected_rows) { if ($message === NULL) { $message = 'No rows were returned or affected by the query'; } throw new fNoRowsException($message); } return $this; } /** * Sets the result object to unescape all values as they are retrieved from the object * * The data types should be from the list of types supported by * fDatabase::unescape(). * * @param array $column_data_type_map An associative array with column names as the keys and the data types as the values * @return fResult The result object, to allow for method chaining */ public function unescape($column_data_type_map) { if (!is_array($column_data_type_map)) { throw new fProgrammerException( 'The column to data type map specified, %s, does not appear to be an array', $column_data_type_map ); } $this->unescape_map = $column_data_type_map; return $this; } /** * Returns if the query has any rows left * * @return boolean If the iterator is still valid */ public function valid() { if (!$this->returned_rows) { return FALSE; } if ($this->pointer === NULL) { return TRUE; } return ($this->pointer < $this->returned_rows); } } /** * Copyright (c) 2007-2010 Will Bond <will@flourishlib.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */
<?php namespace Canary\ServiceProvider; use Canary\Exceptions\Exception; class ServiceProvider { public function get($service) { $services = config('providers'); if (isset($services[$service]) === false) { throw new Exception('Service "' . $service . '" not found'); } if (class_exists($services[$service]) === false) { throw new Exception('Class "' . $services[$service] . '" not exists'); } return new $services[$service]; } }
<?php require PATH_ABS . '/Response/admin/_includes/php/head.php'; ?> </head> <body> <?php require PATH_ABS . '/Response/admin/_includes/php/header.php'; ?> <div class="wrapper"> <div class="container"> <form role="form" method="post" action="<?=URL_BASE?>/<?=$this->core->action_urlName?>/<?=$this->command?>/editar/<?=$id_edicao?>"> <input type="hidden" name="id" value="<?=$id_edicao?>"> <!-- Page-Title --> <div class="row"> <div class="col-sm-12"> <div class="btn-group pull-right m-t-15"> <button type="submit" name="submit" class="btn btn-success waves-effect waves-light pull-right">Salvar</button> </div> <h4 class="page-title">Editar Usuário</h4> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="card-box"> <h4 class="header-title m-t-0 m-b-30">Informações Principais</h4> <p class="text-purple m-b-30 font-13">Os campos com asterisco (*) são de preenchimento obrigatório.</p> <div class="row"> <div class="col-md-6"> <div class="form-horizontal" role="form"> <div class="form-group"> <label class="col-md-3 control-label" for="nome">Nome *</label> <div class="col-md-9"> <input name="nome" type="text" id="nome" class="form-control <?php if (isset($data['flag']['nome'])){echo 'parsley-error';} ?>" placeholder="Nome" value="<?=$data['nome']?>"> <?php if (isset($data['flag']['nome'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('empty', $data['flag']['nome'])) { ?><li class="parsley-required">É necessário preencher este campo.</li><?php } ?></ul><?php } ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="sobrenome">Sobrenome *</label> <div class="col-md-9"> <input name="sobrenome" type="text" id="sobrenome" class="form-control <?php if (isset($data['flag']['sobrenome'])){echo 'parsley-error';} ?>" placeholder="Sobrenome" value="<?=$data['sobrenome']?>"> <?php if (isset($data['flag']['sobrenome'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('empty', $data['flag']['sobrenome'])) { ?><li class="parsley-required">É necessário preencher este campo.</li><?php } ?></ul><?php } ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="password">Senha</label> <div class="col-md-9"> <input name="password" type="password" id="password" class="form-control <?php if (isset($data['flag']['password'])){echo 'parsley-error';} ?>"> <?php if (isset($data['flag']['password'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('empty', $data['flag']['password'])) { ?><li class="parsley-required">É necessário preencher este campo.</li><?php } if (in_array('mismatch', $data['flag']['password'])) { ?><li class="parsley-required">As senhas não são iguais.</li><?php } ?></ul><?php } ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="repeatPassword">Repetir Senha</label> <div class="col-md-9"> <input name="repeatPassword" type="password" id="repeatPassword" class="form-control <?php if (isset($data['flag']['repeatPassword'])){echo 'parsley-error';} ?>"> <?php if (isset($data['flag']['repeatPassword'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('empty', $data['flag']['repeatPassword'])) { ?><li class="parsley-required">É necessário preencher este campo.</li><?php } ?></ul><?php } ?> </div> </div> <?php switch ($NivelPoderModule->getPower($LoginModule->userId())) { case "su": ?> <div class="form-group"> <label class="col-md-3 control-label" for="nivelUso">Nível de poder</label> <div class="col-md-9"> <select class="form-control" name="nivelUso" id="nivelUso"> <option value="0" <?php if ($data['nivelUso'] == 0) {?>selected<?php } ?>>Usuário normal</option> <option value="1" <?php if ($data['nivelUso'] == 1) {?>selected<?php } ?>>Administrador</option> <option value="2" <?php if ($data['nivelUso'] == 2) {?>selected<?php } ?>>Superuser</option> </select> </div> </div> <?php break; case "adm": ?> <div class="form-group"> <label class="col-md-3 control-label" for="nivelUso">Nível de poder</label> <div class="col-md-9"> <select class="form-control" name="nivelUso" id="nivelUso"> <option value="0" <?php if ($data['nivelUso'] == 0) {?>selected<?php } ?>>Usuário normal</option> <option value="1" <?php if ($data['nivelUso'] == 1) {?>selected<?php } ?>>Administrador</option> </select> </div> </div> <?php break; case "normal": default: ?> <input type="hidden" name="nivelUso" value="0"> <?php break; } ?> </div> </div><!-- end col --> <div class="col-md-6"> <div class="form-horizontal" role="form"> <div class="form-group"> <label class="col-md-3 control-label" for="nickname">Nome de Usuário *</label> <div class="col-md-9"> <input name="nickname" type="text" id="nickname" class="form-control <?php if (isset($data['flag']['nickname'])){echo 'parsley-error';} ?>" placeholder="Nickname" value="<?=$data['nickname']?>"> <?php if (isset($data['flag']['nickname'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('empty', $data['flag']['nickname'])) { ?><li class="parsley-required">É necessário preencher este campo.</li><?php } if (in_array('alreadyExists', $data['flag']['nickname'])) { ?><li class="parsley-required">Este nome de usuário já existe. Utilize outro.</li><?php } ?></ul><?php } ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="email">Email</label> <div class="col-md-9"> <input name="email" type="email" id="email" class="form-control <?php if (isset($data['flag']['email'])){echo 'parsley-error';} ?>" placeholder="Email" value="<?=$data['email']?>"> <?php if (isset($data['flag']['email'])) { ?><ul class="parsley-errors-list filled"><?php if (in_array('alreadyExists', $data['flag']['email'])) { ?><li class="parsley-required">Este email já existe. Utilize outro.</li><?php } ?></ul><?php } ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="telefone">Telefone</label> <div class="col-md-9"> <input name="telefone" type="text" id="telefone" class="form-control <?php if (isset($data['flag']['telefone'])){echo 'parsley-error';} ?>" placeholder="(XX) XXXXX-XXXX" data-inputmask="'mask': '(99) 9999[9]-9999'" value="<?=$data['telefone']?>"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="celular">Celular</label> <div class="col-md-9"> <input name="celular" type="text" id="celular" class="form-control <?php if (isset($data['flag']['celular'])){echo 'parsley-error';} ?>" placeholder="(XX) XXXXX-XXXX" data-inputmask="'mask': '(99) 9999[9]-9999'" value="<?=$data['celular']?>"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="descricao">Descrição</label> <div class="col-md-9"> <textarea name="descricao" id="descricao" class="form-control <?php if (isset($data['flag']['descricao'])){echo 'parsley-error';} ?>" rows="3"><?=$data['descricao']?></textarea> </div> </div> </div> </div><!-- end col --> </div><!-- end row --> </div> </div><!-- end col --> </div> <!-- end row --> <div class="row"> <div class="col-sm-12"> <div class="card-box"> <h4 class="header-title m-t-0 m-b-30">Cargos do Usuário</h4> <p class="text-muted m-b-30 font-13">Cargos servem para gerar uma hierarquia entre os usuários do sistema, permitindo um controle detalhado acerca das relações interpessoais da organização. Também possuem as permissões pré-definidas, facilitando o cadastro do usuário no sistema.</p> <h5><b>Selecione o cargo</b></h5> <select class="form-control select2" name="idCargo" data-load-perm-predef-cargos="select"> <option value="0">Nenhum</option> <?php if (is_array($cargos_hierarquia)) { foreach ($cargos_hierarquia as $departamento) { ?> <optgroup label="<?=$departamento['nome']?>"> <?php foreach ($departamento['listaCargos'] as $cargo) { ?> <option value="<?=$cargo['id']?>" <?php if ($data['idCargo'] == $cargo['id']) { ?> selected<?php } ?>> <?=$cargo['nome']?></option> <?php } ?> </optgroup> <?php } } ?> </select> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="card-box"> <h4 class="header-title m-t-0 m-b-30">Permissões Concedidas ao Usuário</h4> <p class="text-muted m-b-30 font-13">Selecione as permissões as quais o usuário possuirá para interagir com o sistema.</p> <button class="btn btn-primary waves-effect waves-light m-b-15" type="button" data-load-perm-predef-cargos="button">Carregar pré-definições das permissões</button> <div class="permissoes-itens-wrapper" data-load-perm-predef-cargos="wrapper"> <div class="row"> <?php foreach ($permissoes_hierarquia as $comandoPai) { ?> <div class="col-sm-12 col-md-6 col-lg-4"> <div class="card-box"> <div class="checkbox checkbox-primary"> <input id="<?=$comandoPai['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$comandoPai['id']?>" <?php if ($comandoPai['concedida']) { ?>checked<?php } ?>> <label for="<?=$comandoPai['id']?>-checkbox"> <h4 class="header-title m-t-0 m-b-30">[<?=$comandoPai['rotulo']?>] <?=$comandoPai['nome']?></h4> </label> </div> <?php if (is_array($comandoPai['listaMetodos'])) { foreach ($comandoPai['listaMetodos'] as $metodo) { ?> <div class="checkbox checkbox-primary"> <input id="<?=$metodo['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$metodo['id']?>" <?php if ($metodo['concedida']) { ?>checked<?php } ?>> <label for="<?=$metodo['id']?>-checkbox"> <?=$metodo['id']?> - <?=$metodo['nome']?> </label> </div> <?php } } ?> <?php if (is_array($comandoPai['listaComandosFilho'])) { foreach ($comandoPai['listaComandosFilho'] as $comandoFilho) { ?> <div class="card-box m-t-30"> <div class="checkbox checkbox-primary"> <input id="<?=$comandoFilho['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$comandoFilho['id']?>" <?php if ($comandoFilho['concedida']) { ?>checked<?php } ?>> <label for="<?=$comandoFilho['id']?>-checkbox"> <h4 class="header-title m-t-0 m-b-30">[<?=$comandoFilho['rotulo']?>] <?=$comandoFilho['nome']?></h4> </label> </div> <?php if (is_array($comandoFilho['listaMetodos'])) { foreach ($comandoFilho['listaMetodos'] as $metodo) { ?> <div class="checkbox checkbox-primary"> <input id="<?=$metodo['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$metodo['id']?>" <?php if ($metodo['concedida']) { ?>checked<?php } ?>> <label for="<?=$metodo['id']?>-checkbox"> <?=$metodo['id']?> - <?=$metodo['nome']?> </label> </div> <?php } } ?> </div> <?php } } ?> </div> </div> <?php } ?> </div> <?php if (isset($permissoes_metodo) && !empty($permissoes_metodo)) { ?> <div class="card-box"> <h4 class="header-title m-t-0 m-b-30">Permissões de método soltas</h4> <?php foreach ($permissoes_metodo as $permissao) { ?> <div class="checkbox checkbox-primary"> <input id="<?=$permissao['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$permissao['id']?>" <?php if ($permissao['concedida']) { ?>checked<?php } ?>> <label for="<?=$permissao['id']?>-checkbox"> <?=$permissao['id']?> - <?=$permissao['nome']?> </label> </div> <?php } ?> </div> <?php } ?> <?php if (isset($permissoes_custom) && !empty($permissoes_custom)) { ?> <div class="card-box"> <h4 class="header-title m-t-0 m-b-30">Permissões customizadas</h4> <?php foreach ($permissoes_custom as $permissao) { ?> <div class="checkbox checkbox-primary"> <input id="<?=$permissao['id']?>-checkbox" type="checkbox" name="permissoesSelecionadas[]" value="<?=$permissao['id']?>" <?php if ($permissao['concedida']) { ?>checked<?php } ?>> <label for="<?=$permissao['id']?>-checkbox"> <?=$permissao['id']?> - <?=$permissao['nome']?> </label> </div> <?php } ?> </div> <?php } ?> </div> </div> </div> </div> </form> <?php require PATH_ABS.'/Response/admin/_includes/php/footer.php'; ?> </div> <!-- end container --> </div> <?php require PATH_ABS . '/Response/admin/_includes/php/foot.php'; ?> <script src="<?=URL_BASE?>/Response/admin/_includes/js/load-permPredefCargos.js"></script> </body> </html>
<?php namespace Memex\Route\RouteTypes; use Memex\Pages\PageLoader; use Memex\Route\Route; /** * Class RouteMain * * For handling the index page. */ class RouteMain extends Route { function catch(string $path): bool { return $path == "/" || preg_match("#^/index(\.(php|html))?$#", $path); } function execute() { PageLoader::loadPage("landing"); } }
@include('header') <div id="global-leade-banner" style="background:url({{ asset('new-assets/images/inner-bner.jpg') }}) no-repeat; height:351px;"> <div class="container"> <div class="col-md-12 text-center"> <div class="dashboard-content"> <h1>EXPORTED FILES</h1> </div> </div> </div> </div> <section class="dashboard-admin-details"> <div class="container"> <div class="col-md-12"> <div class="dasboard-admin"> <div class="tabbable-panel"> <div class="tabbable-line"> <ul class="nav nav-tabs "> <li> <a href="http://work4brands.com/glead/dashboard">Dashboard</a> </li> <li> <a href="http://work4brands.com/glead/profile">Account Details</a> </li> <li> <a href="http://work4brands.com/glead/savedsearches">Saved Searches</a> </li> <li class="active"> <a href="http://work4brands.com/glead/downloadfile">Exported files</a> </li> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab_default_4"> <div class="tab-cnt-detail"> <h2>Exported Files</h2> <p>In this page, you can re-download your previously exported files.</p> <table class="savd_info" style="width:100%;float:left;"> <tr> <th></th> <th>Downlaod LIst</th> <th>Total Contacts</th> </tr> <?php $i=1; foreach ($download as $value) { $dataid = $value->data_ids; $dataids=explode(",",$dataid); $contactlist = DB::table('businesscontacts')->whereIn('id', $dataids)->get(); ?> <tr style="line-height: 30px;"> <td><?php echo $i; ?></td> <td> <a class="export-file" target="_blank" href="{{ url('/exportfile?id='.$dataid) }}" value="<?php echo $dataid; ?>">Export File</a><br> </td> <td><?php echo $value->totalcontact; ?></td> </tr> <?php $i++; } ?> </table> </div> </div> </div> </div> </div> </div> </div> </div> </section> @include('footer') <!-- <script> $(document).ready(function (){ $('.export-file').on('click', function(){ }); }); </script> -->
<?php /** * PHPExcel * * Copyright (c) 2006 - 2013 PHPExcel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * @category PHPExcel * @package PHPExcel_Worksheet * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @version 1.7.9, 2013-06-02 */ /** * PHPExcel_Worksheet_BaseDrawing * * @category PHPExcel * @package PHPExcel_Worksheet * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable { /** * Image counter * * @var int */ private static $_imageCounter = 0; /** * Image index * * @var int */ private $_imageIndex = 0; /** * Name * * @var string */ protected $_name; /** * Description * * @var string */ protected $_description; /** * Worksheet * * @var PHPExcel_Worksheet */ protected $_worksheet; /** * Coordinates * * @var string */ protected $_coordinates; /** * Offset X * * @var int */ protected $_offsetX; /** * Offset Y * * @var int */ protected $_offsetY; /** * Width * * @var int */ protected $_width; /** * Height * * @var int */ protected $_height; /** * Proportional resize * * @var boolean */ protected $_resizeProportional; /** * Rotation * * @var int */ protected $_rotation; /** * Shadow * * @var PHPExcel_Worksheet_Drawing_Shadow */ protected $_shadow; /** * Create a new PHPExcel_Worksheet_BaseDrawing */ public function __construct() { // Initialise values $this->_name = ''; $this->_description = ''; $this->_worksheet = null; $this->_coordinates = 'A1'; $this->_offsetX = 0; $this->_offsetY = 0; $this->_width = 0; $this->_height = 0; $this->_resizeProportional = true; $this->_rotation = 0; $this->_shadow = new PHPExcel_Worksheet_Drawing_Shadow(); // Set image index self::$_imageCounter++; $this->_imageIndex = self::$_imageCounter; } /** * Get image index * * @return int */ public function getImageIndex() { return $this->_imageIndex; } /** * Get Name * * @return string */ public function getName() { return $this->_name; } /** * Set Name * * @param string $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setName($pValue = '') { $this->_name = $pValue; return $this; } /** * Get Description * * @return string */ public function getDescription() { return $this->_description; } /** * Set Description * * @param string $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setDescription($pValue = '') { $this->_description = $pValue; return $this; } /** * Get Worksheet * * @return PHPExcel_Worksheet */ public function getWorksheet() { return $this->_worksheet; } /** * Set Worksheet * * @param PHPExcel_Worksheet $pValue * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_BaseDrawing */ public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) { if (is_null($this->_worksheet)) { // Add drawing to PHPExcel_Worksheet $this->_worksheet = $pValue; $this->_worksheet->getCell($this->_coordinates); $this->_worksheet->getDrawingCollection()->append($this); } else { if ($pOverrideOld) { // Remove drawing from old PHPExcel_Worksheet $iterator = $this->_worksheet->getDrawingCollection()->getIterator(); while ($iterator->valid()) { if ($iterator->current()->getHashCode() == $this->getHashCode()) { $this->_worksheet->getDrawingCollection()->offsetUnset( $iterator->key() ); $this->_worksheet = null; break; } } // Set new PHPExcel_Worksheet $this->setWorksheet($pValue); } else { throw new PHPExcel_Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet."); } } return $this; } /** * Get Coordinates * * @return string */ public function getCoordinates() { return $this->_coordinates; } /** * Set Coordinates * * @param string $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setCoordinates($pValue = 'A1') { $this->_coordinates = $pValue; return $this; } /** * Get OffsetX * * @return int */ public function getOffsetX() { return $this->_offsetX; } /** * Set OffsetX * * @param int $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setOffsetX($pValue = 0) { $this->_offsetX = $pValue; return $this; } /** * Get OffsetY * * @return int */ public function getOffsetY() { return $this->_offsetY; } /** * Set OffsetY * * @param int $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setOffsetY($pValue = 0) { $this->_offsetY = $pValue; return $this; } /** * Get Width * * @return int */ public function getWidth() { return $this->_width; } /** * Set Width * * @param int $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setWidth($pValue = 0) { // Resize proportional? if ($this->_resizeProportional && $pValue != 0) { $ratio = $this->_height / $this->_width; $this->_height = round($ratio * $pValue); } // Set width $this->_width = $pValue; return $this; } /** * Get Height * * @return int */ public function getHeight() { return $this->_height; } /** * Set Height * * @param int $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setHeight($pValue = 0) { // Resize proportional? if ($this->_resizeProportional && $pValue != 0) { $ratio = $this->_width / $this->_height; $this->_width = round($ratio * $pValue); } // Set height $this->_height = $pValue; return $this; } /** * Set width and height with proportional resize * Example: * <code> * $objDrawing->setResizeProportional(true); * $objDrawing->setWidthAndHeight(160,120); * </code> * * @author Vincent@luo MSN:kele_100@hotmail.com * @param int $width * @param int $height * @return PHPExcel_Worksheet_BaseDrawing */ public function setWidthAndHeight($width = 0, $height = 0) { $xratio = $width / $this->_width; $yratio = $height / $this->_height; if ($this->_resizeProportional && !($width == 0 || $height == 0)) { if (($xratio * $this->_height) < $height) { $this->_height = ceil($xratio * $this->_height); $this->_width = $width; } else { $this->_width = ceil($yratio * $this->_width); $this->_height = $height; } } return $this; } /** * Get ResizeProportional * * @return boolean */ public function getResizeProportional() { return $this->_resizeProportional; } /** * Set ResizeProportional * * @param boolean $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setResizeProportional($pValue = true) { $this->_resizeProportional = $pValue; return $this; } /** * Get Rotation * * @return int */ public function getRotation() { return $this->_rotation; } /** * Set Rotation * * @param int $pValue * @return PHPExcel_Worksheet_BaseDrawing */ public function setRotation($pValue = 0) { $this->_rotation = $pValue; return $this; } /** * Get Shadow * * @return PHPExcel_Worksheet_Drawing_Shadow */ public function getShadow() { return $this->_shadow; } /** * Set Shadow * * @param PHPExcel_Worksheet_Drawing_Shadow $pValue * @throws PHPExcel_Exception * @return PHPExcel_Worksheet_BaseDrawing */ public function setShadow(PHPExcel_Worksheet_Drawing_Shadow $pValue = null) { $this->_shadow = $pValue; return $this; } /** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5( $this->_name . $this->_description . $this->_worksheet->getHashCode() . $this->_coordinates . $this->_offsetX . $this->_offsetY . $this->_width . $this->_height . $this->_rotation . $this->_shadow->getHashCode() . __CLASS__ ); } /** * Implement PHP __clone to create a deep clone, not just a shallow copy. */ public function __clone() { $vars = get_object_vars($this); foreach ($vars as $key => $value) { if (is_object($value)) { $this->$key = clone $value; } else { $this->$key = $value; } } } }
<?php /** * This file is part of the PHPMCached package. * * (c) Hahn und Herden Netzdenke GbR <info@netzdenke.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPMCached; /** * PHPMCached main class */ class PHPMCached { /** * Expirations * @const int */ const EXPIRATION_INFINITY = 0; const EXPIRATION_HOUR = 3600; const EXPIRATION_DAY = 86400; const EXPIRATION_WEEK = 604800; const EXPIRATION_YEAR = 31556926; /** * PHPMCached instance * @var \PHPMCached\PHPMCached */ private static $instance; /** * Memcached instance * @var \Memcached */ protected $memcached; /** * Application key * @var string */ protected $appKey = 'app'; /** * Is cache enabled * @var bool */ protected $enabled; /** * Get instance * @param string $appKey * @return \PHPMCached\PHPMCached */ public static function getInstance($appKey = null) { if (!self::$instance instanceof PHPMCached) { self::$instance = new PHPMCached($appKey); } return self::$instance; } /** * Init adapter * @param string $appKey */ private function __construct($appKey) { $this->memcached = new \Memcached(); $this->enabled = true; if ($appKey !== null) { $this->appKey = $appKey; } } /** * Add memcached server * @param string $host * @param int $port * @return bool */ public function addServer($host, $port = 11211) { return $this->memcached->addServer($host, $port); } /** * Disable caching */ public function disableCache() { $this->enabled = false; } /** * Set an entry * @param string $key * @param mixed $value * @param string|null $cacheGroup * @param int $expiration * @return bool */ public function set($key, $value, $cacheGroup = null, $expiration = self::EXPIRATION_INFINITY) { if ($this->enabled === false) { return true; } if ($expiration !== self::EXPIRATION_INFINITY) { $expiration = time() + (int) $expiration; } $status = $this->memcached->set($key, serialize($value), $expiration); if ($cacheGroup !== null) { $groupKey = $this->getCacheGroupKey($cacheGroup); $groupEntry = $this->get($groupKey); if (!is_array($groupEntry)) { $groupEntry = array(); } $groupEntry[] = $key; $this->memcached->set($groupKey, serialize($groupEntry), 0); } return $status; } /** * Get an entry * @param string $key * @return bool|mixed */ public function get($key) { if ($this->enabled === false) { return false; } $entry = unserialize($this->memcached->get($key)); if ($this->memcached->getResultCode() === \Memcached::RES_NOTFOUND) { return false; } return $entry; } /** * Delete an entry * @param string $key */ public function delete($key) { if ($this->enabled === false) { return; } $this->memcached->delete($key); } /** * Flush all existing items at the server * @return bool */ public function flush() { if ($this->enabled === false) { return true; } return $this->memcached->flush(); } /** * Delete all entries in a cache group * @param string $cacheGroup */ public function deleteCacheGroup($cacheGroup) { if ($this->enabled === false) { return; } $key = $this->getCacheGroupKey($cacheGroup); $cacheKeys = $this->get($key); if (is_array($cacheKeys)) { foreach ($cacheKeys as $cacheKey) { $this->delete($cacheKey); } } } /** * Get cache key * @param string $identifier * @param array $params * @return string */ public function getCacheKey($identifier, $params = array()) { return $this->appKey . '::ck::' . (string) $identifier . '::' . md5(json_encode($params)); } /** * Get cache key for cache group * @param string $cacheGroup * @return string */ protected function getCacheGroupKey($cacheGroup) { return $this->appKey . '::cg::' . (string) $cacheGroup; } }
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Orderitem extends Model { use SoftDeletes; protected $fillable = ['id_order', 'id_pizza', 'quantity', 'size', 'price', 'created_at']; protected $dates = ['deleted_at']; public function order() { return $this->belongsTo('App\Order'); } public function pizza() { return $this->hasMany('App\Pizza', 'id', 'id_pizza')->withTrashed(); } }
<!DOCTYPE html> <html> <head> <title>Chat</title> <!-- Bootstrap CSS --> <link rel="stylesheet" href="<?= base_url(); ?>assets/css/bootstrap.css"> <!-- font-awesome --> <link rel="stylesheet" href="<?= base_url(); ?>assets/font-awesome/css/font-awesome.min.css"> <!-- Optional JavaScript --> <script src="<?= base_url(); ?>assets/js/jquery-3.3.1.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.js"></script> <script src="https://js.pusher.com/4.4/pusher.min.js"></script> <style> /*pesan*/ .fixed-positioning { position: fixed; bottom: 0; right: 0; z-index: 1; } .chat-box { width: 320px; /* border-radius: 3px; */ box-shadow: -5px 10px 50px -10px rgba(0,0,0,0.4); background: #fff; overflow: hidden; } .chat-header { display: flex; justify-content: space-between; align-items: center; padding: 10px; color: #fff; background: #00a1ff; } .chat-header button { color:#fff; background: transparent; padding: 3px; border: 1px solid #fff; border-radius: 3px; cursor:pointer; } .chat-content { padding: 0 15px; max-height: 0; overflow: hidden; transition: 1s ease-in-out; } .chat-content.active { padding: 15px 15px; } .chat-title { margin-bottom: 15px; text-align: center; } .chat-form { padding: 15px; } .chat-box input, .chat-box textarea, .chat-box label, .chat-box button[type=submit] { display: block; width: 100% } .chat-box input, .chat-box textarea { padding: 10px 15px; border-radius: 3px; border: 1px solid #b7b5b5; margin-bottom: 15px; } .chat-box textarea { min-height: 50px; } .chat-box label { color: #928f8f; font-size: 13px; margin-bottom: 2px; } .chat-box label span { color: #f00; } .chat-box button[type=submit] { -webkit-appearance: none; border-radius: 2px; background-clip: padding-box; background-color: #007bff!important; box-shadow: 0 2px 0 rgba(0,0,0,.1), inset 0 -3px 0 rgba(129,163,48,.3); font-size: 14px; color: #fff; padding: 9px 6px 11px; width: 100%; border: 0; cursor: pointer; } </style> </head> <!--Coded With Love By Mutiullah Samim--> <body> <!-- pesan --> <!-- <div class="chat-box fixed-positioning"> <div class="chat-header"> <span class="ml-5"><i class="fa fa-comment" style="padding-right: 10px;"></i>Call Center</span> <button><i class="fa fa-phone"></i></button> </div> <div class="chat-content"> <div class="container"> <div class="row"> <div class="col-md-12 m-auto"> <label class="font-weight-bold" style="font-size: 15px;">Jika Aplikasi ini di buka di website</label> <a href="https://web.whatsapp.com/send?phone=6285235149501"><div class="bg-primary p-1 text-center" style="border-radius: 10px;"><i class="fab fa-whatsapp mr-2" style="color: white; font-size: 30px;"></i><span class="text-white" style="font-size: 25px; font-family: verdana;">Rega</span> </div></a> <br> <label class="font-weight-bold" style="font-size: 15px;">Jika Aplikasi ini di buka di android</label> <a href="https://wa.me/6285235149501"><div class="bg-primary p-1 text-center" style="border-radius: 10px;"><i class="fab fa-whatsapp mr-2" style="color: white; font-size: 30px;"></i><span class="text-white" style="font-size: 25px; font-family: verdana;">Rega</span> </div></a> </div> </div> </div> </div> </div> --> <!-- akhir pesan --> <div class="chat-box fixed-positioning"> <div class="chat-header"> <span class="ml-5"><i class="fa fa-comment" style="padding-right: 10px;"></i>Call Center</span> <button><i class="fa fa-phone"></i></button> </div> <div class="chat-content"> <div class="container"> <div class="row"> <div class="col-md-12 m-auto"> <form action="<?= base_url(); ?>home" method="post"> <div class="form-group"> <label for="email">Email</label> <input type="email" class="form-control" id="email" name="email" placeholder="Masukkan email"> <?= form_error('email', '<small class="text-danger pl-3">', '</small>'); ?> </div> <div class="form-group"> <label for="pesan">Pesan</label> <textarea class="form-control" name="pesan" id="pesan" rows="3" placeholder="Masukkan Pesan"></textarea> <?= form_error('pesan', '<small class="text-danger pl-3">', '</small>'); ?> </div> <?php if ( isset ($this->session->userdata['masuk_in']) ) : ?> <button class="btn btn-block btn-primary" type="submit">Kirim<i class="far fa-paper-plane pl-2"></i></button> <?php else : ?> <a href="<?= base_url(); ?>daftar/login"><button class="btn btn-block btn-primary" type="button">Kirim<i class="far fa-paper-plane pl-2"></i></button></a> <?php endif; ?> </form> </div> </div> </div> </div> </div> <script> let chatBox = document.querySelector(".chat-box"); let toggleButton = document.querySelector(".chat-header button") let chatContent = document.querySelector(".chat-content"); toggleButton.addEventListener('click', () => { if (chatContent.style.maxHeight){ chatContent.style.maxHeight = null; chatContent.classList.remove('active'); toggleButton.innerText = "Show" } else { chatContent.style.maxHeight = (chatContent.scrollHeight + 30) + "px"; chatContent.classList.add('active'); toggleButton.innerText = "Hide" } }) // Outside click window.addEventListener('click', function(e){ if (!chatBox.contains(e.target)){ chatContent.style.maxHeight = null; chatContent.classList.remove('active'); toggleButton.innerText = "Show" } }); (() => { chatContent.style.maxHeight = (chatContent.scrollHeight + 30) + "px"; chatContent.classList.add('active'); toggleButton.innerText = "Hide" })() </script> <script> // Enable pusher logging - don't include this in production Pusher.logToConsole = true; var pusher = new Pusher('c0c540bee9077515786a', { cluster: 'ap1', forceTLS: true }); var channel = pusher.subscribe('my-channel'); channel.bind('my-event', function(data) { alert(JSON.stringify(data)); addData(data); }); function addData(data) { var str = ''; for (var z in data) { str += '<p><span>'+ data[ z ].name +'</span><span>'+ data[ z ].message +'</span></p>'; } $('#pesan').html(str); } </script> <script> function store(){ var value = { name: $('#nama').val(), message: $('#message').val() } $.ajax({ url: '<?= base_url(); ?>/chat1/store', type: 'POST', data: value, dataType: 'JSON' }); } </script> </body> </html>
<?php snippet('header') ?> <header style="background-color:yellow; height: 500px" class="furz"> <h1><?= $page->title()->html() ?></h1> <div class="intro text"> <?= $page->intro()->kirbytext() ?> </div> <hr /> </header> <section class="get-in-touch"> <div class="inner"> <h1 class="title">Kontakt</h1> <form class="contact-form row"> <div class="form-field col x-50"> <input id="name" class="input-text js-input" type="text" required> <label class="label" for="name">Vorname </label> </div> <div class="form-field col x-50"> <input id="email" class="input-text js-input" type="email" required> <label class="label" for="email">E-mail</label> </div> <div class="form-field col x-100"> <input id="message" class="input-text js-input" type="text" required> <label class="label" for="message">Nachricht</label> </div> <div class="form-field col x-100 align-center"> <input class="submit-btn" type="submit" value="Absenden"> </div> </form> </div> </section> <?php snippet('footer') ?>
<x-guest-layout> <x-auth-card> <x-slot name="logo"> <a href="/"> <x-application-logo class="w-20 h-20 fill-current text-gray-500" /> </a> </x-slot> <!-- Session Status --> <x-auth-session-status class="mb-4" :status="session('status')" /> <!-- Validation Errors --> <x-auth-validation-errors class="mb-4" :errors="$errors" /> <form method="POST" action="{{ route('login') }}"> @csrf <!-- Username --> <div> <x-label for="username" :value="__('Username')" /> <x-input id="username" class="block mt-1 w-full" type="text" name="username" :value="old('username')" required autofocus /> </div> <!-- Password --> <div class="mt-4"> <x-label for="password" :value="__('Password')" /> <x-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="current-password" /> </div> <!-- Remember Me --> <div class="block mt-4"> <label for="remember_me" class="inline-flex items-center"> <input id="remember_me" type="checkbox" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" name="remember"> <span class="ml-2 text-sm text-gray-600">{{ __('Remember me') }}</span> </label> </div> {{-- <div class="flex items-center justify-end mt-4"> @if (Route::has('password.request')) <a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ route('password.request') }}"> {{ __('Forgot your password?') }} </a> @endif --}} <x-button class="ml-3"> {{ __('Log in') }} </x-button> </div> </form> </x-auth-card> </x-guest-layout>
<?php session_start(); //echo $_SESSION['username']; ?> <!DOCTYPE html> <html> <head> <title>LifePrice</title> <link rel="stylesheet" href="../static/stylesLog.css" type="text/css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> </head> <body> <header> <div id="pageTitle"> <a href="../index.php" class="removeLinkDecor"><h1>LifePrice</h1></a> </div> <div id="pageMenu"> <a href="../symptoms/index.php" class="pageMenuItem removeLinkDecor"> <div>Symptoms</div></a> <a href="../diagnosis/index.php" class="pageMenuItem removeLinkDecor"><div>Diagnostics</div></a> <a href="../login/login.php" class="pageMenuItem removeLinkDecor"><div>Doctor - Log In</div></a> <form action="includesphp/logOut.php" method="post"> <button class="doc" name="logOut">Logout</button> </form> </div> </header> <main> <div id="symtoms"></div> <script type="text/javascript"> $(document).ready(()=>{ $.ajax({ type:"GET", url:"includesphp/getS.php", dataType:"json", data:{}, success:function(data) { //let a = data[0]; console.log(data); for(let i =0;i<data.length;i++){ $("#symtoms").append(data[i]['symptom'] +"<br/>"); } } }) }) </script> <style type="text/css"> .doc{ color: #FFF !important; text-transform: uppercase; background: #990000; padding: 20px; border-radius: 50px; display: inline-block; border: none; } .doc:hover { text-shadow: 0px 0px 6px rgba(255, 255, 255, 1); -webkit-box-shadow: 0px 5px 40px -10px rgba(219, 10, 91, 1); -moz-box-shadow: 0px 5px 40px -10px rgba(219, 10, 91, 1); transition: all 0.4s ease 0s; } </style> </main> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <footer class="footer"> <div>LifePrice &copy; 2019</div> <div>F. Caudillo | C. Aldrete | G. Cerna | A. Gonzalez</div> </footer> </body> </html>
@extends('rumahsakit.index') @section('title',"home - Rs. Harapan Bersama") @section('section') <section class="hero-area"> <div class="hero-slides owl-carousel"> <!-- Single Hero Slide --> <div class="single-hero-slide bg-img bg-overlay-white" style="background-image: url({{asset('rs/img/bg-img/hero1.jpg')}});"> <div class="container h-100"> <div class="row h-100 align-items-center"> <div class="col-12"> <div class="hero-slides-content"> <h2 data-animation="fadeInUp" data-delay="100ms">RS. Harapan Bersama <br>Care with Love</h2> <h6 data-animation="fadeInUp" data-delay="400ms">jalan Mawar Melati KM.15, Bantul, Yogyakarta, Pos 121513</h6> <a href="#" class="btn medilife-btn mt-50" data-animation="fadeInUp" data-delay="700ms">Info lebih lanjut<span>+</span></a> </div> </div> </div> </div> </div> <!-- Single Hero Slide --> <div class="single-hero-slide bg-img bg-overlay-white" style="background-image: url({{asset('rs/img/bg-img/breadcumb3.jpg')}});"> <div class="container h-100"> <div class="row h-100 align-items-center"> <div class="col-12"> <div class="hero-slides-content"> <h2 data-animation="fadeInUp" data-delay="100ms">Dokter Spesialis <br>berbagai bidang</h2> <h6 data-animation="fadeInUp" data-delay="400ms">spesialis anak, spesialis penyakit dalam, spesialis saraf, spesialis bedah <a href="#">lainnya..</a> </h6> <a href="#" class="btn medilife-btn mt-50" data-animation="fadeInUp" data-delay="700ms">info lebih lanjut<span>+</span></a> </div> </div> </div> </div> </div> <!-- Single Hero Slide --> <div class="single-hero-slide bg-img bg-overlay-white" style="background-image: url({{asset('rs/img/bg-img/breadcumb1.jpg')}});"> <div class="container h-100"> <div class="row h-100 align-items-center"> <div class="col-12"> <div class="hero-slides-content"> <h2 data-animation="fadeInUp" data-delay="100ms">perangkat medis<br>dengan teknologi cangih </h2> <h6 data-animation="fadeInUp" data-delay="400ms">Rs. Harapan Bersama menggunakan alat medis canggih untuk mendukung kualitas dan efektifitas medis<h6> <a href="#" class="btn medilife-btn mt-50" data-animation="fadeInUp" data-delay="700ms">info lebih lanjut<span>+</span></a> </div> </div> </div> </div> </div> </div> </section> <!-- ***** Hero Area End ***** --> <!-- ***** Book An Appoinment Area Start ***** --> <div class="medilife-book-an-appoinment-area"> <div class="container"> <div class="row"> <div class="col-12"> <div class="appointment-form-content"> <div class="row no-gutters align-items-center"> <div class="col-12 col-lg-9"> <div class="medilife-appointment-form"> <h4 class="text-white mb-3">Buat Janji</h4> <form action="#" method="post"> <div class="row align-items-end"> <div class="col-12 col-md-4"> <div class="form-group"> <select class="form-control" id="speciality"> <option>Speciality 1</option> <option>Speciality 2</option> <option>Speciality 3</option> <option>Speciality 4</option> <option>Speciality 5</option> </select> </div> </div> <div class="col-12 col-md-4"> <div class="form-group"> <select class="form-control" id="doctors"> <option>Doctors 1</option> <option>Doctors 2</option> <option>Doctors 3</option> <option>Doctors 4</option> <option>Doctors 5</option> </select> </div> </div> <div class="col-12 col-md-2"> <div class="form-group"> <input type="text" class="form-control" name="date" id="date" placeholder="Date"> </div> </div> <div class="col-12 col-md-2"> <div class="form-group"> <input type="text" class="form-control" name="time" id="time" placeholder="Time"> </div> </div> <div class="col-12 col-md-4"> <div class="form-group"> <input type="text" class="form-control border-top-0 border-right-0 border-left-0" name="name" id="name" placeholder="Name"> </div> </div> <div class="col-12 col-md-4"> <div class="form-group"> <input type="text" class="form-control border-top-0 border-right-0 border-left-0" name="number" id="number" placeholder="Phone"> </div> </div> <div class="col-12 col-md-4"> <div class="form-group"> <input type="email" class="form-control border-top-0 border-right-0 border-left-0" name="email" id="email" placeholder="E-mail"> </div> </div> <div class="col-12 col-md-7"> <div class="form-group mb-0"> <textarea name="message" class="form-control mb-0 border-top-0 border-right-0 border-left-0" id="message" cols="30" rows="10" placeholder="Message"></textarea> </div> </div> <div class="col-12 col-md-5 mb-0"> <div class="form-group mb-0"> <button type="submit" class="btn medilife-btn">Make an Appointment <span>+</span></button> </div> </div> </div> </form> </div> </div> <div class="col-12 col-lg-3"> <div class="medilife-contact-info"> <!-- Single Contact Info --> <div class="single-contact-info mb-30"> <img src="{{asset('rs/img/icons/alarm-clock.png')}}" alt=""> <p>Senin - Minggu <br>24 jam - non stop</p> </div> <!-- Single Contact Info --> <div class="single-contact-info mb-30"> <img src="{{asset('rs/img/icons/envelope.png')}}" alt=""> <p>082154441119 <br>rsHarapanBersama@mail.com</p> </div> <!-- Single Contact Info --> <div class="single-contact-info"> <img src="{{asset('rs/img/icons/map-pin.png')}}" alt=""> <p>Jalan Mawar Melati KM.15 Bantul <br>121513</p> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- ***** Book An Appoinment Area End ***** --> <!-- ***** About Us Area Start ***** --> <section class="medica-about-us-area section-padding-100-20"> <div class="container"> <div class="row"> <div class="col-12 col-lg-4"> <div class="medica-about-content"> <h2>We always put our pacients first</h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing eli.</p> <a href="#" class="btn medilife-btn mt-50">View the services <span>+</span></a> </div> </div> <div class="col-12 col-lg-8"> <div class="row"> <!-- Single Service Area --> <div class="col-12 col-sm-6"> <div class="single-service-area d-flex"> <div class="service-icon"> <i class="icon-doctor"></i> </div> <div class="service-content"> <h5>Doctors</h5> <p>Lorem ipsum dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut.</p> </div> </div> </div> <!-- Single Service Area --> <div class="col-12 col-sm-6"> <div class="single-service-area d-flex"> <div class="service-icon"> <i class="icon-blood-donation-1"></i> </div> <div class="service-content"> <h5>Baby Nursery</h5> <p>Dolor sit amet, consecte tuer elit, sed diam nonummy nibh euismod tincidunt ut ldolore magna.</p> </div> </div> </div> <!-- Single Service Area --> <div class="col-12 col-sm-6"> <div class="single-service-area d-flex"> <div class="service-icon"> <i class="icon-flask-2"></i> </div> <div class="service-content"> <h5>Laboratory</h5> <p>Lorem ipsum dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut.</p> </div> </div> </div> <!-- Single Service Area --> <div class="col-12 col-sm-6"> <div class="single-service-area d-flex"> <div class="service-icon"> <i class="icon-emergency-call-1"></i> </div> <div class="service-content"> <h5>Emergency Room</h5> <p>Dolor sit amet, consecte tuer elit, sed diam nonummy nibh euismod tincidunt ut ldolore magna.</p> </div> </div> </div> </div> </div> </div> </div> </section> <!-- ***** About Us Area End ***** --> <!-- ***** Cool Facts Area Start ***** --> <section class="medilife-cool-facts-area section-padding-100-0"> <div class="container"> <div class="row"> <!-- Single Cool Fact--> <div class="col-12 col-sm-6 col-lg-3"> <div class="single-cool-fact-area text-center mb-100"> <i class="icon-blood-transfusion-2"></i> <h2><span class="counter">5632</span></h2> <h6>Blood donations</h6> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> </div> </div> <!-- Single Cool Fact--> <div class="col-12 col-sm-6 col-lg-3"> <div class="single-cool-fact-area text-center mb-100"> <i class="icon-atoms"></i> <h2><span class="counter">23</span>k</h2> <h6>Pacients</h6> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> </div> </div> <!-- Single Cool Fact--> <div class="col-12 col-sm-6 col-lg-3"> <div class="single-cool-fact-area text-center mb-100"> <i class="icon-microscope"></i> <h2><span class="counter">25</span></h2> <h6>Specialities</h6> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> </div> </div> <!-- Single Cool Fact--> <div class="col-12 col-sm-6 col-lg-3"> <div class="single-cool-fact-area text-center mb-100"> <i class="icon-doctor-1"></i> <h2><span class="counter">723</span></h2> <h6>Doctors</h6> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> </div> </div> </div> </div> </section> <!-- ***** Cool Facts Area End ***** --> <!-- ***** Gallery Area Start ***** --> <div class="medilife-gallery-area owl-carousel"> <!-- Single Gallery Item --> <div class="single-gallery-item"> <img src="{{asset('rs/img/bg-img/g1.jpg')}}" alt=""> <div class="view-more-btn"> <a href="img/bg-img/g1.jpg" class="btn gallery-img">See More +</a> </div> </div> <!-- Single Gallery Item --> <div class="single-gallery-item"> <img src="{{asset('rs/img/bg-img/g2.jpg')}}" alt=""> <div class="view-more-btn"> <a href="img/bg-img/g2.jpg" class="btn gallery-img">See More +</a> </div> </div> <!-- Single Gallery Item --> <div class="single-gallery-item"> <img src="{{asset('rs/img/bg-img/g3.jpg')}}" alt=""> <div class="view-more-btn"> <a href="img/bg-img/g3.jpg" class="btn gallery-img">See More +</a> </div> </div> <!-- Single Gallery Item --> <div class="single-gallery-item"> <img src="{{asset('rs/img/bg-img/g4.jpg')}}" alt=""> <div class="view-more-btn"> <a href="img/bg-img/g4.jpg" class="btn gallery-img">See More +</a> </div> </div> </div> <!-- ***** Gallery Area End ***** --> <!-- ***** Features Area Start ***** --> <div class="medilife-features-area section-padding-100"> <div class="container"> <div class="row align-items-center"> <div class="col-12 col-lg-6"> <div class="features-content"> <h2>A new way to treat pacients in a revolutionary facility</h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing eli.Lorem ipsum dolor sit amet, consec tetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer.</p> <a href="#" class="btn medilife-btn mt-50">View the services <span>+</span></a> </div> </div> <div class="col-12 col-lg-6"> <div class="features-thumbnail"> <img src="{{asset('rs/img/bg-img/medical1.png')}}" alt=""> </div> </div> </div> </div> </div> <!-- ***** Features Area End ***** --> <!-- ***** Blog Area Start ***** --> <div class="medilife-blog-area section-padding-100-0"> <div class="container"> <div class="row"> <!-- Single Blog Area --> <div class="col-12 col-md-6 col-lg-4"> <div class="single-blog-area mb-100"> <!-- Post Thumbnail --> <div class="blog-post-thumbnail"> <img src="{{asset('rs/img/blog-img/1.jpg')}}" alt=""> <!-- Post Date --> <div class="post-date"> <a href="#">Jan 23, 2018</a> </div> </div> <!-- Post Content --> <div class="post-content"> <div class="post-author"> <a href="#"><img src="{{asset('rs/img/blog-img/p1.jpg')}}" alt=""></a> </div> <a href="#" class="headline">New drog release soon</a> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> <a href="#" class="comments">3 Comments</a> </div> </div> </div> <!-- Single Blog Area --> <div class="col-12 col-md-6 col-lg-4"> <div class="single-blog-area mb-100"> <!-- Post Thumbnail --> <div class="blog-post-thumbnail"> <img src="{{asset('rs/img/blog-img/2.jpg')}}" alt=""> <!-- Post Date --> <div class="post-date"> <a href="#">Jan 23, 2018</a> </div> </div> <!-- Post Content --> <div class="post-content"> <div class="post-author"> <a href="#"><img src="{{asset('rs/img/blog-img/p2.jpg')}}" alt=""></a> </div> <a href="#" class="headline">Free dental care</a> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> <a href="#" class="comments">3 Comments</a> </div> </div> </div> <!-- Single Blog Area --> <div class="col-12 col-md-6 col-lg-4"> <div class="single-blog-area mb-100"> <!-- Post Thumbnail --> <div class="blog-post-thumbnail"> <img src="{{asset('rs/img/blog-img/3.jpg')}}" alt=""> <!-- Post Date --> <div class="post-date"> <a href="#">Jan 23, 2018</a> </div> </div> <!-- Post Content --> <div class="post-content"> <div class="post-author"> <a href="#"><img src="{{asset('rs/img/blog-img/p3.jpg')}}" alt=""></a> </div> <a href="#" class="headline">Good news for the pacients</a> <p>Dolor sit amet, consecte tuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p> <a href="#" class="comments">3 Comments</a> </div> </div> </div> </div> </div> </div> <!-- ***** Blog Area End ***** --> <!-- ***** Emergency Area Start ***** --> <div class="medilife-emergency-area section-padding-100-50"> <div class="container"> <div class="row"> <div class="col-12 col-lg-6"> <div class="emergency-content"> <i class="icon-smartphone"></i> <h2>For Emergency calls</h2> <h3>+12-823-611-8721</h3> </div> </div> <div class="col-12 col-lg-6"> <div class="row"> <!-- Single Emergency Helpline --> <div class="col-12 col-sm-6"> <div class="single-emergency-helpline mb-50"> <h5>London</h5> <p>082154441119 <br> rsHarapanBersama@mail.com <br> Lamas Str, no 14-18 <br> 41770 Miami</p> </div> </div> <!-- Single Emergency Helpline --> <div class="col-12 col-sm-6"> <div class="single-emergency-helpline mb-50"> <h5>New Castle</h5> <p>082154441119 <br> rsHarapanBersama@mail.com <br> Lamas Str, no 14-18 <br> 41770 Miami</p> </div> </div> <!-- Single Emergency Helpline --> <div class="col-12 col-sm-6"> <div class="single-emergency-helpline mb-50"> <h5>Manchester</h5> <p>082154441119 <br> rsHarapanBersama@mail.com <br> Lamas Str, no 14-18 <br> 41770 Miami</p> </div> </div> <!-- Single Emergency Helpline --> <div class="col-12 col-sm-6"> <div class="single-emergency-helpline mb-50"> <h5>Bristol</h5> <p>082154441119 <br> rsHarapanBersama@mail.com <br> Lamas Str, no 14-18 <br> 41770 Miami</p> </div> </div> </div> </div> </div> </div> </div> <!-- ***** Emergency Area End ***** --> <!-- ***** Footer Area Start ***** --> @endsection
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; class StudentQuerySeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // } }
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Product extends Model { protected $table = 'product_data'; public $timestamps = false; }
<!-- START CONTAINER FLUID --> <div class=" container-fluid container-fixed-lg"> <div class="row"> <div class="col-xl-12 col-lg-12"> <!-- START card --> <div class="card card-transparent"> <div class="card-block"> <form method="POST" action="<?=base_url('admin/arisan/update')?>" role="form" autocomplete="off"> <input type="hidden" name="<?=$csrf['name'];?>" value="<?=$csrf['hash'];?>" /> <input type="hidden" name="id" value="<?=$arisan->id?>" /> <div class="row"> <div class="col-md-12"> <div class="form-group form-group-default input-group"> <div class="form-input-group"> <label>Arisan</label> <input type="text" class="form-control" name="arisan" placeholder="Nama Arisan" value="<?=$arisan->arisan?>" required> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group form-group-default form-group-default-select2"> <label>Periode Arisan</label> <select name="periode" class="full-width" data-placeholder="Pilih Periode Arisan" data-init-plugin="select2"> <option value="">Pilih Periode Arisan</option> <option value="Bulanan">Bulanan</option> <option value="Mingguan">Mingguan</option> </select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group form-group-default input-group"> <div class="form-input-group"> <label>Jumlah Peserta </label> <input type="text" class="form-control" name="jumlah_peserta" placeholder="Jumlah Peserta Arisan" value="<?=$arisan->jumlah_peserta?>" required> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group form-group-default input-group"> <div class="form-input-group"> <label>Iuran </label> <input type="text" class="form-control" name="iuran" placeholder="Jumlah Iuran Per Periode" value="<?=$arisan->iuran?>" required> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group"> <h5>Deskripsi Arisan</h5> <div class="no-scroll card-toolbar"> <div class="summernote-wrapper"> <div id="summernote"><?=$arisan->deskripsi?></div> </div> </div> </div> <textarea class="hide" name="deskripsi" id="deskripsi" cols="30" rows="10"><?=$arisan->deskripsi?></textarea> </div> </div> <div class="clearfix"></div> <button class="btn btn-primary" type="submit">Simpan Data Arisan</button> <button type="button" class="btn btn-default" onclick="window.history.go(-1); return false;">Batal</button> </form> </div> </div> <!-- END card --> </div> </div> </div> <!-- END CONTAINER FLUID -->
<?php namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request * @return string */ protected function redirectTo($request) { if (! $request->expectsJson()) { return route('practitioner.login'); } } }