max_stars_repo_path
stringlengths 5
223
| max_stars_repo_name
stringlengths 6
109
| max_stars_count
int64 0
36.6k
| id
stringlengths 3
8
| content
stringlengths 12
984k
| score
float64 0.34
1
| label
stringclasses 3
values |
---|---|---|---|---|---|---|
resources/views/general/contact.blade.php | Monderjay/gcprototipoadmin | 0 | 12999896 | <reponame>Monderjay/gcprototipoadmin
@extends('layouts.app')
@section('title',config('app.name').' | Contacto')
@section('page-title', 'Contacto')
@section('page-description', 'Contacta con el equipo de GameCore')
@section('keywords','gamecore contacto, gamecore telefono, gamecore correo')
@section('page-author','GameCore')
@section('content')
<div class="row text-justify mr-auto ml-auto justify-content-center" style="padding-top: 130px; margin-bottom: 40px; font-size: 16px;">
<div class="col-11 col-xl-3">
<h4><b>
Si quieres anunciarte en GameCore, puedes ponerte en contacto con nosotros por alguno de estos medios:
</b>
</h4>
<br>
<h5><b>Contacto</b></h5>
<p>
<NAME> de México
<br><EMAIL>
</p>
<br>
<p>
Todo nuestro contenido es proveniente de páginas oficiales y redactado con un enfoque acorde a nuestro público con el propósito de brindar noticias y contenido acerca del mundo de los videojuegos.
Las imágenes e iconos utilizados para representar consolas, videojuegos, redes sociales o hacer cualquier otra referencia son usados de manera responsable sin afectar a las compañías y tomados directamente desde fontawesome. Cualquier inconformidad relacionada con el uso de algún icono, imagen o referencia es recomendable ponerse en contacto con Game-Core explicando dicha inconformidad e inmediatamente será retirada si se determina que esta incumpliendo con las normas de copyright.
</p>
<br>
<b>Todos los derechos reservados © Game-Core 2020</b>
</div>
</div>
@endsection
| 0.875 | high |
app/Http/Middleware/Locale.php | MohamedGamil/deployer | 999 | 5070456 | <?php
namespace REBELinBLUE\Deployer\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Factory as AuthFactory;
use MicheleAngioni\MultiLanguage\LanguageManager;
/**
* Sets the applications locale based on the user's language.
*/
class Locale
{
/**
* @var LanguageManager
*/
private $languageManager;
/**
* @var AuthFactory
*/
private $auth;
/**
* Locale constructor.
*
* @param LanguageManager $languageManager
* @param AuthFactory $auth
*/
public function __construct(LanguageManager $languageManager, AuthFactory $auth)
{
$this->languageManager = $languageManager;
$this->auth = $auth;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
*
* @return \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\Response
*/
public function handle($request, Closure $next, $guard = null)
{
$user = $this->auth->guard($guard)->user();
if ($user && $user->language) {
$this->languageManager->setLocale($user->language);
}
return $next($request);
}
}
| 0.992188 | high |
application/view/admin/account.php | rodortega/pupsis | 0 | 5070712 | <reponame>rodortega/pupsis
<div class="col-lg-6 col-lg-offset-3">
<div class="panel panel-flat">
<div class="panel-heading">
<h5 class="panel-title">Change Password</h5>
</div>
<div class="panel-body">
<form action="<?php echo URL?>password/change/admin" method="POST" class="form-horizontal" id="password_form">
<div class="form-group">
<label class="control-label col-lg-4">Old Password</label>
<div class="col-lg-8">
<input type="password" class="form-control" name="old_password" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-4">New Password</label>
<div class="col-lg-8">
<input type="password" class="form-control" name="<PASSWORD>" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-4">Retype New Password</label>
<div class="col-lg-8">
<input type="password" class="form-control" name="<PASSWORD>" required>
</div>
</div>
<div class="clearfix"></div>
<div class="text-right">
<button type="submit" class="btn btn-primary"><i class="icon-floppy-disk position-left"></i> Confirm</button>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo APPJS?>admin/account.js?v=<?php echo VERSION?>"></script> | 0.898438 | high |
app/library/App/Model/old/QuestionGroupsOld.php | mskorok/olback | 0 | 5070968 | <?php
namespace App\Model;
use App\Mvc\DateTrackingModel;
class QuestionGroupsOld extends DateTrackingModel
{
public $id;
public $name;
public function getSource()
{
return 'question_group';
}
public function columnMap()
{
return parent::columnMap() + [
'id' => 'id',
'name' => 'name'
];
}
}
| 0.976563 | high |
tests/MailMimeParser/Message/Helper/PrivacyHelperTest.php | peppelauro/mail-mime-parser | 124 | 5071224 | <reponame>peppelauro/mail-mime-parser
<?php
namespace ZBateson\MailMimeParser\Message\Helper;
use GuzzleHttp\Psr7;
use LegacyPHPUnit\TestCase;
/**
* PrivacyHelperTest
*
* @group PrivacyHelper
* @group MessageHelper
* @covers ZBateson\MailMimeParser\Message\Helper\AbstractHelper
* @covers ZBateson\MailMimeParser\Message\Helper\PrivacyHelper
* @author <NAME>
*/
class PrivacyHelperTest extends TestCase
{
private $mockMimePartFactory;
private $mockUUEncodedPartFactory;
private $mockGenericHelper;
private $mockMultipartHelper;
protected function legacySetUp()
{
$this->mockMimePartFactory = $this->getMockBuilder('ZBateson\MailMimeParser\Message\Factory\IMimePartFactory')
->disableOriginalConstructor()
->getMock();
$this->mockUUEncodedPartFactory = $this->getMockBuilder('ZBateson\MailMimeParser\Message\Factory\IUUEncodedPartFactory')
->disableOriginalConstructor()
->getMock();
$this->mockGenericHelper = $this->getMockBuilder('ZBateson\MailMimeParser\Message\Helper\GenericHelper')
->disableOriginalConstructor()
->getMock();
$this->mockMultipartHelper = $this->getMockBuilder('ZBateson\MailMimeParser\Message\Helper\MultipartHelper')
->disableOriginalConstructor()
->getMock();
}
private function newMockIMimePart()
{
return $this->getMockForAbstractClass('ZBateson\MailMimeParser\Message\IMimePart');
}
private function newMockIMessage()
{
return $this->getMockForAbstractClass('ZBateson\MailMimeParser\IMessage');
}
private function newPrivacyHelper()
{
return new PrivacyHelper(
$this->mockMimePartFactory,
$this->mockUUEncodedPartFactory,
$this->mockGenericHelper,
$this->mockMultipartHelper
);
}
public function testOverwrite8bitContentEncoding()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$partText = $this->newMockIMimePart();
$partNonText = $this->newMockIMimePart();
$message->expects($this->once())
->method('getAllParts')
->willReturn([ $partText, $partNonText ]);
$partText->expects($this->once())
->method('getContentType')
->willReturn('text/plain');
$partNonText->expects($this->once())
->method('getContentType')
->willReturn('something else entirely');
$partText->expects($this->once())
->method('setRawHeader')
->with('Content-Transfer-Encoding', 'quoted-printable');
$partNonText->expects($this->once())
->method('setRawHeader')
->with('Content-Transfer-Encoding', 'base64');
$helper->overwrite8bitContentEncoding($message);
}
public function testEnsureHtmlPartFirstForSignedMessage()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$alt = $this->newMockIMimePart();
$cont = $this->newMockIMimePart();
$children = [ $this->newMockIMimePart(), $cont ];
$message->expects($this->once())
->method('getPartByMimeType')
->with('multipart/alternative')
->willReturn($alt);
$this->mockMultipartHelper->expects($this->once())
->method('getContentPartContainerFromAlternative')
->willReturn($cont);
$alt->expects($this->once())
->method('getChildCount')
->willReturn(2);
$alt->expects($this->once())
->method('getChildParts')
->willReturn($children);
$alt->expects($this->once())
->method('removePart')
->with($children[0]);
$alt->expects($this->once())
->method('addChild')
->with($children[0]);
$helper->ensureHtmlPartFirstForSignedMessage($message);
}
public function testSetSignature()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$signedPart = $this->newMockIMimePart();
$message->expects($this->once())
->method('getSignaturePart')
->willReturn(null);
$this->mockMimePartFactory
->expects($this->once())
->method('newInstance')
->willReturn($signedPart);
$message->expects($this->once())
->method('addChild')
->with($signedPart);
$message->expects($this->once())
->method('getHeaderParameter')
->with('Content-Type', 'protocol')
->willReturn('the-meatiest');
$signedPart->expects($this->once())
->method('setRawHeader')
->with('Content-Type', 'the-meatiest');
$signedPart->expects($this->once())
->method('setContent')
->with('much-signature');
$helper->setSignature($message, 'much-signature');
}
public function testSetMessageAsMultipartSigned()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$messagePart = $this->newMockIMimePart();
$message->expects($this->once())
->method('getContentType')
->willReturn('text/plain');
$this->mockMultipartHelper->expects($this->once())
->method('enforceMime')
->willReturn($message);
$this->mockMimePartFactory
->expects($this->once())
->method('newInstance')
->willReturn($messagePart);
$this->mockGenericHelper->expects($this->once())
->method('movePartContentAndChildren')
->with($message, $messagePart);
$message->expects($this->once())
->method('addChild')
->willReturn($messagePart);
$this->mockMultipartHelper->expects($this->once())
->method('getUniqueBoundary')
->with('multipart/signed')
->willReturn('a-unique-boundary');
$message->expects($this->once())
->method('setRawHeader')
->with(
'Content-Type',
"multipart/signed;\r\n\tboundary=\"a-unique-boundary\";\r\n\tmicalg=\"my-micalg\"; protocol=\"l33t-protocol\""
);
// called from overwrite8bitContentEncoding
$message->expects($this->once())
->method('getAllParts')
->willReturn([]);
// called from ensureHtmlPartFirstForSignedMessage
$message->expects($this->once())
->method('getPartByMimeType')
->with('multipart/alternative')
->willReturn(null);
// called from setSignature
$message->expects($this->once())
->method('getSignaturePart')
->willReturn($this->newMockIMimePart());
$helper->setMessageAsMultipartSigned($message, 'my-micalg', 'l33t-protocol');
}
public function testSignedMessageStream()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$part = $this->newMockIMimePart();
$message->expects($this->exactly(2))
->method('getChild')
->with(0)
->willReturnOnConsecutiveCalls(null, $part);
$part->expects($this->once())
->method('getStream')
->willReturn('test');
$this->assertNull($helper->getSignedMessageStream($message));
$this->assertEquals('test', $helper->getSignedMessageStream($message));
}
public function testSignedMessageAsString()
{
$helper = $this->newPrivacyHelper();
$message = $this->newMockIMessage();
$part = $this->newMockIMimePart();
$message->expects($this->exactly(2))
->method('getChild')
->with(0)
->willReturnOnConsecutiveCalls(null, $part);
$part->expects($this->once())
->method('getStream')
->willReturn(Psr7\Utils::streamFor("test\rwith\nnew\r\nlines"));
$this->assertNull($helper->getSignedMessageAsString($message));
$this->assertEquals("test\r\nwith\r\nnew\r\nlines", $helper->getSignedMessageAsString($message));
}
}
| 0.996094 | high |
Locale/en_US/translations.php | manne65-hd/kanboard_plugin_overwrite_translation | 6 | 5071480 | <?php
return array(
'text_to_overwrite' => 'New Text',
); | 0.953125 | high |
protected/components/AdminRBAC.php | diandianxiyu/Yii1.x-admin | 0 | 5071736 | <?php
/**
* AdminRBAC.php
* ---------------------------------
*
*
* 作者: 李小雨<<EMAIL>>
* 开始日期:2014-03-05
* 修改日期:2014-03-05
* 功能:通过登录后获取用户的菜单和权限
* 更新:菜单的生产
*/
class AdminRBAC {
/**
* 根据权限生成对应的菜单
* @param type $c
* @param type $f
* @return type
*/
public function getMenu() {
$menu = new Menu();
$a = $menu->findAll("1=1 order By pid DESC ,sort DESC");
foreach ($a as $key => $value) {
$b[] = $value->attributes;
}
$thisUrl = $this->getThisUrl();
//return $thisUrl;
$urlarr = $this->takeAllFaMenu();
$tree = $this->getTree($b, 1);
$html = $this->procHtml($tree, $thisUrl, $urlarr);
return $html;
}
function getTree($data, $pId) {
$tree = array();
foreach ($data as $k => $v) {
if ($v['pid'] == $pId) { //父亲找到儿子
$v['p'] = $this->getTree($data, $v['id']);
$tree[] = $v;
//unset($data[$k]);
}
}
return $tree;
}
/**
* 生成菜单
* @param type $tree
* @param type $pId
* @return type
*
* @example 样式
* <li class="start "><a href="index.html"><i class="fa fa-home"></i> <span class="title">Dashboard</span></a></li>
*/
function procHtml($tree, $thisUrl, $urlarr) {
$html = '';
foreach ($tree as $t) {
//第一级
if ($t['p'] == null) {
//var_dump($this->chkAccess($t['auth_item']));
if ($this->chkAccess($t['auth_item'])) {
$html .= "<li class=\" {$this->eActive($t['url'], $urlarr)}\"><a href=\"{$this->makeUrl($t['url'])}\" " . $t['other'] . "><i class=\"{$t['icon']}\"></i> <span class=\"title\">{$t['name']}</span><span class='{$this->eSelected($t['url'], $urlarr)} '></span></a></li>";
}
} else {
// var_dump($t['auth_item']);
// var_dump($this->chkAccess($t['auth_item']));
//以下
if ($this->chkAccess($t['auth_item'])) {
$ultpm = "<li class='{$this->eActive($t['url'], $urlarr)}'><a href=\"javascript:;\"><i class='{$t['icon']}'></i> ";
$sub = $this->getsubmenu($t['p'], $thisUrl, $urlarr);
$ultpm2 = "<span class='{$this->eSelected($t['url'], $urlarr)} '></span><span class='{$this->eOpenArrow($t['url'], $urlarr)} '></span> </a>" . $sub . "</li>";
$html .= $ultpm . "<span class='title'>{$t['name']}</span>" . $ultpm2;
}
}
}
return $html;
}
/**
* 生产html标签
* @param type $tree
* @return type
*
* @example
*/
function getsubmenu($tree, $thisurl, $arrUrl) {
$html = '';
foreach ($tree as $t) {
if (count($t['p']) == 0) {
if ($this->chkAccess($t['auth_item'])) {
$html .= "<li class=\"{$this->eActive($t['url'], $arrUrl)}\"><a href=\"{$this->makeUrl($t['url'])}\" ><i class=\"{$t['icon']}\"></i>" . $t['name'] . "</a></li>";
}
} else {
if ($this->chkAccess($t['auth_item'])) {
$html .= "<li><a href=\"javascript:;\"><i class=\"{$t['icon']}\"></i> " . $t['name'] . "<span class=\"{$this->eActive($thisurl, $arrUrl)}\"></span></a>";
$html .=$this->getsubmenu($t['p'], $t['url'], $arrUrl);
$html = $html . "</li>";
}
}
}
return $html ? "<ul class='sub-menu'>" . $html . '</ul>' : $html;
}
/**
* 创建url
* @param type $param
*/
private function makeUrl($param) {
if ($param != "srbac") {
return Yii::app()->urlManager->createUrl($param);
} else {
return 'javascript:void(0);';
}
}
/*
* 将现在的控制器下的菜单变成激活状态
*/
private function eActive($thisurl, $arrurl) {
if (in_array($thisurl, $arrurl)) {
return " open active arrow ";
}
}
/**
* 将菜单展开
* @param type $thisurl
* @param type $arrurl
*/
private function eOpenArrow($thisurl, $arrurl) {
if (in_array($thisurl, $arrurl)) {
return " open active arrow ";
} else {
return "arrow";
}
}
private function eSelected($thisurl, $arrurl){
if (in_array($thisurl, $arrurl)) {
return " selected ";
} else {
return "";
}
}
/**
* 通过最后一级找出所有的父菜单
*/
function takeAllFaMenu() {
$thisUrl = $this->getThisUrl();
$menuModel = new Menu();
$pmenu = $menuModel->find('url = :url', array(':url' => $thisUrl))->attributes;
$re = array();
$re[] = $pmenu['url'];
if ($pmenu) {
$result = $this->takeFaMenu($pmenu);
$re[] = $result['url'];
if ($result['pid'] != 1) {
$result2 = $this->takeFaMenu($result);
$re[] = $result2['url'];
if ($result2['pid'] != 1) {
$result3 = $this->takeFaMenu($result2);
$re[] = $result3['url'];
if ($result3['pid'] != 1) {
$result4 = $this->takeFaMenu($result3);
$re[] = $result4['url'];
}
}
}
}
return $re;
}
private function takeFaMenu($pmenu) {
//$result=array();
$menuModel = new Menu();
$pnqmenu = $menuModel->find('id = :id', array(':id' => $pmenu['pid']))->attributes;
if ($pnqmenu) {
return $pnqmenu;
}
}
/**
* 判断该角色是否拥有此权限
*
*/
function chkAccess($a) {
$user = Yii::app()->user;
if ($user->checkAccess($a)) {
return true;
} else {
return false;
}
}
/**
* 返回对应的url
*/
private function getThisUrl() {
$pathInfo = Yii::app()->request->pathInfo;
$url = explode(".", $pathInfo);
$pathArr= explode('/', $url[0]);
$pathTrue= implode('/', array($pathArr[0],$pathArr[1],$pathArr[2]?$pathArr[2]:'index'));
return $pathTrue;
}
}
| 0.996094 | high |
resources/views/client/products/shopby.blade.php | DinhDuyTu/manchup | 0 | 5071992 | <aside class="sidebar col-sm-3 col-xs-12 col-sm-pull-9">
<div class="block shop-by-side">
<div class="sidebar-bar-title">
<h3>Tùy Chọn Mua Sắm</h3>
</div>
<div class="block-content">
<div class="manufacturer-area">
<h2 class="saider-bar-title">Danh Mục</h2>
<div class="saide-bar-menu">
<ul>
@foreach ($categories as $category)
@if ($category->parent_id == 0)
<li><a href="{{ route('client.products.productByParentCate', $category->id) }}"><i class="fa fa-angle-right"></i> {{ $category->name }}</a></li>
@else
<li><a href="{{ route('client.product.show', $category->id) }}"><i class="fa fa-angle-right"></i> {{ $category->name }}</a></li>
@endif
@endforeach
</ul>
</div>
</div>
<div class="manufacturer-area">
<h2 class="saider-bar-title">Size</h2>
<div class="saide-bar-menu">
<ul>
@foreach ($sizes as $size)
<li><a href="{{ route('client.products.productBySize', $size->id) }}"><i class="fa fa-angle-right"></i> Sản Phẩm {{ $size->size }}</a></li>
@endforeach
</ul>
</div>
</div>
</div>
</div>
</aside> | 0.964844 | high |
resources/views/partials/city-check.blade.php | junaidiar19/findworker | 0 | 5072248 | <script>
function cityCheck(val) {
$.ajax({
type: 'get',
url : '{{ route('city-check') }}',
data : {
"id" : val,
}, beforeSend:function() {
var html = '';
html += '<option value="">Sedang memuat kota...</option>';
$("#city-option").html(html);
}, success: function(res) {
var data = JSON.parse(res);
var html = '';
var i;
for (i in data) {
html += '<option value="'+data[i].id+'">'+data[i].name+'</option>';
}
$("#city-option").html(html);
}, error: function(err) {
console.log(err);
}
})
}
</script> | 0.376953 | medium |
resources/lang/cn/search.php | web20082001/pigeon | 0 | 5072504 | <?php
return [
'task' => [
'name' => '任务名称',
'keyword' => '关键词',
'url' => '链接'
],
'area' => [
'name' => '市',
'code' => '编号'
],
'role' => [
'name' => '名称',
'memo' => '描述'
],
'user' => [
'name' => '用户名',
'realname' => '真实姓名',
'email' => '邮箱'
],
'host' => [
'code' => '主机编号',
'remote_addr' => '远程主机地址',
'contact' => '购买联系人',
],
'host_proxy' => [
'addr' => 'IP地址'
],
'software' => [
'name' => '名称',
'code' => '代号',
'varsion' => '版本',
'url' => '下载地址'
],
]; | 0.988281 | high |
database/factories/PostFactory.php | BorisKovFG/lara_creative_base | 0 | 5072760 | <?php
namespace Database\Factories;
use App\Models\Category;
use App\Models\Post;
use Illuminate\Database\Eloquent\Factories\Factory;
class PostFactory extends Factory
{
/**
* @var string
*/
protected $model = Post::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'title' => $this->faker->sentence(7),
'content' => $this->faker->text(300),
'image' => $this->faker->image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = false,),
'likes' => rand(0,1000),
'is_published' => rand(0,1),
'category_id' => Category::get()->random()->id
];
}
}
| 0.980469 | high |
resources/views/students/profile.blade.php | LunaOlbrechts/job-finder | 0 | 5073016 | <filename>resources/views/students/profile.blade.php
@extends('layouts.app')
@section('content')
<div class="container-page">
<br><br>
<div class="page--title-companies">
<img src="{{ asset('images/avatar.jpg') }}" class="img--profile">
<h1 class="list--name">{{ $student->name }}</h1>
</div>
<div class="container container-profile">
<h3>Gegevens</h3>
<ul class="list-group list-group-flush">
<li class="list-group-item">Email: {{ $student->email}}</li>
<li class="list-group-item">Leeftijd: {{ $student->age}}</li>
<li class="list-group-item">Preference: {{ $student->preference}}</li>
<li class="list-group-item">Tools: {{ $student->tools}}</li>
<li class="list-group-item">Bio: {{ $student->bio}}</li>
<li class="list-group-item">Portfolio: <a href="{{ $student->portfolio}}" target="_blank">{{ $student->portfolio}}</a></li>
<li class="list-group-item">Linkedin: <a href=" {{ $student->linkedin}}" target="_blank"> {{ $student->linkedin}}</a></li>
</ul>
@if(Auth::guard('web')->user() && Auth::guard('web')->user()->id == $student->id)
<button type="button" class="btn btn-primary btn--primary-gold update"><a class="card-link"href="/students/{{ $student->id}}/update">Update profile</a></button>
@endif
@if(Auth::guard('web')->user() && Auth::guard('web')->user()->id == $student->id)
<h3>Stage solicitaties</h3>
@foreach($applications as $application)
<div class="cards">
<div class="card--preview card--preview-padd">
<div class="card--imgContainer">
</div>
<h4>{{ $application->internship->title}}</h4>
<p class="card--text">Solicitatie fase: {{ $application->applicationFase->title}}</p>
<p class="card--text">Status:
@if($application->label != "new")
{{ $application->label }}
@else
Moet nog beoordeeld worden
@endif
</p>
<a href="/internships/{{ $application->internship->id }}/detail" class="btn--primary-purple btn--primary-sm">Bekijk stage</a>
</div>
</div>
@endforeach
@if(empty($applications))
<p>Je hebt nog geen solicitaties</p>
@endif
@endif
<div id="app" class="container-profile">
<h3>Dribbble portfolio</h3>
<dribbble-shot-component></dribbble-shot-component>
</div>
</div>
</div>
@endsection
| 0.957031 | high |
app/Models/Com.php | bruk-lemma/backpack_project | 0 | 5073272 | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Backpack\CRUD\app\Models\Traits\CrudTrait;
class Com extends Model
{
use CrudTrait;
protected $fillable = [
'address-input',
'address',
//'address_latitude',
//'address_longitude',
// 'address'
];
protected $casts = [
//'address-input' => 'string',
'address' => 'string'
];
/*public function person()
{
return $this->belongsTo(Person::class);
}
public function product()
{
return $this->belongsTo(Product::class);
}
public function user()
{
return $this->belongsTo(User::class,'user_id');
}
public function communication_type()
{
return $this->belongsTo(communication_type::class, 'communication_types_id');
}
public function communication_way()
{
return $this->belongsTo(communication_way::class, 'communication_ways_id');
}
public function getcasenumber()
{
return $this->concatenateNom();
}
public function concatenateNom()
{
return $this->typ . ' ' .'/' .' ' .$this->created_at->format('d M y') . ' ' .'/' .' ' . $this->id;
}*/
}
| 0.96875 | high |
app/lang/en/formats.php | Saworieza/Evil-Corp | 0 | 5073528 | <?php
return array(
"DATETIME_FORMATS" => [
"AMPMS" => [
"AM",
"PM"
],
"DAY"=> [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"MONTH"=> [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"SHORTDAY"=> [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
],
"SHORTMONTH"=> [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"fullDate"=> "EEEE, MMMM d, y",
"longDate"=> "MMMM d, y",
"medium"=> "MMM d, y h=>mm=>ss a",
"mediumDate"=> "MMM d, y",
"mediumTime"=> "h=>mm=>ss a",
"short"=> "M/d/yy h=>mm a",
"shortDate"=> "M/d/yy",
"shortTime"=> "h=>mm a"
],
); | 0.996094 | high |
resources/views/fuente/lista.blade.php | fius78/casosprioritarios | 0 | 5073784 | <reponame>fius78/casosprioritarios
@extends('layouts.app')
@section('content')
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<h1><small>Información del Caso Prioritario</small></h1>
<dl>
<dt><h3><small> Folio - Número de Expediente</small></h3></dt>
<dd><h4><small> {{ $caso->folio }} - {{ $caso->numeroExpediente }}</small></h4></dd>
<dt><h3><small> Ponente</small></h3></dt>
<dd><h4><small> {{ $caso->ponente->name }}</small></h4></dd>
</dl>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<h2><small>Listado de Fuentes de Información</small></h2>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<a href="{{ route('nuevafuente', ['id'=>$caso->id]) }}" class="btn btn-success">
<i class="fa fa-plus"></i> Agregar Fuente de Información
</a>
<a href="{{ route('listacasos') }}" class="btn btn-default">Regresar al Listado de Casos Prioritarios</a>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Settings 1</a></li>
<li><a href="#">Settings 2</a></li>
</ul>
</li>
<li><a class="close-link"><i class="fa fa-close"></i></a></li>
</ul>
</div>
</div>
@if(Session::has('flash_message'))
<div class="row">
<div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
<div class="alert alert-info">
<ul>
{{Session::get('flash_message')}}
</ul>
</div>
</div>
</div>
@endif
<div class="clearfix"></div>
</div>
<div class="x_content">
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Descripción</th>
<th>Tipo Fuente</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
@php $c=1; @endphp
@foreach($caso->fuentes as $fuente)
<tr>
<td>{{ $c }}</td>
<td>{{ $fuente->descripcion }}</td>
@if ($fuente->tipoDocumento === 1)
<td>Archivo</td>
@else
<td>URL</td>
@endif
<td>
<a href="{{ route('editarfuente', ['id'=>$fuente->id]) }}" class="btn btn-warning btn-sm">
<i class="fa fa-pencil-square-o" aria-hidden="true" data-toggle="tooltip" title="Editar Fuente de Información"></i>
</a>
@if ($fuente->tipoDocumento === 1 && $fuente->fuente)
<a href="{{ route('descargafuente', ['id'=>$fuente->id]) }}" target="_blank" class="btn btn-success btn-sm">
<i class="fa fa-eye" aria-hidden="true" data-toggle="tooltip" title="Ver Fuente de Información"></i>
</a>
@else
<a href="{{ $fuente->fuente }}" class="btn btn-success btn-sm">
<i class="fa fa-eye" aria-hidden="true" data-toggle="tooltip" title="Ver Fuente de Información"></i>
</a>
@endif
<form style="display: inline" method="post" action="{{ route('eliminarfuente', ['id'=>$fuente->id]) }}">
@method('DELETE')
@csrf
<button type="submit" name="eliminarFuente" id="eliminarFuente" onclick="" class="btn btn-danger btn-sm" data-toggle="tooltip" title="Eliminar Fuente de Información">
<i class="fa fa-trash" aria-hidden="true"></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('jscustom')
<script type="text/javascript">
/* $(document).ready(function(){
if (confirm("¿Desea realizar la eliminación?")){
alert("prueba");
}
});*/
</script>
@endpush
| 0.980469 | high |
resources/views/admin/home.blade.php | desenvolvedorr/Laravel-6-Multi-Auth | 0 | 5074040 | @extends('layouts.app')
@section('content')
<div class="container">
<div class="card-1">
<span>
<a href="/consultant">
<h2>CONSULTORES</h2>
</a>
</span>
</div>
<div class="card-1">
<span>
<a href="/customer">
<h2>CLIENTES</h2>
</a>
</span>
</div>
<div class="card-1">
<span>
<h2>TIPOS DE CONSULTORIA</h2>
</span>
</div>
<div class="card-1">
<span>
<h2>CONSULTORIAS</h2>
</span>
</div>
<div class="card-1">
<span>
<h2>RECEBER</h2>
</span>
</div>
<div class="card-1">
<span>
<h2>PAGAR</h2>
</span>
</div>
<div class="card-1">
<span>
<h2>CONFIGURAÇÕES</h2>
</span>
</div>
</div>
@endsection
@section('javascript')
<script src="{{ asset('site/jquery.mask.min.js') }}"></script>
{{-- <script src="{{ asset('js/registrationajaxscript.js') }}"></script> --}}
@endsection
| 0.867188 | high |
next_round.php | nicktendo64/in-the-chips | 0 | 5074296 | <filename>next_round.php
<?php
require_once "cache.php";
$rounds = cache_fetch("rounds");
unset($rounds[0]);
$rounds = array_values($rounds);
cache_store("rounds", $rounds);
cache_delete("sellersSoFar");
cache_delete("offers");
?>
| 0.726563 | low |
application/controllers/lifestyle.php | hanifxdp/TheJourn2019 | 0 | 5074552 | <gh_stars>0
<?php
class lifestyle extends CI_Controller {
public function index()
{
$data['judul']='Lifestyle';
$this->load->view('template/header',$data);
$this->load->view('lifestyle/lifestyle_home');
$this->load->view('template/footer');
}
}
| 0.539063 | low |
app/Controllers/ClientController.php | agungsenjaya/nyoman | 0 | 5074808 | <reponame>agungsenjaya/nyoman<gh_stars>0
<?php
namespace App\Controllers;
use App\Controllers\BaseController;
use App\Models\Service;
class ClientController extends BaseController
{
protected $db;
public function __construct(){
$this->db = \Config\Database::connect();
}
public function home()
{
// $query = $this->db->query('SELECT * FROM services');
// $results = $query->getResult();
// $this->load->model('service');
// $service = new Service;
// $data['services'] = $service->get();
echo view('client/home');
}
public function service()
{
echo view('client/service');
}
public function contact() {
echo view('client/contact');
}
public function check() {
echo view('client/check');
}
public function how() {
echo view('client/how');
}
}
| 0.570313 | high |
src/Oro/Component/MessageQueue/Client/Meta/DestinationMetaRegistry.php | Cube-Solutions/platform | 173 | 5075064 | <filename>src/Oro/Component/MessageQueue/Client/Meta/DestinationMetaRegistry.php
<?php
namespace Oro\Component\MessageQueue\Client\Meta;
use Oro\Component\MessageQueue\Client\Config;
/**
* Registry of queues-subscribers relations.
*/
class DestinationMetaRegistry
{
private Config $config;
/**
* @var array
* [
* 'queue_name' => [
* 'message_processor1',
* 'message_processor2',
* // ...
* ],
* // ...
* ]
*/
private array $messageProcessorsByQueue;
/**
* @param Config $config
* @param array $messageProcessorsByQueue
* [
* 'queue_name' => [
* 'message_processor1',
* 'message_processor2',
* // ...
* ],
* // ...
* ]
*/
public function __construct(Config $config, array $messageProcessorsByQueue)
{
$this->config = $config;
$this->messageProcessorsByQueue = $messageProcessorsByQueue;
}
public function getDestinationMeta(string $queueName): DestinationMeta
{
$queueName = strtolower($queueName);
return new DestinationMeta(
$queueName,
$this->config->addTransportPrefix($queueName),
$this->messageProcessorsByQueue[$queueName] ?? []
);
}
public function getDestinationMetaByTransportQueueName(string $transportQueueName): DestinationMeta
{
return $this->getDestinationMeta($this->config->removeTransportPrefix($transportQueueName));
}
/**
* @return iterable<DestinationMeta>
*/
public function getDestinationsMeta(): iterable
{
foreach (array_keys($this->messageProcessorsByQueue) as $queueName) {
yield $this->getDestinationMeta($queueName);
}
}
}
| 0.996094 | high |
resources/views/main/galeria/fotos.blade.php | AlissonGuedes/embaixada | 0 | 5075320 | <reponame>AlissonGuedes/embaixada
@extends('main.layouts.app')
{? $title = tradutor($page->titulo); ?}
@section('title', $title)
@section('content')
<div class="title_pg">{{ tradutor($album->titulo) }}</div>
<div class="geral">
@if (isset($album))
<div class="subtitlepage">{{ tradutor($album->titulo) }}</div>
<div class="datapost">{{ tradutor($album->created_at) }}</div>
<div class="texto_pagina">
@php
$pagina_model = new \App\Models\Main\PaginaModel();
$fotos = $pagina_model->getFotos($album->slug);
@endphp
<div class="pikachoose" style="margin-bottom: 50px;">
<ul id="pikame">
@foreach ($fotos as $f)
<li><img src="{{ asset($f->path) }}" class="img_cem"></li>
@endforeach
</ul>
</div>
@if (isset($albuns))
<div class="s_item" style="clear: both;">
{{ tradutor([
'en' => 'See too',
'hr' => 'Lásd is',
'pt-br' => 'Veja também',
]) }}
</div>
@foreach ($albuns as $a)
@if ($a->id != $album->id)
<a href="{{ url($page->link . '/' . $a->slug) }}">
<div class="conj_item_cont">
<div class="img_item_cont">
@if (!empty($a->imagem) && file_exists(public_path($a->imagem)))
<img src="{{ asset($a->imagem) }}" class="img_cem">
@endif
</div>
<div class="info_item_cont">
<div class="title_itemm_cont">
{{ tradutor(json_decode($a->titulo, true)) }}
</div>
<div class="data_item">
{{ tradutor($a->created_at) }}
</div>
</div>
</div>
</a>
@endif
@endforeach
@endif
</div>
@else
Álbum não disponível ou inexistente
@endif
</div>
@endsection
| 0.964844 | high |
app/Http/Controllers/Frontend/DistributorsController.php | nada-farid/BinEshaq | 0 | 5075576 | <?php
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use App\Models\Distributor;
use App\Models\AboutUs;
class DistributorsController extends Controller
{
public function index()
{
$aboutUs =AboutUs::first();
$distributors = Distributor::with(['media'])->paginate(24);
return view('frontend.agents', compact('distributors','aboutUs'));
}
}
| 0.695313 | high |
application/models/CronModel.php | HC-bentill/local-knma | 0 | 5075832 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CronModel extends CI_Model
{
public $variable;
public function __construct()
{
parent::__construct();
}
// get residence
public function get_residence(){
$this->db->select('id,res_code,noOfResidents,building_type,property_type,construction_material,roofing_type,no_of_floors,no_of_rooms');
$this->db->from('residence');
$residence = $this->db->get()->result();
return($residence);
}
// get residence
public function get_all_residence(){
$this->db->select('*');
$this->db->from('residence');
$residence = $this->db->get()->result();
return($residence);
}
// get residence owner id
public function get_owner_id($id){
$this->db->select('owner_id');
$this->db->from('residence_to_owner');
$this->db->where('property_id',$id);
$owner_id = $this->db->get()->row_array()['owner_id'];
return($owner_id);
}
// add property
public function add_property($data)
{
$insert = $this->db->insert('buisness_property', $data);
return $this->db->insert_id();
}
//assign owner to property
public function add_property_to_owner($res_id, $owner_id)
{
$data = array(
'owner_id' => $owner_id,
'property_id' => $res_id
);
$insert = $this->db->insert('buis_prop_to_owner', $data);
return $this->db->insert_id();
}
// get residence owner id
public function update_access_residence($old_id,$new_id){
$where = array(
'target' => 1,
'property_id' => $old_id
);
$data = array(
'property_id' => $new_id
);
$this->db->where($where);
return $this->db->update('accessed_property',$data);
}
// get residence owner id
public function get_residence_category($id){
$this->db->select('*');
$this->db->from('res_to_category');
$this->db->where('property_id',$id);
$category = $this->db->get()->row_array();
return($category);
}
// get residence owner id
public function update_invoice_id($old_id,$new_id){
$where = array(
'product_id' => 13,
'property_id' => $old_id
);
$data = array(
'property_id' => $new_id
);
$this->db->where($where);
return $this->db->update('invoice',$data);
}
//add business categories
public function add_property_to_category($category)
{
$insert = $this->db->insert('busprop_to_category', $category);
return $this->db->insert_id();
}
// get business property
public function get_business_property(){
$this->db->select('id,buis_prop_code,noOfOccupants,property_category,buis_sector,property_typee');
$this->db->from('buisness_property');
$business = $this->db->get()->result();
return($business);
}
// get household count
public function get_household_count($res_code){
$this->db->select('count(*) as count1');
$this->db->from('household');
$this->db->where('res_prop_code',$res_code);
$household = $this->db->get()->row_array()["count1"];
return($household);
}
// get business occupant count
public function get_busocc_count($busprop_code){
$this->db->select('count(*) as count1');
$this->db->from('buisness_occ');
$this->db->where('buis_property_code',$busprop_code);
$busocc = $this->db->get()->row_array()["count1"];
return($busocc);
}
// get residence
public function get_cat6(){
$this->db->select('id');
$this->db->from('product_category6');
$residence = $this->db->get()->result();
return($residence);
}
// update residence
public function update_residence_status($data,$id){
$this->db->where($id);
return $this->db->update('residence',$data);
}
// update residence
public function update_busprop_status($data,$id){
$this->db->where($id);
return $this->db->update('buisness_property',$data);
}
// update residence
public function update_cat6($data,$id){
$this->db->where($id);
return $this->db->update('product_category6',$data);
}
// set property to ungenerated
public function set_property_to_ungenerated($data){
$this->db->update('residence',$data);
$this->db->update('buisness_property',$data);
$this->db->update('buisness_occ',$data);
return $this->db->update('signage',$data);
}
// get already generated invoices
public function get_already_generated_invoices($year){
$this->db->select('i.property_id,i.target');
$this->db->from('vw_invoice as i');
$this->db->where('i.invoice_year',$year);
$invoices = $this->db->get()->result();
return($invoices);
}
public function add_residence_category($data){
$insert = $this->db->insert('res_to_category',$data);
return $this->db->insert_id();
}
public function add_busprop_category($data){
$insert = $this->db->insert('busprop_to_category',$data);
return $this->db->insert_id();
}
public function get_busprop_categories(){
$this->db->select('b.*');
$this->db->from('busprop_to_category b');
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_busocc_categories(){
$this->db->select('b.*');
$this->db->from('busocc_to_category b');
$this->db->where('b.category5',0);
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_invoices(){
$this->db->select('b.id,b.area_council_id');
$this->db->from('vw_invoice b');
$this->db->where('b.area_council_id',3);
$invoices = $this->db->get()->result();
return($invoices);
}
public function get_busocc_categories6(){
$this->db->select('b.*');
$this->db->from('busocc_to_category b');
$this->db->where('b.category6',0);
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_product_category5(){
$this->db->select('b.*');
$this->db->from('product_category6 b');
$this->db->where('b.category5_id',0);
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_product_category6(){
$this->db->select('b.*');
$this->db->from('product_category6 b');
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_invoice_category5(){
$this->db->select('b.*');
$this->db->from('invoice b');
$this->db->where('b.category5_id',0);
$this->db->where('b.product_id',1);
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
public function get_invoice_category6(){
$this->db->select('b.*');
$this->db->from('product_category6 b');
$this->db->where('b.category6_id',0);
$this->db->where('b.product_id',1);
$bus_categories = $this->db->get()->result();
return($bus_categories);
}
}
| 0.992188 | high |
src/Console/Commands/MakeRepositoryCommand.php | inquisitive-stha/laravel-repositories | 71 | 5076088 | <filename>src/Console/Commands/MakeRepositoryCommand.php<gh_stars>10-100
<?php
namespace Dugajean\Repositories\Console\Commands;
use Dugajean\Repositories\Console\Commands\Creators\RepositoryCreator;
class MakeRepositoryCommand extends BaseCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $name = 'make:repository';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a new repository class';
/**
* @param RepositoryCreator $creator
*/
public function __construct(RepositoryCreator $creator)
{
parent::__construct($creator);
}
}
| 0.847656 | high |
app/Http/Controllers/ProductPageController.php | blchnk/the-plants | 0 | 5076344 | <?php
namespace App\Http\Controllers;
use App\Models\Product;
use App\Models\Subcategory;
use Illuminate\Http\Request;
class ProductPageController extends Controller
{
public function index() {
$products = Product::all();
return view('admin.adminProducts', compact('products'));
}
public function show(Product $product) {
return view('ProductPage', compact('product'));
}
public function create() {
return view('product.create');
}
public function store() {
$data = request()->validate([
'subcategory_id' => 'string',
'name' => 'string',
'image' => 'string',
'price' => 'string',
'description' => 'string'
]);
Product::create($data);
return redirect()->route('product.index');
}
public function edit(Product $product) {
return view('product.edit', compact('product'));
}
public function update(Product $product) {
$data = request()->validate([
'subcategory_id' => 'string',
'name' => 'string',
'image' => 'string',
'price' => 'string',
'description' => 'string'
]);
$product -> update($data);
return redirect()->route('product.index');
}
public function destroy(Product $product){
$product -> delete();
return redirect() -> route('product.index');
}
}
| 0.984375 | high |
EventListener/LogNotificationListener.php | PlanMyLife/notification-bundle | 0 | 5076600 | <filename>EventListener/LogNotificationListener.php
<?php
namespace PlanMyLife\NotificationBundle\EventListener;
use PlanMyLife\NotificationBundle\Builder\NotificationBuilderInterface;
use PlanMyLife\NotificationBundle\Event\NotificationEvent;
use PlanMyLife\NotificationBundle\Model\Notification;
class LogNotificationListener extends NotificationListener implements NotificationListenerInterface
{
public function getName()
{
return 'log';
}
}
| 0.984375 | high |
routes/api.php | Fahning/simply-v1.0 | 0 | 5076856 | <?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'auth'
], function ($router) {
// Route::post('login', 'AuthController@login');
Route::post('logout', 'AuthController@logout');
Route::post('refresh', 'AuthController@refresh');
Route::post('me', 'AuthController@me');
Route::get('users', 'UserController@index');
});
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'product'
], function ($router) {
Route::get('all', 'ProductController@index');
Route::get('category/{id}', 'ProductController@seachByCategory');
Route::get('{id}', 'ProductController@show');
Route::post('new', 'ProductController@store');
Route::put('edit/{id}', 'ProductController@update');
Route::delete('delete/{id}', 'ProductController@destroy');
});
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'category'
], function ($router) {
Route::get('all', 'CategoryController@index');
Route::get('categorysWithProducts', 'CategoryController@categorysWithProducts');
Route::get('{id}', 'CategoryController@show');
Route::post('new', 'CategoryController@store');
Route::put('edit/{id}', 'CategoryController@update');
Route::delete('delete/{id}', 'CategoryController@destroy');
});
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'models'
], function ($router) {
Route::get('all', 'ModelsController@index');
Route::get('{id}', 'ModelsController@show');
Route::post('new', 'ModelsController@store');
Route::put('edit/{id}', 'ModelsController@update');
Route::delete('delete/{id}', 'ModelsController@destroy');
});
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'brand'
], function ($router) {
Route::get('all', 'BrandController@index');
Route::get('{id}', 'BrandController@show');
Route::post('new', 'BrandController@store');
Route::put('edit/{id}', 'BrandController@update');
Route::delete('delete/{id}', 'BrandController@destroy');
});
Route::group([
'namespace' => 'Api',
'prefix' => 'auth'
], function ($router) {
Route::post('login', 'AuthController@login');
});
//GRUPO DE VENDAS E METODOS RELACIONADOS
Route::group([
'middleware' => 'apiJwt',
'namespace' => 'Api',
'prefix' => 'operations'
], function ($router) {
Route::post('newSell', 'SellsController@newSell');
Route::get('showAll', 'SellsController@showAll');
Route::get('sellsToday', 'SellsController@sellsToday');
Route::get('tablesSells', 'SellsController@tablesSells');
Route::get('selectOptions', 'OperationsController@selectOptions');
});
| 0.976563 | high |
lib/bu.defun/tests/signals/catched-signal.php | Bubujka/najomi.org | 11 | 5077112 | <reponame>Bubujka/najomi.org
<?php
catcher('warning', function(){ echo "catched"; });
signal("warning");
---
catched
| 0.988281 | low |
resources/lang/ro/passwords.php | gekecene/DecAPI | 76 | 5077368 | <?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'password' => '<PASSWORD>țin șase <PASSWORD>ere și s<PASSWORD>.',
'reset' => 'Parola ți-a fost resetată!',
'sent' => 'Ți-am trimis prin e-mail linkul de resetare a parolei!',
'token' => 'Acest token de resetare a parolei este nevalid.',
'user' => "Nu putem găsi un utilizator cu acea adresă de e-mail.",
];
| 0.945313 | high |
frontend/themes/basic/course/movie02.php | sxunt520/sxunt | 0 | 5077624 | <?php
/* @var $this yii\web\View */
$this->title="短片拍摄篇_ 用EOS相机开始短片拍摄";
?>
<?php echo $this->render('_page_js_css'); ?>
<div class="container">
<?php echo $this->render('_course_top'); ?>
<div class="contents">
<!-- Main title -->
<div class="main_title pb20">
<div style="height: 112px;" class="title_box colorY1">
<h2 style="margin-top: -6px;"><b>短片拍摄篇</b>
<strong class="size24">Lesson</strong>
<strong class="size60">52</strong>
</h2>
</div>
<div class="title_explanation colorG5">
<h3>用EOS相机开始短片拍摄</h3>
<p class="pb10">下面就来学习短片拍摄的进阶技巧。在此将解说短片拍摄、回放和相机内编辑短片的相关内容。另外,请大家掌握短片拍摄的相关菜单功能。</p>
<div class="crumbs"><a href="/course/">首页</a><em>></em><a href="movie.html">短片拍摄篇</a><em>></em>用EOS相机开始短片拍摄</div>
</div>
</div><!-- Main title end -->
<div class="main_con clearC">
<div class="title_t pb20">
<span class="colorY1 size18">1</span><h4><img src="/new_static/course/images/movie02_16.png" class="imgDe">(程序自动曝光)模式下的短片拍摄</h4>
</div>
<!-- 6 Row -->
<div class="col3 pb10">
<div class="col3_l">
<div class="col3_box">
<img src="/new_static/course/images/movie02_01.jpg" class="pb10">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">1</i></span><h5 class="pb10">将电源开关拨至 <img src="/new_static/course/images/movie01_26.png" class="imgDe">,选择曝光模式</h5>
</div>
<p class="size13 pb20">将相机上部的电源开关拨至短片拍摄的标识,相机进入短片的状态。选择P(程序自动曝光)模式。</p>
</div>
<div class="col3_box end">
<img src="/new_static/course/images/movie02_02.jpg" class="pb10">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">2</i></span><h5 class="pb10">决定构图</h5>
</div>
<p class="size13 pb20">在此先决定构图再开始拍摄。</p>
</div>
</div>
<div class="col3_box end">
<img src="/new_static/course/images/movie02_03.jpg" class="pb10">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">3</i></span><h5 class="pb10">半按快门按钮对焦</h5>
</div>
<p class="size13 pb70" style="padding-bottom:80px\9;">决定构图后,拍摄前半按快门按钮进行对焦。</p>
</div>
<div class="col3_box ml20sm end">
<img class="pb10" src="/new_static/course/images/movie02_04.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">4</i></span><h5 class="pb10">合焦</h5>
</div>
<p class="size13 pb20">合焦时会发出噼噼声并显示自动对焦点。合焦后再开始拍摄。</p>
</div>
<div class="col3_l end ml20">
<div class="col3_box">
<img class="pb10" src="/new_static/course/images/movie02_05.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">5</i></span><h5 class="pb10">按短片拍摄按钮开始拍摄</h5>
</div>
<p class="size13 pb20">轻轻按下短片拍摄按钮,开始拍摄。</p>
</div>
<div class="col3_box end">
<img class="pb10" src="/new_static/course/images/movie02_06.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">6</i></span><h5 class="pb10">拍摄开始</h5>
</div>
<p class="size13 pb20">拍摄开始后,液晶监视器右上显示红色圆点。再次按短片拍摄按钮终止拍摄。</p>
</div>
</div>
</div><!-- 6 Row end -->
<div class="mb0"></div>
<!-- col3 -->
<div class="gray_col colorG5 mb20">
<div class="title_t pb20">
<div class="prompt size18 colorB3">小提示</div>
</div>
<div class="gray_col3">
<div class="col3_r mr20">
<div class="gray_c3_box end">
<h5 class="pb10">短片拍摄时曝光模式的特征</h5>
<p class="pb10">要开始拍摄短片,先要将相机设置为短片拍摄模式,然
后按下机身背面的"实时显示拍摄/短片拍摄"按钮即可。不过,需要注意选择不同曝光模式时的拍摄效果有所不同。刚开始拍摄短片时,建议使用自动曝光的
P(程序自动曝光)、Av(光圈优先自动曝光)或Tv(快门优先自动曝光)模式。这样,光圈与快门的组合由相机自动设置,不容易失败,并且能够自行设置曝
光补偿及照片风格等,拓展短片的表现力。短片拍摄中各曝光模式的不同,请参见操作步骤后面的表格。</p>
</div>
</div>
<div class="col3_l end">
<div class="gray_c3_2_box">
<h5 style="height:21px" class="pb10">短片拍摄时曝光模式的特征</h5>
<style>
#table th{text-align:center; padding:5px;}
</style>
<!-- table -->
<div class="table-container pb10">
<table id="table" style="text-align:left;" cellspacing="0">
<tbody><tr>
<th>曝光模式</th><th>模式转盘</th><th style="width:200px; display:inline-block;">特征</th>
</tr>
<tr>
<td width="30%">手动曝光模式</td><td><img src="/new_static/course/images/movie02_17.png" style="width:25px; height:20px;"></td><td width="60%">自己决定快门速度、光圈和ISO感光度。(所有设置都手动)</td>
</tr>
<tr>
<td rowspan="2" style="vertical-align:middle;">自动曝光模式</td><td><img src="/new_static/course/images/movie02_18.png" style="width:97px; height:20px;"></td><td width="60%">相机自动设置快门速度、光圈和ISO感光度,但可自己调整曝光补偿、照片风格和白平衡。</td>
</tr>
<tr>
<td><img src="/new_static/course/images/movie02_19.png" style="width:158px; height:50px;"></td><td width="60%">相机自动设置快门速度、光圈和ISO感光度,且无法调整曝光补偿、照片风格和白平衡。(全自动)</td>
</tr>
</tbody></table>
</div>
<!-- table end -->
<div class="mb0"></div>
<p class="pb20 size13">※ 有些中高级机型在拍摄静止图像时,Av(光圈优先自动曝光)模式下可设光圈,Tv(快门优先自动曝光)模式下可设置快门速度。</p>
<div class="gray_c3_box">
<h5 class="pb10">自动曝光模式</h5>
<img src="/new_static/course/images/movie02_07.jpg" class="pb10">
</div>
<div class="gray_c3_box end">
<h5 class="pb10">手动曝光模式</h5>
<img src="/new_static/course/images/movie02_08.jpg" class="pb10">
</div>
<p class="pb10 size13">表示当前的曝光模式。可以旋转模式转盘切换曝光模式。</p>
</div>
</div>
</div>
</div><!-- col3 end -->
<div class="mb20"></div>
<div class="title_t pb20">
<span class="colorY1 size18">2</span><h4>短片的编辑</h4>
</div>
<!-- 6 Row -->
<div class="col3">
<div class="col3_l">
<div class="col3_box">
<img class="pb10" src="/new_static/course/images/movie02_09.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">1</i></span><h5 class="pb10">显示短片的回放画面</h5>
</div>
<p class="size13 pb20">在液晶监视器的回放画面上显示所拍短片,按机身背面的SET(设置)按钮。</p>
</div>
<div class="col3_box end">
<img class="pb10" src="/new_static/course/images/movie02_10.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">2</i></span><h5 class="pb10">显示编辑屏幕</h5>
</div>
<p class="size13 pb20">选择"编辑"图标,按SET(设置)按钮。</p>
</div>
</div>
<div class="col3_box end">
<img class="pb10" src="/new_static/course/images/movie02_11.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">3</i></span><h5 class="pb10">显示编辑画面</h5>
</div>
<p class="pb10 circleNumMovie"><span>①</span>表示短片整体长度的标尺。删除的部分显示为灰色。 <span>②</span>短片首段/末段删除、回放、保存的图标。</p>
<p class="size13 pb20">可以删除短片的首段或末段。编辑完成后选择"保存"图标。<br><br></p>
</div>
<div class="col3_box ml20sm end">
<img class="pb10" src="/new_static/course/images/movie02_12.jpg">
<div class="title_t">
<span class="colorY1 size18"><i class="bd-color_R fontY1">4</i></span><h5 class="pb10">保存编辑的短片</h5>
</div>
<p class="pb10 circleNumMovie"><span>①</span>可以选择"覆盖"或"取消"。</p>
<p class="size13 pb20">在回放画面中显示所拍短片,再按机身背面的SET(设置)按钮。</p>
</div>
<div class="col3_l end ml20">
<div class="col3_box">
</div>
<div class="col3_box end">
</div>
</div>
</div><!-- 6 Row end -->
<div class="mb20"></div>
<div class="title_t pb20">
<span class="colorY1 size18"></span><h4>掌握短片拍摄用的设置项目</h4>
</div>
<!-- col3 -->
<div class="col3 pb20">
<div class="col3_r mr20">
<div class="col3_box end">
<p class="pb20">到这里已经完成了短片拍摄、回放和编辑的一系列操作。下面来了解短片拍摄用的菜单功能。切换为短片拍摄模式后按机身背面的MENU(菜单)按钮,显示短片拍摄菜单。需要设置的项目不多,请大家掌握这些基本功能。</p>
</div>
</div>
<div class="col3_l end">
<div class="col3_box">
<img src="/new_static/course/images/movie02_13.jpg" class="pb10">
</div>
<div class="col3_box end">
<img src="/new_static/course/images/movie02_14.jpg" class="pb10">
</div>
</div>
</div><!-- col3 end -->
<div class="mb0"></div>
<!-- col2 -->
<div class="col2">
<div class="col2_box">
<h5 class="pb10">短片拍摄1</h5>
<!-- table -->
<div class="table-container pb10">
<table id="table" style="text-align:left;" cellspacing="0">
<tbody><tr>
<td class="noborder">自动对焦方式</td><td class="noborder">可从面部+追踪、自由移动多点、自由移动1点中选择。各自动对焦方式的动作与实时显示拍摄时相同(参照<a href="intermediate07.html" class="uline">Lesson27</a>)。</td>
</tr>
<tr>
<td>短片伺服自动对焦</td><td>可设置是否启用自动对焦范围内自动对被摄体连续对焦的短片伺服自动对焦功能。</td>
</tr>
<tr>
<td>短片拍摄期间使用快门按钮自动对焦</td><td>设置短片拍摄期间拍摄静止图像时,是重新对焦拍摄还是直接拍摄。默认设置为"ONE SHOT",即重新对焦。</td>
</tr>
<tr>
<td>显示网格线</td><td>可在液晶监视器上显示有助于确认构图等的网格线。可以选择"3×3"9等分的"网格线1"或"4×6"24等分的"网格线2"。</td>
</tr>
<tr>
<td>测光定时器</td><td>设置显示曝光设置的时间长度。默认设置为"16秒",无需变更。</td>
</tr>
</tbody></table>
</div>
<!-- table end -->
</div>
<div class="col2_box end">
<h5 class="pb10">短片拍摄2</h5>
<!-- table -->
<div class="table-container pb10">
<table id="table" style="text-align:left;" cellspacing="0">
<tbody><tr>
<td class="noborder" width="30%">短片记录尺寸</td><td class="noborder">选择短片的图像尺寸和帧频。可以选择"1920×1080( 全高清),25 帧/ 秒"、"1920×1080(全高清),24帧/ 秒"、"1280×720( 高清),50 帧/ 秒" 或"640×480(标清),25 帧/ 秒"。(不同机型有所差别)</td>
</tr>
<tr>
<td width="30%">录音</td><td>可以选择自动调节音量的"自动"或手动调节的"手动"。有些机型可以设置降低风噪的"风声抑制"或抑制大音量破音的"衰减器"功能。</td>
</tr>
<tr>
<td width="30%">视频快照</td><td>可选择是否使用将多个短视频合成1 个视频快照作品集的功能。(详情参照<a href="movie03.html" class="uline">Lesson53</a>)</td>
</tr>
</tbody></table>
</div>
<!-- table end -->
</div>
</div>
<!-- col2 end -->
<div class="mb20"></div>
<!--gray_col-->
<div class="gray_col1 colorG5 mb20">
<div class="title_t pb20">
<div class="prompt size18 colorB3">小提示</div>
</div>
<div class="col3_l end">
<div class="gray_c3_box">
<h5 class="pb10">活用外接麦克风</h5>
<p>EOS相机搭载了内置麦克风,但如果追求更高的影像品质,推荐使用另售的外接麦克风。可以录制更远处的声音。</p>
</div>
<div class="gray_c3_box end">
<img src="/new_static/course/images/movie02_15.jpg" class="pb10">
<p class="size13">这是一款需安装在相机顶部热靴上的外接麦克风。需将连接线插入相机机身侧面的麦克风端子来连接。</p>
</div>
</div>
</div><!-- gray_col end-->
<div class="mb20"></div>
<div class="page">
<div class="page_prev"><a href="/course/movie01"><img src="/new_static/course/images/page_prev.jpg">上一页</a></div><div class="page_next"><a href="/course/movie03">下一页<img src="/new_static/course/images/page_next.jpg"></a></div>
</div>
</div></div>
</div> | 0.910156 | high |
resources/views/partials/footer.blade.php | Nakama-YefrixD/lapreciosa | 0 | 5077880 | <footer class="footer">
<div class="d-sm-flex justify-content-center justify-content-sm-between">
<span class="text-muted text-center text-sm-left d-block d-sm-inline-block">Copyright © 2019 <a href="{{ Request::root() }}" target="_blank">LA PRECIOSA </a>. Todos los derechos reservados.</span>
<span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">Hecho con <i class="mdi mdi-heart text-danger"></i></span>
</div>
</footer> | 0.785156 | high |
resources/views/layouts/footer.blade.php | edmondsylar/crime-alert | 1 | 5078136 | <footer class="footer text-center"> 2020 ©
Criminal Alert Application | copyright
</footer> | 0.933594 | low |
index.php | AndreaPaciolla/bibliotech | 0 | 5078392 | <?php require_once "shared/core.php"; ?>
<?php include_once "shared/layout/header.php"; ?>
<body>
<?php
if(isLoggedUser()) {
include_once "shared/layout/body.php";
} else {
include_once "shared/layout/engage.php";
}
?>
<?php include_once "shared/layout/footer.php"; ?>
</body>
</html>
| 0.640625 | low |
data/runtime/Cache/Portal/438622e2ff02579fda03b73fa241c330.php | xiaoningboke/kjl | 0 | 5078648 | <gh_stars>0
<?php if (!defined('THINK_PATH')) exit();?><!-- 将Pure添加到项目 -->
<link rel="stylesheet" href="https://unpkg.com/purecss@0.6.2/build/pure-min.css" integrity="<KEY>" crossorigin="anonymous">
<!-- 首页 -->
<!DOCTYPE html>
<!--首页-->
<html>
<head>
<title>康吉诺(北京)科技有限公司</title>
<meta name="keywords" content="设备零故障管理平台,设备零故障,零故障,设备管理系统,设备诊断,设备综合诊断,康吉诺(北京)科技有限公司,康吉诺" />
<meta name="description" content="康吉诺(北京)科技有限公司是一家大型的技术服务中心,专注于设备综合诊断,设备管理系统,机械设备状态监测的实现,目前已经和国内大型企业建立了良好的合作关系,并且在各大试点进行推广应用">
<!-- 头部 -->
<?php function _sp_helloworld(){ echo "hello ThinkCMF!"; } function _sp_helloworld2(){ echo "hello ThinkCMF2!"; } function _sp_helloworld3(){ echo "hello ThinkCMF3!"; } ?>
<?php $portal_index_lastnews="1,2"; $portal_hot_articles="1,2"; $portal_last_post="1,2"; $tmpl=sp_get_theme_path(); $default_home_slides=array( array( "slide_name"=>"康吉诺(北京)科技有限公司", "slide_pic"=>$tmpl."Public/assets/images/demo/1.jpg", "slide_url"=>"", ), array( "slide_name"=>"康吉诺(北京)科技有限公司", "slide_pic"=>$tmpl."Public/assets/images/demo/2.jpg", "slide_url"=>"", ), array( "slide_name"=>"康吉诺(北京)科技有限公司", "slide_pic"=>$tmpl."Public/assets/images/demo/3.jpg", "slide_url"=>"", ), ); ?>
<meta name="author" content="<EMAIL>">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">
<!-- No Baidu Siteapp-->
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<!-- HTML5 shim for IE8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<![endif]-->
<link rel="icon" href="/kjl/themes/simplebootx/Public/assets/images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/kjl/themes/simplebootx/Public/assets/images/favicon.ico" type="image/x-icon">
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/themes/simplebootx/theme.min.css" rel="stylesheet">
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!--[if IE 7]>
<link rel="stylesheet" href="/kjl/themes/simplebootx/Public/assets/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
<![endif]-->
<link href="/kjl/themes/simplebootx/Public/assets/css/style.css" rel="stylesheet">
<style>
/*html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(1);}*/
#backtotop{position: fixed;bottom: 50px;right:20px;display: none;cursor: pointer;font-size: 50px;z-index: 9999;}
#backtotop:hover{color:#333}
#main-menu-user li.user{display: none}
</style>
<!-- 以下修改 -->
<link href="/kjl/themes/simplebootx/Public/assets/css/slippry/slippry.css" rel="stylesheet">
<style>
.caption-wraper{position: absolute;left:50%;bottom:2em;}
.caption-wraper .caption{
position: relative;left:-50%;
background-color: rgba(0, 0, 0, 0.54);
padding: 0.4em 1em;
color:#fff;
-webkit-border-radius: 1.2em;
-moz-border-radius: 1.2em;
-ms-border-radius: 1.2em;
-o-border-radius: 1.2em;
border-radius: 1.2em;
}
@media (max-width: 767px){
.sy-box{margin: 12px -20px 0 -20px;}
.caption-wraper{left:0;bottom: 0.4em;}
.caption-wraper .caption{
left: 0;
padding: 0.2em 0.4em;
font-size: 0.92em;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;}
}
</style>
<!--引入bootstrap库,默认包含 -->
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<!--引入bootstrap库,默认包含 -->
<script type="text/javascript" src="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<?php if(is_array($touchdata)): foreach($touchdata as $key=>$vo): ?><input type="hidden" value="<?php echo ($vo["qq"]); ?>" id="qq">
<input type="hidden" value="<?php echo ($vo["phone"]); ?>" id="phone"><?php endforeach; endif; ?>
<style type="text/css">
#lookmore{
background-color:#337Ab7;
color: #fcfcfa;
}
.hotnew{
border-bottom: 2px solid #337ab7 !important;
}
</style>
<!-- QQ -->
<link rel="stylesheet" href="/kjl/themes/simplebootx/Public/QQ/css/lrtk.css">
<script type="text/javascript" src="/kjl/themes/simplebootx/Public/QQ/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/kjl/themes/simplebootx/Public/QQ/js/lrtk.js"></script>
</head>
<link rel="stylesheet" type="text/css" href="/kjl/themes/simplebootx/Public/Contact/css/lrtk.css">
<script src="http://api.map.baidu.com/api?v=1.3"></script>
<style>
img {
max-width: none;
}
.baseinput{
height: 35px !important;
width:200px !important;
display: inline-block !important;
}
#message{
width: 533px;
height: 200px;
}
#verifydiv{
position: relative;
left: -60px;
}
h2{
padding: 30px;
}
#contactinformation{
margin:0 auto;
width:1200px;
height:450px;
}
#mapCanvas{
float:left;
}
#company{
font-size:12px;
float:right;
}
</style>
<style type="text/css">
.leftcontant{
width: 150px;
height: 25px;
background-color:#0040A2;
}
.leftcontant h4{
line-height: 100%;
color: white;
}
font{
color:#666666;
font-size: 12px;
font-family: "微软雅黑";
}
.lxwmnr{
color:#666666;
}
</style>
</head>
<body class="body-white">
<style>
.big{
height:274px;
width:100%;
}
.fontcolor{
font-size: 16px !important;
color: black !important;
font-family:'Microsoft YaHei','Hiragino Sans GB',Helvetica,Arial,'Lucida Grande',sans-serif;
}
#bcaret{
border-top-color: black;
border-bottom-color: black;
}
</style>
<!-- 标题栏 -->
<?php echo hook('body_start');?>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- 侧边栏logo -->
<a class="brand" href="/kjl/"><img src="/kjl/themes/simplebootx/Public/assets/images/logo.png"/></a>
<!-- 前台导航 -->
<div class="container">
<ul id="main-menu" class="nav">
<li class="li-class">
<a href="<?php echo U('Portal/Index/index');?>" class="fontcolor">首页</a>
</li>
<li class="li-class">
<a href="<?php echo U('Portal/About/index');?>" class="fontcolor">关于我们</a>
</li>
<li class="dropdown li-class">
<a href="http://localhost/one/Product" class="dropdown-toggle fontcolor" data-toggle="dropdown">产品中心 <b class="caret" id="bcaret"></b></a>
<ul class="dropdown-menu" style="padding: 0;margin: 0;border: 0;">
<li class="li-class">
<a href="<?php echo U('Portal/list/index',array('id'=>11));?>" class="fontcolor">硬件</a>
</li>
<li class="li-class">
<a href="<?php echo U('Portal/list/index',array('id'=>10));?>" class="fontcolor">软件</a>
</li>
</ul>
</li>
<li class="li-class">
<a href="<?php echo U('Portal/list/index?id=1');?>" class="fontcolor">解决方案</a></li>
<li class="li-class">
<a href="<?php echo U('Portal/list/index',array('id'=>4));?>" class="fontcolor">成功案例</a>
</li>
<li class="li-class">
<a href="<?php echo U('Portal/Join/index');?>" class="fontcolor">加入我们</a>
</li>
<li class="li-class">
<a href="<?php echo U('Portal/Contact/index');?>" class="fontcolor">联系我们</a>
</li>
</ul>
</div>
<!-- 前台导航 -->
</div>
</div>
</div>
<div id="top">
</div>
<img src="/kjl/public/images/bag6.jpg" class="big">
<!--
-->
<br/><br/><br/>
<div id="main"></div>
<div id="left" style="width: 50%">
</div>
<div id="right" style="width: 50%">
</div>
<div class="section slice no-padding" >
</div>
<div id="contactinformation">
<!--地图-->
<div id="mapCanvas" class="map-canvas no-margin" style="height: 450px; width: 450px">
<script type="text/javascript">
var map = new BMap.Map("mapCanvas"); // 创建Map实例
var point = new BMap.Point("116.3119450000", "39.9891970000"); // 创建点坐标
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别。
map.enableScrollWheelZoom(); //启用滚轮放大缩小
//添加缩放控件
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.OverviewMapControl());
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
var infoWindow = new BMap.InfoWindow("康吉诺(北京)科技有限公司<br/><span class=''>地址:北京市海淀区苏州街1号</span>"); // 创建信息窗口对象
marker.openInfoWindow(infoWindow);
</script>
</div>
<!--地图-->
<div id="company">
<!-- 公司简介开始 -->
<table align="center" width="720px">
<tr>
<?php $i=0 ?>
<?php if(is_array($data)): foreach($data as $key=>$vo): ?><td>
<div class="mask">
<h4 class="title"><font><?php echo ($vo["contact_title"]); ?></font></h4>
<p class="text">
<font>地址:<?php echo ($vo["contact_address"]); ?></font><br/>
<font>联系电话:<?php echo ($vo["contact_phone"]); ?></font><br/>
<font>传真:<?php echo ($vo["contact_fax"]); ?></font><br/>
</p>
</td>
<?php $i++; if($i%2==0){ echo "</tr>"; echo "<tr>"; } endforeach; endif; ?>
</table>
<!-- 公司简介结束 -->
</div>
</div>
<div class="container">
<hr>
<div class="row">
<div class="span6">
<h3 class="section-title">联系我们</h3>
<form class="form-light js-ajax-form" role="form" method="post"
action="<?php echo U('api/guestbook/addmsg');?>">
<div class="row">
<div class="span3">
<div class="form-group">
<label class="lxwmnr">姓名</label>
<input type="text" class="baseinput" name="full_name">
</div>
</div>
<div class="span3">
<div class="form-group">
<label class="lxwmnr">邮箱</label>
<input type="email" class="baseinput" name="email">
</div>
</div>
</div>
<div class="form-group">
<label class="lxwmnr">内容</label>
<div class="form-group">
<textarea class="form-control" rows="5" id="message" name="msg"></textarea>
</div>
</div>
<div class="row">
<div class="span3">
<div class="form-group">
<label class="lxwmnr">验证码</label>
<input type="text" class="baseinput" name="verify" autocomplete="off">
</div>
</div>
<div class="span3">
<div class="form-group" id="verifydiv">
<label> </label>
<?php echo sp_verifycode_img('length=4&font_size=16&width=150&height=34&use_noise=1&use_curve=0','style="cursor:pointer;vertical-align: top;" title="点击获取"');?>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary js-ajax-submit" data-wait="1500">发送留言</button>
</form>
</div>
<div class="span6" id='dd'>
<img src="/kjl/themes/simplebootx/Public/Contact/img/0.jpg" alt="" width="590px" height="380px" style="margin: -450px 0 0 580px; ">
</div>
</div>
<br>
<hr>
<?php echo hook('footer');?>
<div id="footer" align="center">
<div class="links">
@2015 版权所有 康吉诺(北京)科技有限公司 地址:北京市海淀区苏州街1号 电话:010-82614047
<br/><br><br>
</div>
</div>
<div id="backtotop">
<i class="fa fa-arrow-circle-up"></i>
</div>
<?php echo ($site_tongji); ?>
</div>
<script type="text/javascript">
//全局变量
var GV = {
ROOT: "/kjl/",
WEB_ROOT: "/kjl/",
JS_ROOT: "public/js/"
};
</script>
<!-- Placed at the end of the document so the pages load faster -->
<script src="/kjl/public/js/jquery.js"></script>
<script src="/kjl/public/js/wind.js"></script>
<script src="/kjl/themes/simplebootx/Public/assets/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script src="/kjl/public/js/frontend.js"></script>
<script>
$(function(){
$('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
$("#main-menu li.dropdown").hover(function(){
$(this).addClass("open");
},function(){
$(this).removeClass("open");
});
$.post("<?php echo U('user/index/is_login');?>",{},function(data){
if(data.status==1){
if(data.user.avatar){
$("#main-menu-user .headicon").attr("src",data.user.avatar.indexOf("http")==0?data.user.avatar:"<?php echo sp_get_image_url('[AVATAR]','!avatar');?>".replace('[AVATAR]',data.user.avatar));
}
$("#main-menu-user .user-nicename").text(data.user.user_nicename!=""?data.user.user_nicename:data.user.user_login);
$("#main-menu-user li.login").show();
}
if(data.status==0){
$("#main-menu-user li.offline").show();
}
/* $.post("<?php echo U('user/notification/getLastNotifications');?>",{},function(data){
$(".nav .notifactions .count").text(data.list.length);
}); */
});
;(function($){
$.fn.totop=function(opt){
var scrolling=false;
return this.each(function(){
var $this=$(this);
$(window).scroll(function(){
if(!scrolling){
var sd=$(window).scrollTop();
if(sd>100){
$this.fadeIn();
}else{
$this.fadeOut();
}
}
});
$this.click(function(){
scrolling=true;
$('html, body').animate({
scrollTop : 0
}, 500,function(){
scrolling=false;
$this.fadeOut();
});
});
});
};
})(jQuery);
$("#backtotop").totop();
});
</script>
</body>
</html> | 0.804688 | high |
Http/Routing/MessageConfiguration.php | borobudur-php/symfony-infra | 0 | 5078904 | <?php
/**
* This file is part of the Borobudur package.
*
* (c) 2017 Borobudur <http://borobudur.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Borobudur\Infrastructure\Symfony\Http\Routing;
use Borobudur\Component\Http\Controller\InvokableMessageControllerInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* @author <NAME> <<EMAIL>>
*/
class MessageConfiguration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('routing');
$methods = ['GET', 'PUT', 'PATCH', 'POST', 'DELETE'];
$rootNode
->children()
->scalarNode('name')->cannotBeEmpty()->end()
->scalarNode('message_property')
->cannotBeEmpty()
->defaultValue('message')
->end()
->scalarNode('message')
->isRequired()
->cannotBeEmpty()
->end()
->scalarNode('path')
->isRequired()
->cannotBeEmpty()
->end()
->scalarNode('controller')
->cannotBeEmpty()
->defaultValue(InvokableMessageControllerInterface::class)
->end()
->scalarNode('serialization_groups')
->cannotBeEmpty()
->defaultValue('default')
->end()
->scalarNode('serialization_version')->cannotBeEmpty()->end()
->scalarNode('methods')
->isRequired()
->cannotBeEmpty()
->validate()
->ifTrue(function($values) use ($methods) {
$values = explode(',', $values);
foreach ($values as $method) {
if (!in_array(strtoupper($method), $methods, true)) {
return true;
}
}
return false;
})
->thenInvalid(
sprintf(
'Unknown method "%%s", available methods [%s]',
implode(',', $methods)
)
)
->end()
->end()
->scalarNode('serialization_version')
->cannotBeEmpty()
->end()
->end()
;
return $treeBuilder;
}
}
| 0.992188 | high |
actions/editProduct.php | alu0101235516/PHP-SQL | 0 | 5079160 | <reponame>alu0101235516/PHP-SQL
<?php
include("../db.php");
$nombre = '';
$familia = '';
$ID = '';
$descripcion = '';
$stock = '';
$dimensiones = '';
$peso_pvp = '';
$imagen = '';
$imagenG = '';
if (isset($_GET['ID'])) {
$ID = $_GET['ID'];
$query = "SELECT * FROM PRODUCTOS WHERE ID = '$ID'";
$result = mysqli_query($conn, $query);
if (mysqli_num_rows($result) == 1) {
$row = mysqli_fetch_array($result);
$nombre = $row['nombre'];
$familia = $row['familia'];
$ID = $row['ID'];
$descripcion = $row['descripcion'];
$stock = $row['stock'];
$dimensiones = $row['dimensiones'];
$peso_pvp = $row['peso_pvp'];
}
}
if (isset($_POST['modify'])) {
$ID = $_GET['ID'];
$nombre = $_POST['product_name'];
$familia = $_POST['product_family'];
$descripcion = $_POST['product_desc'];
$stock = $_POST['product_stock'];
$dimensiones = $_POST['product_dim'];
$peso_pvp = $_POST['product_weight'];
if (!empty($_FILES['product_img']['tmp_name'])) {
$imagen = addslashes(file_get_contents($_FILES['product_img']['tmp_name']));
$query = "UPDATE PRODUCTOS set nombre = '$nombre', familia = '$familia', descripcion = '$descripcion', stock = $stock, dimensiones = '$dimensiones', peso_pvp = $peso_pvp, imagen = '$imagen' WHERE ID = '$ID'";
} else {
$query = "UPDATE PRODUCTOS set nombre = '$nombre', familia = '$familia', descripcion = '$descripcion', stock = $stock, dimensiones = '$dimensiones', peso_pvp = $peso_pvp WHERE ID = '$ID'";
}
mysqli_query($conn, $query);
header('Location: http://alu0101235516-abdd.atwebpages.com/pages/GestorProductos.php');
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Editar Producto</title>
</head>
<body>
<form action="editProduct.php?ID=<?php echo $_GET['ID'];?>" method="POST" enctype="multipart/form-data">
<input type="text" name="product_name" placeholder="Nombre" value="<?php echo $nombre; ?>">
<input type="text" name="product_family" placeholder="Familia" value="<?php echo $familia; ?>">
<input type="text" name="product_desc" placeholder="Descripcion" value="<?php echo $descripcion; ?>">
<input type="number" name="product_stock" placeholder="Stock" value="<?php echo $stock; ?>">
<input type="text" name="product_dim" placeholder="Dimensiones" value="<?php echo $dimensiones; ?>">
<input type="number" name="product_weight" placeholder="Peso pvp" value="<?php echo $peso_pvp; ?>">
<input type="file" name="product_img">
<button type="submit" name="modify" value="Modificar">Modificar</button>
</form>
</body>
</html>
| 0.859375 | high |
database/migrations/2018_12_19_135504_create_vanchuyen_table.php | trinhhoangphuc/luanvan | 0 | 5079416 | <filename>database/migrations/2018_12_19_135504_create_vanchuyen_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateVanchuyenTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('vanchuyen', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->unsignedTinyInteger('vc_ma')->autoIncrement()->comment('mã loại');
$table->string('vc_ten', 100)->unique()->comment('loại tên');
$table->unsignedInteger('vc_gia')->comment('giá vận chuyển');
$table->timestamp('vc_taoMoi')->default(DB::raw('CURRENT_TIMESTAMP'))->comment('loại tạo mới');
$table->timestamp('vc_capNhat')->default(DB::raw('CURRENT_TIMESTAMP'))->comment('loại cập nhật');
$table->unsignedTinyInteger('vc_trangThai')->default('2')->comment('1 là khóa, 2 là khả dụng');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('vanchuyen');
}
}
| 0.996094 | high |
resources/views/components/auth-card.blade.php | alexandrefreret/portefeuille | 0 | 5079672 | <filename>resources/views/components/auth-card.blade.php
<div class="row justify-content-center align-items-center full-page">
<div class="col-6">
{{ $slot }}
</div>
</div>
| 0.542969 | low |
database/factories/TransactionFactory.php | imadeous/chives | 0 | 5079928 | <?php
namespace Database\Factories;
use App\Models\Transaction;
use Illuminate\Database\Eloquent\Factories\Factory;
class TransactionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Transaction::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'date' => date('Y-m-d'),
'user_id' => 1,
'reference_number' => 'CHIVES/0001',
'income' => 1000000,
'expense' => 0,
'title' => 'Initial Investment',
'remarks' => 'Strating balance of the restaurant',
];
}
}
| 0.9375 | high |
frontend/views/app/view.php | erkin27/delivery_contacts | 0 | 5080184 | <filename>frontend/views/app/view.php
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $client frontend\models\Client */
/* @var $address frontend\models\Address */
$this->title = 'Client - ' . $client->login;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Clients'), 'url' => ['clients']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="client-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('app', 'Update'), ['update-client', 'id' => $client->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('app', 'Delete'), ['delete'],
[
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
'method' => 'post',
'params' => ['id' => $client->id]
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $client,
'attributes' => [
'login',
'password',
'name',
'surname',
'gender' => [
'attribute' => 'gender',
'value' => function ($data) {
return \frontend\models\Client::getNameGender($data->gender);
}
],
'created' => [
'attribute' => 'created',
'value' => function ($data) {
return date('d-m-Y H:s', strtotime($data->created));
}
],
'email:email',
],
]) ?>
<?php \yii\widgets\Pjax::begin() ?>
<?= \yii\grid\GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'index',
'country',
'city',
'street',
'house',
'float',
],
]) ?>
<?php \yii\widgets\Pjax::end()?>
</div>
| 0.984375 | high |
src/Others/plugin-QueuedTracking-4.x-dev/tests/Unit/Queue/Processor/HandlerTest.php | JavierCanon/GoogleAnalyticsTracker | 0 | 5080440 | <?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\QueuedTracking\tests\Unit\Queue\Backend;
use Piwik\Plugins\QueuedTracking\Queue\Processor\Handler;
use Piwik\Tests\Framework\Mock\Tracker;
use Piwik\Tests\Framework\Mock\Tracker\Db;
use Piwik\Tests\Framework\TestCase\UnitTestCase;
class TestHandler extends Handler {
private $handlerDb;
public function getDb()
{
return $this->handlerDb;
}
public function setDb($db)
{
$this->handlerDb = $db;
}
public function getTransactionId()
{
return $this->transactionId;
}
}
/**
* @group QueuedTracking
* @group HandlerTest
* @group Plugins
*/
class HandlerTest extends UnitTestCase
{
/**
* @var TestHandler
*/
private $handler;
/**
* @var Tracker
*/
private $tracker;
/**
* @var Db
*/
private $db;
private $transactionId = 'my4929transactionid';
public function setUp(): void
{
parent::setUp();
$this->handler = new TestHandler();
$this->tracker = new Tracker();
$this->db = new Db(array());
$this->handler->setDb($this->db);
}
public function test_init_ShouldStartADatabaseTransaction()
{
$this->assertFalse($this->db->beganTransaction);
$this->handler->init($this->tracker);
$this->assertEquals($this->transactionId, $this->handler->getTransactionId());
$this->assertTrue($this->db->beganTransaction);
}
public function test_commit_ShouldCommitTransaction()
{
$this->handler->init($this->tracker);
$this->handler->commit($this->tracker);
$this->assertEquals($this->transactionId, $this->db->commitTransactionId);
$this->assertFalse($this->db->rollbackTransactionId);
}
public function test_rollback_ShouldRollbackTransaction()
{
$this->handler->init($this->tracker);
$this->handler->rollBack($this->tracker);
$this->assertEquals($this->transactionId, $this->db->rollbackTransactionId);
$this->assertFalse($this->db->commitTransactionId);
}
}
| 0.996094 | high |
resources/views/quienes.blade.php | kevrosas98/laravel-challenge-three | 0 | 5080696 | @include('templates.header')
<h1>¿Quienes Somos?</h1>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Numquam nulla non, beatae iusto vero laudantium dolore! Cupiditate quis quod, ad veritatis provident vel reiciendis. Omnis sunt et deserunt quia quod.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Itaque sequi corrupti soluta molestiae consequatur perferendis officiis porro quod. Quos sit provident unde repellat dicta recusandae sed vero repellendus laudantium libero?</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente rerum soluta aliquam architecto vitae tenetur dolore. Laborum ab perferendis soluta quasi iusto, reprehenderit tenetur totam est aliquam dolore eligendi quia!</p>
@include('templates.footer') | 0.65625 | high |
src/Heffe/SUFAPIBundle/Entity/CachedPersona.php | heffebaycay/suf-api | 1 | 5080952 | <?php
namespace Heffe\SUFAPIBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CachedPersona
*
* @ORM\Table(name="cached_persona")
* @ORM\Entity
*/
class CachedPersona
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="persona_name", type="string", length=255)
*/
private $personaName;
/**
* @var \DateTime
*
* @ORM\Column(name="date_created", type="datetime")
*/
private $dateCreated;
/**
* @var \DateTime
*
* @ORM\Column(name="date_updated", type="datetime", nullable=true)
*/
private $dateUpdated;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set personaName
*
* @param string $personaName
* @return CachedPersona
*/
public function setPersonaName($personaName)
{
$this->personaName = $personaName;
return $this;
}
/**
* Get personaName
*
* @return string
*/
public function getPersonaName()
{
return $this->personaName;
}
/**
* Set dateCreated
*
* @param \DateTime $dateCreated
* @return CachedPersona
*/
public function setDateCreated($dateCreated)
{
$this->dateCreated = $dateCreated;
return $this;
}
/**
* Get dateCreated
*
* @return \DateTime
*/
public function getDateCreated()
{
return $this->dateCreated;
}
/**
* Set dateUpdated
*
* @param \DateTime $dateUpdated
* @return CachedPersona
*/
public function setDateUpdated($dateUpdated)
{
$this->dateUpdated = $dateUpdated;
return $this;
}
/**
* Get dateUpdated
*
* @return \DateTime
*/
public function getDateUpdated()
{
return $this->dateUpdated;
}
}
| 0.992188 | high |
class_loader.php | nueaf/uteeni | 0 | 5081208 | <gh_stars>0
<?php
require_once dirname(__FILE__) . "/modelLoader.php";
function load_active_record_model($className) {
$file = dirname(__FILE__) . "/../models/" . strtolower($className) . ".php";
if (file_exists($file)) {
return include_once($file);
return true;
}
return false;
}
spl_autoload_register("load_active_record_model");
| 0.929688 | high |
src/File/OnFileChangeInterface.php | brunonatali/tools | 0 | 5081464 | <?php declare(strict_types=1);
namespace BrunoNatali\Tools\File;
interface OnFileChangeInterface
{
const ERROR_FILE_NAME_ABSENT = 0x110;
const ERROR_FILE_CALL_ABSENT = 0x111;
const ERROR_FILE_NOT_EXIST = 0x112;
const USE_SYSTEM_INOTIFY = 0x50;
const USE_SYSTEM_POLLING = 0x51;
public function start();
public function stop();
public function setPollingTime(int $time):bool;
} | 0.976563 | high |
app/ColumnasIgnore.php | rulgf/google-insights-reporter | 0 | 5081720 | <filename>app/ColumnasIgnore.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
class ColumnasIgnore extends Model
{
/**
* The attributes that are mass assignable.
*trtr
* @var array
*/
protected $fillable = [
'label', 'query_id', 'nombre'
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'remember_token',
];
protected $table = 'columnasignore';
/**
* Create a new historia instance.
*
* @param Request $request
* @return Response
*/
public static function store($colig, $query_id){
$columnasI = new ColumnasIgnore();
$columnasI->query_id = $query_id;
$columnasI->label = $colig['label'];
$columnasI->nombre = $colig['nombre'];
if($columnasI->save()){
return true;
}
return true;
}
public function querie(){
return $this->belongsTo('App\Query', 'query_id');
}
}
| 0.957031 | high |
app/Http/Controllers/com/IndexController.php | seek-concert/ts_rms | 2 | 5081976 | <filename>app/Http/Controllers/com/IndexController.php
<?php
/*
|--------------------------------------------------------------------------
| 登录入口
|--------------------------------------------------------------------------
*/
namespace App\Http\Controllers\com;
use App\Http\Controllers\Controller;
use App\Http\Model\Companyuser;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class IndexController extends Controller
{
/* ========== 初始化 ========== */
public function __construct()
{
}
/* ========== 登录页 ========== */
public function index(Request $request){
return view('com.login')->with(session('code'),session('message'));
}
/* ========== 登录 ========== */
public function login(Request $request){
$model =new Companyuser();
/* ********** 数据验证 ********** */
$rules=[
'username'=>'required',
'password'=>'<PASSWORD>'
];
$messages=[
'required'=>'请输入 :attribute',
];
$validator = Validator::make($request->all(), $rules, $messages, $model->columns);
if ($validator->fails()) {
$result=['code'=>'error','message'=>$validator->errors()->first(),'sdata'=>null,'edata'=>null,'url'=>null];
return response()->json($result);
}
/* ********** 查询用户 ********** */
DB::beginTransaction();
$user=Companyuser::select(['id','name','username','password','secret','company_id'])
->with(['company'=>function($query){
$query->select(['id','code','type','user_id']);
}])
->where('username',$request->input('username'))
->sharedLock()
->first();
DB::commit();
if(blank($user)){
return response()->json(['code'=>'error','message'=>'用户不存在','sdata'=>null,'edata'=>null,'url'=>null]);
}
// if($user->company->getoriginal('code')!='41'){
// return response()->json(['code'=>'error','message'=>'评估机构未通过审查','sdata'=>null,'edata'=>null,'url'=>null]);
// }
/* ********** 验证密码 ********** */
if($request->input('password') != decrypt($user->password)){
return response()->json(['code'=>'error','message'=>'密码错误','sdata'=>null,'edata'=>null,'url'=>null]);
}
/* ********** 更新登录 ********** */
$user->session=session()->getId();
$user->action_at=date('Y-m-d H:i:s');
$user->save();
/* ********** 生成session ********** */
/*是否为机构管理操作员*/
if($user->company->user_id==$user->id){
$isAdmin = 1;
}else{
$isAdmin = 0;
}
session(['com_user'=>[
'user_id'=>$user->id,
'name'=>$user->name,
'company_id'=>$user->company_id,
'type'=>$user->company->getOriginal('type'),
'secret'=>$user->secret,
'isAdmin'=>$isAdmin
]]);
return response()->json(['code'=>'success','message'=>'登录成功','sdata'=>session('com_user'),'edata'=>null,'url'=>route('c_home')]);
}
/* ========== 退出登录 ========== */
public function logout(Request $request){
$request->session()->forget('com_user');
return redirect()->route('c_index');
}
} | 0.992188 | high |
app/Http/Resources/EventReservationResource.php | Sander0542-School/Avans-WEBPHP | 0 | 5082232 | <gh_stars>0
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class EventReservationResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'event_id' => $this->event_id,
'name' => $this->user->name,
'count' => $this->ticket_count,
'start_date' => $this->start_date->format('Y-m-d'),
'end_date' => $this->end_date->format('Y-m-d'),
'picture' => asset('storage/'.$this->picture),
];
}
}
| 0.917969 | high |
Web_Interface/save_cluster.php | inralpgp/fishandchips | 0 | 5082488 | <reponame>inralpgp/fishandchips<gh_stars>0
<?php
require_once("fonctions.php");
$id = htmlentities($_GET['id']);
$cluster = htmlentities($_GET['cluster']);
$file = createXmlResultCluster($id,$cluster);
$fichier_taille = filesize("./files/".$file);
header("Content-disposition: attachment; filename=$file");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: application/octet-stream");
header("Content-Length: $fichier_taille");
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public");
header("Expires: 0");
readfile("./files/".$file);
?>
| 0.738281 | low |
app/Controllers/Blog.php | 604234031cs/codeigniter | 0 | 5082744 | <?php
namespace App\Controllers;
use App\Models\BlogModel;
use App\Models\TypeModel;
class Blog extends BaseController
{
public function post($slug)
{
$model = new BlogModel();
$data['post'] = $model->select('t1.p_name,t1.p_price,t1.p_detail,t1.p_img,t2.t_name')
->from('product as t1,type_product as t2')
->where('t1.t_id = t2.t_id and t1.id=' . $slug)
->first();
// $data['post'] = $model->jointable($slug);
echo view('templates/header', $data);
echo view('blog/post');
echo view('templates/footer');
// echo $data['post']['t_name'];
}
public function insert()
{
helper('form');
$model = new BlogModel();
$model2 = new TypeModel();
$data['type'] = $model2->getType();
if (!$this->validate(['name' => 'required', 'price' => 'required', 'img' => 'required', 'detail' => 'required', 'type' => 'required'])) {
echo view('templates/header');
echo view('blog/insert', $data);
echo view('templates/footer');
} else {
$model->save([
'p_name' => $this->request->getVar('name'),
'p_price' => $this->request->getVar('price'),
'p_img' => $this->request->getVar('img'),
'p_detail' => $this->request->getVar('detail'),
't_id' => $this->request->getVar('type')
]);
$session = \Config\Services::session();
$session->setFlashdata('Success', 'Add student Success');
return redirect()->to('/');
}
}
public function delProduct($id = null)
{
$model = new BlogModel();
$data['user'] = $model->where('id', $id)->delete($id);
return $this->response->redirect(site_url('/'));
}
//--------------------------------------------------------------------
}
| 0.972656 | high |
webmain/flow/input/mode_newsAction.php | rainrockb/xinhu | 0 | 5083000 | <?php
/**
*/
class mode_newsClassAction extends inputAction{
protected function savebefore($table, $arr, $id, $addbo){
$uarr = array();
if(!isset($arr['issms']))$uarr['issms']=0;
return array(
'rows' => $uarr
);
}
protected function saveafter($table, $arr, $id, $addbo){
}
//获取新闻
public function getnewsAjax()
{
$typename = $this->post('typename');
$rows = m('flow')->initflow('news')->getflowrows($this->adminid,'my',5,"and `typename`='$typename'");
return $rows;
}
}
| 0.601563 | medium |
Modules/Education/Resources/views/dashboard/drop_take_course.blade.php | aminmohamadi/zand | 0 | 5083256 | <gh_stars>0
@extends('layouts.master')
@section('title', 'صفحه اصلی')
@section('css')
@endsection
@section('style')
@endsection
@section('breadcrumb-title')
<h2><span>داشبورد </span></h2>
@endsection
@section('breadcrumb-items')
<li class="breadcrumb-item">داشبورد</li>
<li class="breadcrumb-item active">صفحه اصلی</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 xl-100">
<div class="row">
{{dd($courses)}}
</div>
</div>
</div>
</div>
@endsection
@section('script')
@endsection
| 0.792969 | low |
resources/views/spa/categories.blade.php | angelacaterina/laravel-boolpress | 0 | 5083512 | <filename>resources/views/spa/categories.blade.php
@extends('layout.app')
@section('title')
Categories Api
@endsection
@section('header')
@include('layout.header')
@endsection
@section('main')
<main id="main_content_categories" class="full-height">
<h1>All categories from the api</h1>
<div id="app">
<category-component></category-component>
</div>
</main>
@endsection | 0.589844 | high |
backend/Views/permission/index.blade.php | vuonghoang3019/StaffManaging | 1 | 5083768 | @extends('backend::master.master')
@section('title')
<title>Hạn chế</title>
@endsection
@section('css')
<link rel="stylesheet" href="{{ asset('admins/assets/css/checkbox.css') }}">
<style>
.rounded-list a {
position: relative;
display: block;
padding: .4em .4em .4em 2em;
*padding: .4em;
margin: .5em 0;
background: #ddd;
color: #444;
text-decoration: none;
border-radius: .3em;
transition: all .3s ease-out;
}
.rounded-list a:hover {
background: #eee;
}
.rounded-list a:hover:before {
transform: rotate(360deg);
}
.rounded-list a:before {
content: counter(li);
counter-increment: li;
position: absolute;
left: -1.3em;
top: 50%;
margin-top: -1.3em;
background: #87ceeb;
height: 2em;
width: 2em;
line-height: 2em;
border: .3em solid #fff;
text-align: center;
font-weight: bold;
border-radius: 2em;
transition: all .3s ease-out;
}
</style>
@endsection
@section('content')
<div class="content-wrapper">
@include('backend::layouts.headerContent',['name' => '', 'key' => 'Danh sách '])
<div class="content">
<div class="container-fluid">
<div class="row">
@can('permission-add')
<div class="col-md-12">
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#actionPermission">
Add
</button>
@include('backend::permission.create')
</div>
@endcan
<div class="col-md-12 mt-2">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Tên</th>
<th scope="col">Module</th>
<th scope="col">Mô tả</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php $stt = 0 ?>
@if(isset($permissions))
@foreach($permissions as $data)
<tr>
<th scope="row">{{ $stt }}</th>
<td>{{ $data->name }}</td>
<td>{{ \Illuminate\Support\Str::limit($data->description,20)}}</td>
<td>
@foreach($data->child as $item)
{{ $item->name }},
@endforeach
</td>
<td>
@can('permission-update')
<a href="{{ route('permission.edit',['id' => $data->id]) }}"
class="btn btn-default">Edit
</a>
@endcan
@can('permission-delete')
<a href=""
data-url="{{ route('permission.delete',['id' => $data->id]) }}"
class="btn btn-danger action-delete">Delete
</a>
@endcan
</td>
</tr>
<?php $stt++; ?>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="col-md-12 float-right">
{{ $permissions->links('pagination::bootstrap-4') }}
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script src="{{ asset('vendors/sweetAlert2/sweetalert2.js') }}"></script>
<script src="{{ asset('admins/assets/delete.js') }}"></script>
@endsection
| 0.996094 | high |
application/modules/admin/views/transactions_v.php | iradraz/wally | 1 | 5084024 | <link href="<?php echo base_url('css/pagination.css'); ?>" rel="stylesheet">
<script src="<?php echo base_url('jquery/pagination.js'); ?>"></script>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-5" style="min-width: 250px;">
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">Wally Wallet</h5>
<p class="card-text">Review all users transaction log</p>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function ()
{
$("#tab").pagination({
items: 10,
contents: 'contents',
previous: 'Previous',
next: 'Next',
position: 'bottom',
});
});
</script>
<div class="row justify-content-center">
<div class="col-10" style="flex-grow: 1; min-width: 500px;">
<div class="card bg-light">
<div class="card-body">
<h5 class="card-title text-primary text-center ">Transaction Log</h5>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Transaction ID #</th>
<th scope="col">User ID #</th>
<th scope="col">Action</th>
<th scope="col">Currency</th>
<th scope="col">Amount</th>
<th scope="col">Commission</th>
<th scope="col">Transaction Date</th>
</tr>
</thead>
<tbody class="contents"><?php // print_r($transactions);die; ?>
<?php foreach ($transactions as $key => $value) { ?>
<?php echo '<tr>'; ?>
<?php echo '<td scope="row">' . ($key + 1) . '</th>'; ?>
<?php echo '<td scope="row">' . $transactions[$key]['transaction_id'] . '</td>'; ?>
<?php echo '<td scope="row">' . $transactions[$key]['user_id'] . '</td>'; ?>
<?php echo '<td scope="row">' . $transactions[$key]['action'] . '</td>'; ?>
<?php echo '<td>' . $transactions[$key]['currency_name'] . '</td>'; ?>
<?php
$currency = $transactions[$key]['currency_name'];
$fmt = new NumberFormatter("@currency=$currency", NumberFormatter::CURRENCY);
$symbol = $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL);
?>
<?php echo '<td>' . $symbol . ' ' . $transactions[$key]['amount'] . '</td>';
?>
<?php echo '<td scope="row">' . $transactions[$key]['fee_paid'] . '</td>'; ?>
<?php echo '<td>' . $transactions[$key]['transaction_date'] . '</td>'; ?>
<?php
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div> | 0.992188 | high |
app/common/model/seckill/SeckillModel.php | lotussha/hj | 1 | 5084280 | <filename>app/common/model/seckill/SeckillModel.php
<?php
/**
* .::::.
* .::::::::.
* :::::::::::
* ..:::::::::::'
* '::::::::::::' Created by PhpStorm.
* .:::::::::: User: SakunoRyoma QQ3079714
* '::::::::::::::.. Time: 2020/8/12 15:59
* ..::::::::::::. 女神保佑,代码无bug!!!
* ``:::::::::::::::: Codes are far away from bugs with the goddess!!!
* ::::``:::::::::' .:::.
* ::::' ':::::' .::::::::.
* .::::' :::: .:::::::'::::.
* .:::' ::::: .:::::::::' ':::::.
* .::' :::::.:::::::::' ':::::.
* .::' ::::::::::::::' ``::::.
* ...::: ::::::::::::' ``::.
* ````':. ':::::::::' ::::..
* '.:::::' ':'````..
*
*/
namespace app\common\model\seckill;
use app\common\model\CommonModel;
/**
* 营销管理 - 秒杀model
* Class SeckillModel
* @package app\common\model\seckill
*/
class SeckillModel extends CommonModel
{
protected $name = 'seckill';
/**
* 一对一关联分类模型 规格
* @return \think\model\relation\HasOne
*/
public function SpecInfo() {
return $this->hasOne('app\common\model\GoodsSpecPriceModel', 'item_id', 'spec_id')->field('item_id,goods_id,key,key_name');
}
/**
* 一对一关联分类模型 商品
* @return \think\model\relation\HasOne
*/
public function GoodsInfo() {
return $this->hasOne('app\common\model\GoodsModel', 'goods_id', 'goods_id')->field('goods_id,goods_name');
}
/**
* 查看秒杀活动详情
* @param array $where
* @param string $field
* @param array $hidden
* @return array|\think\Model|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getSeckillDetail($where = [],$field = '*',$hidden = []){
$res = $this->where($where)
->field($field)
->hidden($hidden)
->with(['goods_info','spec_info'])
->find();
if(!empty($res)){
$res = $res->toArray();
}
return $res;
}
}
| 0.996094 | high |
application/views/layout/tac1.php | sayyidisal/Online-SMS | 0 | 5084536 | <!-- page content -->
<div class="right_col" role="main">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Add<small>Terms and Conditions</small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<br>
<form id="demo-form2" data-parsley-validate="" class="form-horizontal form-label-left" novalidate="" method="post" enctype="multipart/form-data" action="<?php echo base_url();?>login/savetac">
<input type="hidden" name="id" value="<?php echo $tac->id; ?>">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Terms and Conditions <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<textarea name="description"><?php echo $tac->description; ?></textarea>
</div>
</div>
<!-- <div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Phone Image <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" required="required" type="file" name="pimage">
</div>
</div> -->
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button class="btn btn-primary" type="button">Cancel</button>
<button type="submit" name="btn_save" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- /page content --> | 0.890625 | high |
cpemilik.php | abewartech/ujikom2016 | 6 | 5084792 | <gh_stars>1-10
<?php
include('koneksi.php');
$Kode_Pemilik = $_POST['Kode_Pemilik'];
$Nama_Pemilik = $_POST['Nama_Pemilik'];
$Alamat_Pemilik = $_POST['Alamat_Pemilik'];
$Telp_Pemilik = $_POST['Telp_Pemilik'];
$query = mysql_query("insert into tb_pemilik values( '$Kode_Pemilik', '$Nama_Pemilik', '$Alamat_Pemilik', '$Telp_Pemilik')") or die(mysql_error());
if ($query) {
header('location:ipemilik.php?message=success');
}
?> | 0.609375 | low |
Public/modules/newsletter/translations/ca.php | kbylin0531/presta_srg | 0 | 5085048 | <reponame>kbylin0531/presta_srg<filename>Public/modules/newsletter/translations/ca.php
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{newsletter}prestashop>newsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Butlletí de notícies (newsletter)';
$_MODULE['<{newsletter}prestashop>newsletter_804a924e464fd21ed92f820224c4091d'] = 'Genera un arxiu .CSV per als enviaments massius';
$_MODULE['<{newsletter}prestashop>newsletter_c3987e4cac14a8456515f0d200da04ee'] = 'Tots els països';
$_MODULE['<{newsletter}prestashop>newsletter_fa01fd956e87307bce4c90a0de9b0437'] = 'País dels clients';
$_MODULE['<{newsletter}prestashop>newsletter_7599b57d77ef1608b2f6da579794cc5b'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_2198f293f5e1e95dddeff819fbca0975'] = 'Subscrits al butlletí de notícies';
$_MODULE['<{newsletter}prestashop>newsletter_99006a61d48499231e1be92241cf772a'] = 'Filtrar subscriptors del butlletí.';
$_MODULE['<{newsletter}prestashop>newsletter_7e3a51a56ddd2846e21c33f05e0aea6f'] = 'Tots els clients';
$_MODULE['<{newsletter}prestashop>newsletter_39f7a3e2b56e9bfd753ba6325533a127'] = 'Subscriptors';
$_MODULE['<{newsletter}prestashop>newsletter_011d8c5d94f729f013963d856cd78745'] = 'No subscrits';
$_MODULE['<{newsletter}prestashop>newsletter_6395c19dc5a1cef9ca125b9736358dc7'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_3136b84457870341f29f741f7a07d325'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_82e5e0bc0f9c776c98253d569c111c0f'] = 'No va trobar els clients amb aquests filtres!';
$_MODULE['<{newsletter}prestashop>newsletter_644ecc2486a059ca16b001a77909bf40'] = 'El fitxer .CSV ha estat exportat: s\'han trobat %d clients.';
$_MODULE['<{newsletter}prestashop>newsletter_48e3d5f66961b621c78f709afcd7d437'] = 'Descarregui el fitxer';
$_MODULE['<{newsletter}prestashop>newsletter_dca37b874cf34bd5ebcf1c2fdc59a8b4'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_b40866b115d74009183e06fc86b5c014'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_81573e0ea79138f02fd2cee94786d7e9'] = 'Error: No es pot escriure';
$_MODULE['<{newsletter}prestashop>newsletter_73059f9530a1a37563150df4dea4bb70'] = 'Tots els subscriptors';
$_MODULE['<{newsletter}prestashop>newsletter_a307579714b75082f3f8734971b125cd'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_d0da5609e4aebc5d532de97511a5a34a'] = '';
$_MODULE['<{newsletter}prestashop>newsletter_4713ef5f2d6fc1e8f088c850e696a04b'] = 'Exportar clients';
$_MODULE['<{newsletter}prestashop>newsletter_dbb392a2dc9b38722e69f6032faea73e'] = 'Exportar en fitxer .CSV';
return $_MODULE;
| 0.964844 | high |
Kuuzu/KU/Core/Site/Admin/Application/CoreUpdate/Model/getShortcutNotification.php | kuuza/KuuzuCart | 1 | 5085304 | <filename>Kuuzu/KU/Core/Site/Admin/Application/CoreUpdate/Model/getShortcutNotification.php
<?php
/**
* Kuuzu Cart
*
* @copyright (c) 2007 - 2017 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*
* @copyright Copyright c 2018 Kuuzu; https://kuuzu.org
* @license MIT License; https://kuuzu.org/mitlicense.txt
*/
namespace Kuuzu\KU\Core\Site\Admin\Application\CoreUpdate\Model;
use Kuuzu\KU\Core\Site\Admin\Application\CoreUpdate\CoreUpdate;
class getShortcutNotification {
public static function execute($datetime) {
$result = CoreUpdate::getAvailablePackages();
return $result['total'];
}
}
?>
| 0.765625 | high |
tests/php/Unit/SimpleViewFactoryTest.php | MULXCODE/gutenberg-firebase-integration | 6 | 5085560 | <?php
namespace BN\Fireberg\Tests\Unit;
use BN\Fireberg\Infrastructure\View\SimpleViewFactory;
use BN\Fireberg\Infrastructure\ViewFactory;
final class SimpleViewFactoryTest extends TestCase {
public function test_it_can_be_instantiated(): void {
$factory = new SimpleViewFactory();
$this->assertInstanceOf( SimpleViewFactory::class, $factory );
}
public function test_it_implements_the_interface(): void {
$factory = new SimpleViewFactory();
$this->assertInstanceOf( ViewFactory::class, $factory );
}
}
| 0.984375 | high |
app/Http/Controllers/AssetModelsController.php | jorgedsilva/snipe-it-master | 0 | 5085816 | <reponame>jorgedsilva/snipe-it-master<gh_stars>0
<?php
namespace App\Http\Controllers;
use App\Models\CustomField;
use Image;
use Input;
use Lang;
use App\Models\AssetModel;
use Redirect;
use Auth;
use DB;
use Str;
use Validator;
use View;
use App\Models\Asset;
use App\Models\Company;
use Config;
use App\Helpers\Helper;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
* This class controls all actions related to asset models for
* the Snipe-IT Asset Management application.
*
* @version v1.0
* @author [<NAME>] [<<EMAIL>>]
*/
class AssetModelsController extends Controller
{
/**
* Returns a view that invokes the ajax tables which actually contains
* the content for the accessories listing, which is generated in getDatatable.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @return View
*/
public function index()
{
$this->authorize('index', AssetModel::class);
return view('models/index');
}
/**
* Returns a view containing the asset model creation form.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @return View
*/
public function create()
{
$this->authorize('create', AssetModel::class);
$category_type = 'asset';
return view('models/edit')->with('category_type',$category_type)
->with('depreciation_list', Helper::depreciationList())
->with('item', new AssetModel);
}
/**
* Validate and process the new Asset Model data.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @return Redirect
*/
public function store(ImageUploadRequest $request)
{
$this->authorize('create', AssetModel::class);
// Create a new asset model
$model = new AssetModel;
// Save the model data
$model->eol = $request->input('eol');
$model->depreciation_id = $request->input('depreciation_id');
$model->name = $request->input('name');
$model->model_number = $request->input('model_number');
$model->manufacturer_id = $request->input('manufacturer_id');
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
$model->user_id = Auth::id();
$model->requestable = Input::has('requestable');
if ($request->input('custom_fieldset')!='') {
$model->fieldset_id = e($request->input('custom_fieldset'));
}
if (Input::file('image')) {
$image = Input::file('image');
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
$path = app('models_upload_path');
if ($image->getClientOriginalExtension()!='svg') {
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path.'/'.$file_name);
} else {
$image->move($path, $file_name);
}
$model->image = $file_name;
}
// Was it created?
if ($model->save()) {
if ($this->shouldAddDefaultValues($request->input())) {
$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'));
}
// Redirect to the new model page
return redirect()->route("models.index")->with('success', trans('admin/models/message.create.success'));
}
return redirect()->back()->withInput()->withErrors($model->getErrors());
}
/**
* Returns a view containing the asset model edit form.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return View
*/
public function edit($modelId = null)
{
$this->authorize('update', AssetModel::class);
if ($item = AssetModel::find($modelId)) {
$category_type = 'asset';
$view = View::make('models/edit', compact('item','category_type'));
$view->with('depreciation_list', Helper::depreciationList());
return $view;
}
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
/**
* Validates and processes form data from the edit
* Asset Model form based on the model ID passed.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return Redirect
*/
public function update(ImageUploadRequest $request, $modelId = null)
{
$this->authorize('update', AssetModel::class);
// Check if the model exists
if (is_null($model = AssetModel::find($modelId))) {
// Redirect to the models management page
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
$model->depreciation_id = $request->input('depreciation_id');
$model->eol = $request->input('eol');
$model->name = $request->input('name');
$model->model_number = $request->input('model_number');
$model->manufacturer_id = $request->input('manufacturer_id');
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
$model->requestable = $request->input('requestable', '0');
$this->removeCustomFieldsDefaultValues($model);
if ($request->input('custom_fieldset')=='') {
$model->fieldset_id = null;
} else {
$model->fieldset_id = $request->input('custom_fieldset');
if ($this->shouldAddDefaultValues($request->input())) {
$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'));
}
}
$old_image = $model->image;
// Set the model's image property to null if the image is being deleted
if ($request->input('image_delete') == 1) {
$model->image = null;
}
if ($request->file('image')) {
$image = $request->file('image');
$file_name = $model->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
if ($image->getClientOriginalExtension()!='svg') {
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save(app('models_upload_path').$file_name);
} else {
$image->move(app('models_upload_path'), $file_name);
}
$model->image = $file_name;
}
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
try {
unlink(app('models_upload_path').$old_image);
} catch (\Exception $e) {
\Log::error($e);
}
}
if ($model->save()) {
return redirect()->route("models.index")->with('success', trans('admin/models/message.update.success'));
}
return redirect()->back()->withInput()->withErrors($model->getErrors());
}
/**
* Validate and delete the given Asset Model. An Asset Model
* cannot be deleted if there are associated assets.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return Redirect
*/
public function destroy($modelId)
{
$this->authorize('delete', AssetModel::class);
// Check if the model exists
if (is_null($model = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.not_found'));
}
if ($model->assets()->count() > 0) {
// Throw an error that this model is associated with assets
return redirect()->route('models.index')->with('error', trans('admin/models/message.assoc_users'));
}
if ($model->image) {
try {
unlink(public_path().'/uploads/models/'.$model->image);
} catch (\Exception $e) {
\Log::error($e);
}
}
// Delete the model
$model->delete();
// Redirect to the models management page
return redirect()->route('models.index')->with('success', trans('admin/models/message.delete.success'));
}
/**
* Restore a given Asset Model (mark as un-deleted)
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return Redirect
*/
public function getRestore($modelId = null)
{
$this->authorize('create', AssetModel::class);
// Get user information
$model = AssetModel::withTrashed()->find($modelId);
if (isset($model->id)) {
// Restore the model
$model->restore();
// Prepare the success message
$success = trans('admin/models/message.restore.success');
// Redirect back
return redirect()->route('models.index')->with('success', $success);
}
return redirect()->back()->with('error', trans('admin/models/message.not_found'));
}
/**
* Get the model information to present to the model view page
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return View
*/
public function show($modelId = null)
{
$this->authorize('view', AssetModel::class);
$model = AssetModel::withTrashed()->find($modelId);
if (isset($model->id)) {
return view('models/view', compact('model'));
}
// Prepare the error message
$error = trans('admin/models/message.does_not_exist', compact('id'));
// Redirect to the user management page
return redirect()->route('models.index')->with('error', $error);
}
/**
* Get the clone page to clone a model
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return View
*/
public function getClone($modelId = null)
{
// Check if the model exists
if (is_null($model_to_clone = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
$model = clone $model_to_clone;
$model->id = null;
// Show the page
$view = View::make('models/edit');
$view->with('depreciation_list', Helper::depreciationList());
$view->with('item', $model);
$view->with('clone_model', $model_to_clone);
return $view;
}
/**
* Get the custom fields form
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v2.0]
* @param int $modelId
* @return View
*/
public function getCustomFields($modelId)
{
$model = AssetModel::find($modelId);
return view("models.custom_fields_form")->with("model", $model);
}
/**
* Returns a view that allows the user to bulk edit model attrbutes
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.7]
* @return \Illuminate\Contracts\View\View
*/
public function postBulkEdit(Request $request)
{
$models_raw_array = Input::get('ids');
// Make sure some IDs have been selected
if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) {
$models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets')->orderBy('assets_count', 'ASC')->get();
// If deleting....
if ($request->input('bulk_actions')=='delete') {
$valid_count = 0;
foreach ($models as $model) {
if ($model->assets_count == 0) {
$valid_count++;
}
}
return view('models/bulk-delete', compact('models'))->with('valid_count', $valid_count);
// Otherwise display the bulk edit screen
} else {
$nochange = ['NC' => 'No Change'];
$fieldset_list = $nochange + Helper::customFieldsetList();
$depreciation_list = $nochange + Helper::depreciationList();
return view('models/bulk-edit', compact('models'))
->with('fieldset_list', $fieldset_list)
->with('depreciation_list', $depreciation_list);
}
}
return redirect()->route('models.index')
->with('error', 'You must select at least one model to edit.');
}
/**
* Returns a view that allows the user to bulk edit model attrbutes
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.7]
* @return \Illuminate\Contracts\View\View
*/
public function postBulkEditSave(Request $request)
{
$models_raw_array = Input::get('ids');
$update_array = array();
if (($request->has('manufacturer_id') && ($request->input('manufacturer_id')!='NC'))) {
$update_array['manufacturer_id'] = $request->input('manufacturer_id');
}
if (($request->has('category_id') && ($request->input('category_id')!='NC'))) {
$update_array['category_id'] = $request->input('category_id');
}
if ($request->input('fieldset_id')!='NC') {
$update_array['fieldset_id'] = $request->input('fieldset_id');
}
if ($request->input('depreciation_id')!='NC') {
$update_array['depreciation_id'] = $request->input('depreciation_id');
}
if (count($update_array) > 0) {
AssetModel::whereIn('id', $models_raw_array)->update($update_array);
return redirect()->route('models.index')
->with('success', trans('admin/models/message.bulkedit.success'));
}
return redirect()->route('models.index')
->with('warning', trans('admin/models/message.bulkedit.error'));
}
/**
* Validate and delete the given Asset Models. An Asset Model
* cannot be deleted if there are associated assets.
*
* @author [<NAME>] [<<EMAIL>>]
* @since [v1.0]
* @param int $modelId
* @return Redirect
*/
public function postBulkDelete(Request $request)
{
$models_raw_array = Input::get('ids');
if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) {
$models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets')->get();
$del_error_count = 0;
$del_count = 0;
foreach ($models as $model) {
\Log::debug($model->id);
if ($model->assets_count > 0) {
$del_error_count++;
} else {
$model->delete();
$del_count++;
}
}
\Log::debug($del_count);
\Log::debug($del_error_count);
if ($del_error_count == 0) {
return redirect()->route('models.index')
->with('success', trans('admin/models/message.bulkdelete.success',['success_count'=> $del_count] ));
}
return redirect()->route('models.index')
->with('warning', trans('admin/models/message.bulkdelete.success_partial', ['fail_count'=>$del_error_count, 'success_count'=> $del_count]));
}
return redirect()->route('models.index')
->with('error', trans('admin/models/message.bulkdelete.error'));
}
/**
* Returns true if a fieldset is set, 'add default values' is ticked and if
* any default values were entered into the form.
*
* @param array $input
* @return boolean
*/
private function shouldAddDefaultValues(array $input)
{
return !empty($input['add_default_values'])
&& !empty($input['default_values'])
&& !empty($input['custom_fieldset']);
}
/**
* Adds default values to a model (as long as they are truthy)
*
* @param AssetModel $model
* @param array $defaultValues
* @return void
*/
private function assignCustomFieldsDefaultValues(AssetModel $model, array $defaultValues)
{
foreach ($defaultValues as $customFieldId => $defaultValue) {
if ($defaultValue) {
$model->defaultValues()->attach($customFieldId, ['default_value' => $defaultValue]);
}
}
}
/**
* Removes all default values
*
* @return void
*/
private function removeCustomFieldsDefaultValues(AssetModel $model)
{
$model->defaultValues()->detach();
}
}
| 0.992188 | high |
web/lib/class-settings.php | beeldengeluid/bengdb-frontend | 1 | 5086072 | <?php
// Read / Save settings in a cookie
class Settings {
const COOKIE_ID = "bengdb-beeldengeluid-nl";
const SECONDS_IN_A_YEAR = 31536000;
private $settings, $expires;
function __construct() {
$this->expires = time() + self::SECONDS_IN_A_YEAR;
$this->settings = $this->load();
$this->save();
}
public function set($key, $value) {
$this->settings[$key] = $value;
$this->save();
}
public function get($key) {
if ($this->has($key)) {
return $this->settings[$key];
} else {
return null;
}
}
public function has($key) {
return !empty($this->settings[$key]);
}
private function load() {
if (!isset($_COOKIE[self::COOKIE_ID])) {
return [];
}
$cookie = $_COOKIE[self::COOKIE_ID];
return unserialize($cookie);
}
private function save() {
setcookie(
self::COOKIE_ID,
serialize($this->settings),
$this->expires
);
}
} | 0.992188 | high |
sugar/service/v2/SugarSoapService2.php | tonyberrynd/SugarDockerized | 0 | 5086328 | <?php
if(!defined('sugarEntry'))define('sugarEntry', true);
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
/**
* This is a service class for version 2
*/
require_once('service/core/NusoapSoap.php');
class SugarSoapService2 extends NusoapSoap{
/**
* This method registers all the functions which you want to be available for SOAP.
*
* @param array $excludeFunctions - All the functions you don't want to register
*/
public function register($excludeFunctions = array()){
$GLOBALS['log']->info('Begin: SugarSoapService2->register');
$this->excludeFunctions = $excludeFunctions;
$registryObject = new $this->registryClass($this);
$registryObject->register();
$this->excludeFunctions = array();
$GLOBALS['log']->info('End: SugarSoapService2->register');
} // fn
} // clazz
?>
| 0.898438 | high |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 0