blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
dc076a6300e9b2550daf858fa19d9cbe847c3ebb | PHP | bernardladenthin/snowman | /snowman-php-server/class/Ajax.php | UTF-8 | 11,439 | 2.53125 | 3 | [] | no_license | <?php
/**
* snowman-php-server - PHP script to run a snowman server.
* https://github.com/bernardladenthin/snowman
*
* Copyright (C) 2013 Bernard Ladenthin <bernard.ladenthin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public ... | true |
e9132217869cfd90fcc0cbe1cdb827c848d2855d | PHP | nfqakademija/mos | /src/Services/UserManager.php | UTF-8 | 2,057 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
class UserManager
{
/**
* @var EntityManagerInterface ... | true |
b34e193cffb84084af9b92a73a407318c066e1ab | PHP | reinink/Roundabout | /src/Reinink/Roundabout/Router.php | UTF-8 | 4,427 | 2.765625 | 3 | [] | no_license | <?php
namespace Reinink\Roundabout;
class Router
{
protected $request;
protected $instantiation_callback;
protected $routes;
public function __construct(\Symfony\Component\HttpFoundation\Request $request, callable $instantiation_callback = null)
{
$this->request = $request;
$this-... | true |
f47a3e2999b64daba6c2dddc951a130970d2dd60 | PHP | maxmasetti/docker-lamp | /www/index.php | UTF-8 | 689 | 2.84375 | 3 | [
"MIT"
] | permissive | <pre>
<?php
#phpinfo(); die;
$db = mysqli_connect("db", "root", "root", "books");
if (!$db) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
echo "Success: A proper... | true |
c2e47bea23b074de654e5c73081cab514080a68a | PHP | jstnhuang/webdev101 | /www/courses/html-basics/index.php | UTF-8 | 1,956 | 2.578125 | 3 | [] | no_license | <?php
require_once($_SERVER["DOCUMENT_ROOT"]."/../webdev101.php");
?>
<!doctype html>
<html>
<head>
<?php $head = new HeadWidget();
echo $head->setTitle("Web Dev 101")
->addCss(array("webdev101-2.css", "courses.css", "whiteboard.css"))
->addScript(array("jquery.js", "jquery.tabo... | true |
1654ed8817fe7adb1d3da1de476b44b0a1ea1842 | PHP | yawik/JobsByMail | /src/Options/SubscribeOptions.php | UTF-8 | 2,205 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @filesource
* @copyright (c) 2013 - 2017 Cross Solution (http://cross-solution.de)
* @license MIT
* @author Miroslav Fedeleš <miroslav.fedeles@gmail.com>
* @since 0.29
*/
namespace JobsByMail\Options;
use Core\Options\FieldsetCustomizationOptions;
class SubscribeOptions extends FieldsetCustomization... | true |
55ea5db2ff889d4ea941a4ef534411c735c076bb | PHP | KevinGurden/PHP-for-RDS | /php/getSongs.php | UTF-8 | 1,422 | 3.015625 | 3 | [] | no_license | <?php
/*
* Get a list of songs
*/
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
if(isset($_GET['limit'])) {
$lim = $_GET['limit'];
} else {
$lim = "25";
};
// Array for JSON response
$response = array();
require_once __DIR__ . '/db_config.php';
// connecting to db
... | true |
3067c5c3b7c7be472b1329ff718d6dd0e0a701e8 | PHP | dadansatria/kelas-pdo | /buku.php | UTF-8 | 1,158 | 2.8125 | 3 | [] | no_license | <?php
require_once "koneksi.php";
/**
* Object Buku
*/
class Buku extends Koneksi
{
public function findAllBuku()
{
$db = $this->getKoneksi();
$query = $db->prepare('SELECT * FROM buku');
$query->execute();
return $query->fetchAll();
}
public function findOneBuku($id)
{
$db = $this->getKoneksi();... | true |
62860d37bcc3eabbf9e73d58e80ee0b8f5cf92d1 | PHP | tinyuky/backendcap2 | /database/migrations/2018_05_26_170912_create_r2.php | UTF-8 | 2,114 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateR2 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('grades', function (Bluepr... | true |
cd4b941413b0a6212d44b8e8d1788692627caded | PHP | vinh123xhn/PHP-Abstract | /book/function_book/addnew.php | UTF-8 | 523 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tu
* Date: 21/09/2018
* Time: 16:55
*/
require __DIR__."/../class/Book.php";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$nameBook = $_POST['book_name'];
$nameAuthor = $_POST['author_name'];
$idCategory = $_POST['category_id'];
$data = [
'nameBo... | true |
b4f0092dc505d4e99d439a4b4e84090d622c45a4 | PHP | hendrilubis/ecom1_ci | /application/controllers/account/logout.php | UTF-8 | 509 | 2.578125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Logout extends MY_Controller
{
public function index()
{
$user = array('id' => NULL,
'type' => NULL,
'is_expired' => NULL,
);
// We don't want to... | true |
cd4458d21c9417939194344ae71d0c014042f52b | PHP | Mirocow/yii2-elasticsearch | /src/components/queries/helpers/ScriptHelper.php | UTF-8 | 2,294 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace mirocow\elasticsearch\components\queries\helpers;
/**
* Class ScriptHelper
* @package mirocow\elasticsearch\components\queries\helpers
*
* @see https://www.elastic.co/guide/en/elasticsearch/painless/5.6/painless-examples.html
* @see https://docs.oracle.com/javase/specs/jls/se8/html/index.html
*/
... | true |
46a5875a0c7441ca59b4377cc7a555235f4230b4 | PHP | mubeenamanat100/applications | /crud/modify-controller.php | UTF-8 | 903 | 2.640625 | 3 | [] | no_license |
<?php
if(isset($_POST['userid'])
){
$userid = $_POST['userid'];
$username = $_POST['username'];
$age = $_POST['age'];
$usercontact=$_POST['usercontact'];
$moidef = $_POST['moidef'];
$servername="localhost";
$dbname = "dbname=crud";
$dbusername ="root";
... | true |
22e611f1692f0a820bceb60284bf193d2490c3cc | PHP | web-like/table | /app/Common/Crawling.php | UTF-8 | 814 | 2.875 | 3 | [] | no_license | <?php
namespace App\Common;
class Crawling {
public static function getPage($url) {
$curl = curl_init();
// 设置你需要抓取的URL
curl_setopt($curl, CURLOPT_URL, $url );
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53... | true |
c081dd61108698cabc27e0ccff4594f4915ca963 | PHP | harikt/web.expressive | /src/Renderer/Chart/ChartControlRenderer.php | UTF-8 | 3,292 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Dms\Web\Expressive\Renderer\Chart;
use Dms\Common\Structure\DateTime\Date;
use Dms\Common\Structure\DateTime\DateTime;
use Dms\Common\Structure\DateTime\TimeOfDay;
use Dms\Core\Module\IChartDisplay;
use Dms\Core\Table\Chart\IChartDataTable;
use Dms\Core\Table\Chart\Structure\G... | true |
6056b40ef1a64f07181adca091bbb6e70b19304d | PHP | Sanjupal3066/IT_Project | /houseRental/HousePrint.php | UTF-8 | 2,588 | 2.53125 | 3 | [] | no_license | <?php
//AJAX CODE
echo "<script>
function showData(str) {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
//Making the Connection
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
//Making the Connection
xmlhttp = ... | true |
bc20cdb738755bdca5807712990e8a4aee5ef0f6 | PHP | siimliimand/custom-api-v1 | /src/Repository/TranslationRepository.php | UTF-8 | 1,415 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\DB\DB;
class TranslationRepository
{
public const TABLE_NAME = 'translations';
/**
* @param string $key
* @param int $languageId
* @return string|null
*/
public static function get(string $key, int $languageId): ?string
{
$tableName... | true |
187fdae683e58347460656e0d32df4936a9088d1 | PHP | luffy94608/business_cloud | /app/Repositories/AnalysisRepositories.php | UTF-8 | 781 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: luffy
* Date: 20/02/2017
* Time: 10:48
*/
namespace App\Repositories;
use App\Models\BusinessAnalysis;
use App\Models\CompanyAnalysis;
class AnalysisRepositories
{
/**
* 企业分析
* @param $data
* @return bool
*/
... | true |
27541c01cf00d5f5fa1791167823eb31d1dcf355 | PHP | jzeballosd/testPhpJMZD | /.class/ChangeString.php | UTF-8 | 887 | 3.34375 | 3 | [] | no_license | <?php
class ChangeString{
public static function build($palabra){
$arrayPalabra = str_split($palabra);
$abecedario = explode(","," ,a,b,c,d,e,f,g,h,i,j,k,l,m,n,ñ,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,Ñ,O,P,Q,R,S,T,U,V,W,X,Y,Z");
$nuevaPalabra = array();
foreach ($... | true |
407adc0f6979a02ed3265628cdb832cc5a045e7c | PHP | yasyar/tugas-pkl | /admin/upload.php | UTF-8 | 1,612 | 2.765625 | 3 | [] | no_license | <?php
include("../config/database.php");
include("../Classes/PHPExcel/IOFactory.php");
$file = $_FILES['import']['name'];
$extensionList = array("xls","xlsx","XLS","XLSX");
$pecah1 = explode(".", $file);
$dir = "../assets/";
$ekstensi1 = $pecah1[1];
if (in_array($ekstensi1,$extensionList)) {
$tmp1 = $_FILES['import'... | true |
984eebc3f1670550ec86b70a9d76fadf8fe6f78d | PHP | RuzaikMh/Child-Tracking-Web-Server | /vendor/ktamas77/firebase-php/src/firebaseLib.php | UTF-8 | 6,837 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Firebase;
require_once __DIR__ . '/firebaseInterface.php';
use Exception;
/**
* Firebase PHP Client Library
*
* @author Tamas Kalman <ktamas77@gmail.com>
* @url https://github.com/ktamas77/firebase-php/
* @link https://www.firebase.com/docs/rest-api.html
*/
/**
* Firebase... | true |
5234817440c9e77e5ba6bbb00281848f9290672b | PHP | kingpluspk/acm | /select_sort.php | UTF-8 | 1,133 | 3.703125 | 4 | [] | no_license | <?php
// 选择排序:在一组数中找出最小的那个数与第一个数交换位置,在剩下的数种再找出最小的与第二个位置的数交换
// 从小到大排序
function select_sort($arr){
$len = count($arr);
// 双重循环,外层控制轮数,内层控制比较次数
for($i = 0; $i < $len - 1; $i++){
// 假设最小的值的位置
$least = $i;
for($j = $i + 1; $j < $len; $j++){
... | true |
7bad85dfe8919a680420c2ded42cafeaec46318e | PHP | MegzKay/Mini_Auction | /include/AuctionItem.php | UTF-8 | 3,362 | 3.015625 | 3 | [] | no_license | <?php
/**
* Description of AuctionItem
*
* @author cst228
*/
class AuctionItem {
protected $itemID;
protected $ownerID;
protected $title;
protected $desc;
protected $start;
protected $duration;
protected $minBidPrice;
protected $type;
protected $totalBid;
public functio... | true |
27dcb7e627dc9ff68278aa1946e877a0835fa997 | PHP | samhol/samiholck.com | /sphp/php/Sphp/Html/Foundation/Sites/Buttons/SplitButton.php | UTF-8 | 3,444 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
*/
namespace Sphp\Html\F... | true |
371b50e36d2ddf3461028f0d283f5bf96a435be2 | PHP | mikoczy/crm-scenarios-module | /src/model/Repository/ElementElementsRepository.php | UTF-8 | 1,113 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Crm\ScenariosModule\Repository;
use Crm\ApplicationModule\Repository;
use Crm\ApplicationModule\Repository\AuditLogRepository;
use Nette\Caching\IStorage;
use Nette\Database\Context;
class ElementElementsRepository extends Repository
{
protected $tableName = 'scenarios_element_elements';
pub... | true |
fe0841f9f85ed26a3423db951b559ead1d23295c | PHP | RoarG/IT1901-SIM | /login.php | UTF-8 | 1,208 | 2.9375 | 3 | [] | no_license | <?php
/*
* File: login.php
* Holds: The file for logging into the simulator
* Last updated: 23.10.13
* Project: Prosjekt1
*
*/
//
// Include and intiate base
//
require_once 'base.php';
$base = new Base();
$base->assign('script', 'login.php');
$base->assign('loggedIn', false);
//
// Check if logged in or not
/... | true |
1f69fc746c58f7712330000a2c761a7cb11b3552 | PHP | AlaaHam91/Updated_CRM | /database/migrations/2021_01_15_141431_create_cperson_life_interests_table.php | UTF-8 | 1,121 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCpersonLifeInterestsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cp... | true |
04607eeb14f84ac699d017508df1e66b911044d5 | PHP | mikeludemann/helperFunctions_PHP | /src/Array/Other/getKeyValue.php | UTF-8 | 137 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
function getKeyValue($array){
foreach($array as $key => $value)
{
echo $key . ": " . $value . "\n" ;
}
}
?> | true |
388b7ced68cff37ab3143f96124f7ed8b72a0e58 | PHP | jerryhe0603/o0324 | /inc/model/CAccountsElement.php | UTF-8 | 6,336 | 2.578125 | 3 | [] | no_license | <?php
/*
global:
$oDB
*/
include_once('../inc/model/CElementMapping.php');
Class CAccountsElement extends CGalaxyClass
{
static private $aElementPool = array(); //all element
static private $aOptValPool =array(); //all puppet's element option $aOptValPool[$sAccountsUuid][$iElementMappingNo] is an array of values
p... | true |
e119ec02a5ce4962f36666d834c41f9dffe140a7 | PHP | remluben/rsf | /demo/classes/IpCheckHandler.php | UTF-8 | 667 | 2.84375 | 3 | [] | no_license | <?php
/**
* Checks for blocked ip adresses. Use with HttpAuthFilter 'onLogin' event.
*
* @package demo.classes
* @author Benjamin Ulmer
* @link http://github.com/remluben/rsf
*/
class IpCheckHandler implements IEventHandler
{
private $_blockedIps;
private $_registry;
public function __construc... | true |
97349c87bbae8a58f2316aaa7f43e40d30a4a662 | PHP | ElliotSanchez/mSchoolOnline | /module/Admin/src/Admin/Form/Account/Mclass/Teachers.php | UTF-8 | 2,908 | 2.578125 | 3 | [] | no_license | <?php
namespace Admin\Form\Account\Mclass;
use Zend\Form\Form;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\Input;
use Zend\Validator;
use Admin\Mclass\Service As MclassService;
use Admin\Teacher\Service As TeacherService;
use Admin\Account\Entity As Account;
use Admin\Mclass\Entity As Mclass;
class Teach... | true |
d473e01e1e45e1d1c18a430b7bf5ed8a8d230ee2 | PHP | doanthuvan/imlp_github | /Model/BaseModel.php | UTF-8 | 310 | 2.8125 | 3 | [] | no_license | <?php
namespace Model;
include_once('env.php');
class BaseModel
{
public $conn;
public function __construct()
{
$this->conn = mysqli_connect(ServerName, UserName, Password, DB);
if (!$this->conn) {
die("Connection failed: " . mysqli_connect_error());
}
}
}
| true |
ba99f444890ae009502640814ebe69f9d3493fea | PHP | Wolfernand/CfdiUtils | /tests/CfdiUtilsTests/Validate/ValidateTestCase.php | UTF-8 | 4,137 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace CfdiUtilsTests\Validate;
use CfdiUtils\CadenaOrigen\DOMBuilder;
use CfdiUtils\Cfdi;
use CfdiUtils\Elements\Cfdi33\Comprobante;
use CfdiUtils\Nodes\NodeInterface;
use CfdiUtils\Validate\Assert;
use CfdiUtils\Validate\Asserts;
use CfdiUtils\Validate\Contracts\ValidatorInterface;
use CfdiUtils\Validate\H... | true |
022a3392d743ed1d519cb5c932f7aa44ecbf13e1 | PHP | zhangxuanru/leetcode-cn | /php/1154.php | UTF-8 | 353 | 3.46875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/12/2
* Time: 20:34
*/
class Solution {
/**
* @param String $date
* @return Integer
*/
function dayOfYear($date) {
echo date("z",strtotime($date));
}
}
$class = new Solution();
$date = "2003-03-01";
$date="2019-... | true |
9c3060ecf1103d531555e71072c21734fe5bc033 | PHP | nkl90/yii2-domain | /src/base/Action.php | UTF-8 | 1,321 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace yii2lab\domain\base;
use yii2lab\domain\base\Model;
use Yii;
use yii\base\Action as YiiAction;
class Action extends YiiAction {
public $formClass;
public $titleName;
public $baseUrl;
public $serviceMethod;
public $service;
public $render;
public $view;
public function init()
{
parent::... | true |
7cb115079d1733254e42267e881ff93e92193035 | PHP | Moln/MyZendLibrary | /library/My/Product/Node/Login/Info.php | UTF-8 | 1,223 | 2.671875 | 3 | [] | no_license | <?php
namespace My\Product\Node\Login;
/**
* 登录信息
* Class Info
* @package My\Product\Node\Login
* @author Xiemaomao
* @version $Id: Info.php 790 2013-03-15 08:56:56Z maomao $
*/
class Info
{
public function __construct($id, $account, $gameTime = null, $isAdult = false)
{
$this->id = $id;
... | true |
eb49e4fe0d4c18ebc4e3a9ceb056ee5fd23f855d | PHP | tgamanov/php-examples | /php-basic-examples/51.break_cont.php | UTF-8 | 588 | 3.84375 | 4 | [] | no_license | <?php
/*for ($i = 10; $i <= 20; $i++) {
echo "Check for {$i} ... ";
if ($i % 3 == 0) {
echo 'gotcha! <br>';
continue;
}
echo 'nope <br>';
}*/
//Создать алгоритм для определения первого найденного простого числа в промежутке от 200 до 400.
function if_natural($n){
if($n==0 or $n==1)return false;
for($d=... | true |
d5201eccad846f356d5e20f3fd9dc1984e4c439f | PHP | Nestorbd/Central.U-Ecommerce | /backend/api/api/controllers/direccionController.php | UTF-8 | 2,573 | 2.609375 | 3 | [] | no_license | <?php
require_once 'models/clienteDireccionModel.php';
class DireccionController
{
private $direccion;
public function __construct()
{
$this->direccion = new Direccion;
}
public function getAll()
{
$data = $this->direccion->getDireccion();
exit(json_encode($data)... | true |
eba21c471f1050498890faae743f179cf18a726f | PHP | rafaelscbr/ibiblioteca | /public/actions/livro.php | UTF-8 | 1,525 | 2.546875 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../../src/autoload.php';
function cadastrarLivro($db, $data_alt) {
$livro = new Livro($db);
$livro->setTitulo($_POST['titulo']);
$livro->setDescricao($_POST['descricao']);
$livro->setCategoria($_POST['categoria']);
$livro->setAutor($_POST['autor']);
$livro->se... | true |
dec1373f7597b00aaa0364ae4f1079254c6659e8 | PHP | changhongming/indulab | /app/Http/Controllers/ContestController.php | UTF-8 | 11,997 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use Validator;
use App\Student;
use App\UploadData;
use App\Modeling;
use App\Experiment;
use App\ModelingLabel;
use App\CsvUpload;
use App\ChartLog;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Sche... | true |
011e124c8f4096f99c5cd40b0f9a9b63d573a76a | PHP | fAtsteD/to-do-app | /src/Repository/TasksListRepository.php | UTF-8 | 3,836 | 2.75 | 3 | [] | no_license | <?php
namespace App\Repository;
use Doctrine\ODM\MongoDB\DocumentRepository;
use App\Document\User;
use App\Document\TasksList;
use App\Model\TasksList\UserInListModel;
use App\Model\TasksList\ListModel;
class TasksListRepository extends DocumentRepository
{
/**
* Find all lists is that user can view
... | true |
fd491241ed95cd3ba9c6bc2892ec64a4532f30f4 | PHP | KevinCoworks/schema-org | /SchemaOrg/Mapping/Type/AggregateRating.php | UTF-8 | 1,928 | 2.859375 | 3 | [] | no_license | <?php
namespace SecIT\SchemaOrg\Mapping\Type;
use SecIT\SchemaOrg\Mapping\Property;
/**
* Class AggregateRating.
*
* @method AggregateRating setAuthor(Property\Author $author)
* @method AggregateRating setBestRating(Property\BestRating $bestRating)
* @method AggregateRating setRatingValue(Property\RatingValue ... | true |
a73d501996ced3bddc82140d934192dfe7742a40 | PHP | rodrigo-a-magalhaes/Neppo | /Controller/question_2.class.php | UTF-8 | 705 | 3.53125 | 4 | [] | no_license | <?php
class question_2
{
private $Data;
private $Result;
function __construct($date)
{
if (!empty($date)) {
$this->Data = explode(' ', $date);
$this->CheckDate();
} else {
$this->Result = '<p>Favor informa data, no seguinte formato -> DD MM AAAA
... | true |
5f56911d144ab87dae46c270f72c118a517934bc | PHP | ZygeSam/crime_reporting | /police_command/command_dept.php | UTF-8 | 2,089 | 2.515625 | 3 | [] | no_license | <?php
require_once('../models/Connection.php');
include_once("../header.php");
if(isset($_GET['cid']) && isset($_GET['did']) ){
$cid = $_GET['cid'];
$pid = $_GET['pid'];
$did = $_GET['did'];
$comdepts=$conn->getBySql("SELECT * FROM police_command_areas INNER JOIN command_dept ON police_co... | true |
ff1f6ca19ca978138ddd358aa99958cb6ff54550 | PHP | Samyouvi/KeysManager_Web | /KeysManager_Web_new5/models/VO/RoomVO.php | UTF-8 | 416 | 3.03125 | 3 | [] | no_license | <?php
class RoomVO
{
// PRIMARYKEY
protected $id_room;
// Parametres
protected $name;
// PRIMARYKEY
public function setId($id) {
$this->id_room = $id;
}
public function getId() {
return $this->id_room;
}
// Parametres
public function setName($name) {
... | true |
eb8a16745372d1f27b2683bc5a998c48b3e7abba | PHP | vargas1987/tour-travel | /src/AltezzaTravelBundle/Entity/AbstractCalculationDay.php | UTF-8 | 2,350 | 2.515625 | 3 | [] | no_license | <?php
namespace AltezzaTravelBundle\Entity;
use AltezzaTravelBundle\Entity\Traits\CreateUpdateEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="type", type="string", length=32)
* @ORM\DiscriminatorMap({
* "safari": "CalculationDaySafari"
* }... | true |
95c110c204c885c53f7cbefc146eb163074a15bc | PHP | lulco/rector-nette | /src/FileProcessor/NeonFileProcessor.php | UTF-8 | 1,166 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Rector\Nette\FileProcessor;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\ValueObject\Application\File;
use Rector\Nette\Contract\Rector\NeonRectorInterface;
final class NeonFileProcessor implements FileProcessorInterface
{
/**
* @param ... | true |
1f53f35cc97b2999115dee08b4229eb7af96172e | PHP | jdavis916/roar-project | /wp-content/plugins/blog-designer-pack-pro/includes/admin/class-bdpp-taxonomy.php | UTF-8 | 3,614 | 2.71875 | 3 | [] | no_license | <?php
/**
* Category / Taxonomy Class
*
* Handles the Category / Taxonomy related functionality
*
* @package Blog Designer Pack Pro
* @since 1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class BDPP_Taxonomy {
function __construct() {
// Getting allowed taxonomy
$allowed_t... | true |
cb59c3803160ad327078b1dc6dac5febbbbc792e | PHP | lucgbrl/CompiladoProjetoFinalTCC | /enviar.php | UTF-8 | 1,572 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
error_reporting(E_ALL & ~E_NOTICE);
if(isset($_POST['submit']))
{
#code...
#informações sobre o arquivo
$file = $_FILES['file'];
$fileName = $_FILES['file']['name'];
$fileTmpName = $_FILES['file']['tmp_name'];
$fileSize = $_FILES['file']['size'];
... | true |
eb4387c781c686490f145d0f6998d2ffcb69579c | PHP | jonquintero/minesweeper-jon | /app/Http/Controllers/GameController.php | UTF-8 | 3,075 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Game;
use App\Http\Requests\NewGameRequest;
use App\RowColumnRevealed;
use App\SetRandomMine;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class GameController extends Controller
{
/**
* * @ApiDescription(create a game)
* @param NewGameRequest... | true |
a7b3c599e0593d9341b6dacbbfd76f9f1386123d | PHP | kamalmstp/hrms_2 | /app/Database/Migrations/2021-01-28-120952_jabatan.php | UTF-8 | 745 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class Jabatan extends Migration
{
public function up()
{
$this->forge->addField([
'jabatan_id' => [
'type' => 'INT',
'constraint' => 5,
'auto_increment' => true
],
'nama' => [
'type' => 'VARC... | true |
83e23083336ecd09ff16f59092c20a27c551ac45 | PHP | greenscar/caffeinewebdesign | /from_food/php/Site_Info_2.0_ODBC/print_amenity_list.php | UTF-8 | 6,401 | 2.5625 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>Shari's Store List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="./inc_files/print_template.css"/>
</head>
<body>
<?php
$num_... | true |
72fb2c9c406a334476f74263f0f369ed7c0905c6 | PHP | garkbit/Codename-GL | /includes/shortcodes.php | UTF-8 | 2,068 | 2.53125 | 3 | [] | no_license | <?php
/**
* Shortcodes bundled for use with themes. These shortcodes are not meant to be used with the post content
* editor. Their purpose is to make it easier for users to filter hooks without having to know too much PHP code
* and to provide access to specific functionality in other (non-post content) shor... | true |
8decd3c27d95945a7a15524db35f404aff883421 | PHP | cretz/meh | /src/Meh/Lua/Ast/FunctionCall.php | UTF-8 | 633 | 3.109375 | 3 | [] | no_license | <?php
namespace Meh\Lua\Ast;
class FunctionCall extends Node implements Statement, PrefixExpression
{
/** @var PrefixExpression */
public $prefixExpression;
/** @var ArgumentList */
public $arguments;
/** @var Name|null */
public $name;
/**
* @param PrefixExpression $prefixExpressio... | true |
c43a9c488aec98d3f3a44863c37c03e37f446e09 | PHP | katarinakall/htmlphp | /src/functions.php | UTF-8 | 2,417 | 3.328125 | 3 | [] | no_license | <?php
/**
* Definitions of commonly used functions.
*/
function sessionDestroy()
{
// Unset all of the session variables.
$_SESSION = [];
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("ses... | true |
30bce5976c44cea50fa79ac35955715a8a07bad2 | PHP | aaksn/practice_2 | /EXCELopen.php | UTF-8 | 3,762 | 2.734375 | 3 | [] | no_license | <?php
include 'dbconn.php';
if (!empty($_POST["courseid"]) && !empty($_POST["subjectid"]) && !empty($_POST["groupid"]) && $_FILES && $_FILES['0']['error'] == UPLOAD_ERR_OK) {
if ($_POST["groupid"] == 'undefined' | $_POST["subjectid"] == 'undefined') {
header("Location: base.html");
exit();
}
... | true |
93ef77c98d9d4a7c64286bcd73d18b298aed8fec | PHP | FiftyNine/ScpperDB | /module/Application/src/Application/Form/SearchForm.php | UTF-8 | 2,659 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Application\Form;
use Zend\Form\Form;
use Zend\InputFilter\InputFilterProviderInterface;
/**
* Description of Sear... | true |
570702626c48e33d175470d6b761ebd6d01b9a6c | PHP | Dobrohotova/dws | /c6.php | UTF-8 | 333 | 3.015625 | 3 | [] | no_license | <?php
// ako stavime vaka vo vlezniot parametar, toa kje ni bide default ako ne stavime parametar koga ja povikuvame funkcijata
function funkcija($in1, $in2 = 'Dobrohotova'){
echo $in1.$in2;
}
$string1 = 'Irina';
$string2 = 'I';
funkcija($string1, $string2);
echo '<br/>';
funkcija($string1);
// funkcija('Zdravo... | true |
44de134b7de0d27f870694431aab2dccf40e47a0 | PHP | L-J-Houghton/PHP | /CW1_PHP/Lab_8/index.php | UTF-8 | 1,167 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// include the html code for the page header
include "templates/header.html";
// include the html code for the navigation bar
include "templates/navigation.html";
// openening a new MySQL database connection
require "includes/db_connect.php";
// require the helper functions script in includes directory.
require "... | true |
f8126b980dce242a600496250763405ebca5511d | PHP | Challenge/website | /Projekter/ProjekterScript.php | UTF-8 | 3,334 | 2.875 | 3 | [] | no_license | <?php
date_default_timezone_set("Europe/Copenhagen");
try {
$dbcon = new PDO('sqlite:upload.db');
$dbcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
/*
* Get the current image to show from the database.
* Assumes there is only one entry in the database at any given time.
*/
$sql = ... | true |
9f2c89838b738631f20930f1f1d829e244ca2a3a | PHP | EricTurner3/Resume2019 | /application/models/abilities.php | UTF-8 | 509 | 3.171875 | 3 | [] | no_license | <?php
//This is the model, the model communicates with the database and performs all of the queries to send back to the controller
class Abilities extends Model{
//Retrieve skills by ranking of stars (by type: Skill, Language or Tool)
public function getInfo($type){
$sql= "SELECT * FROM abilities WHE... | true |
9ba49af5f1e4e4bafc1cc5c5eba5a3ef59864a91 | PHP | thuongto/advance-studio2 | /ajax/categories.ajax.php | UTF-8 | 348 | 2.609375 | 3 | [] | no_license | <?php
include('../autoloader.php');
$cat = new Categories();
$categories = $cat -> getCategories( true );
//inject all categories into the array
$all_categories = array("category_name" => "All categories" , "category_id" => "0");
array_unshift( $categories, $all_categories );
//return the categories as a json
echo js... | true |
7f808c9540182ae9edbaf358052156c60a1bdbdb | PHP | gbili/looks | /module/Scs/src/Scs/Form/Search.php | UTF-8 | 2,841 | 2.703125 | 3 | [] | no_license | <?php
namespace Scs\Form;
class Search extends \Zend\Form\Form
{
protected $validData;
protected $categoryName;
public function __construct($name, array $options=array())
{
parent::__construct($name, $options);
// ... add CSRF and submit elements
// Optionally set your valida... | true |
e8646679cfa00baee062dfd4527ee7429ee2dfe1 | PHP | Odalis26/Proyecto_campania_publicitaria | /campania/client/src/crud_campania/php/formulario.php | UTF-8 | 1,535 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
include "conexion.php";
$user_id=null;
$sql1= "select * from person where id = ".$_GET["id"];
$query = $con->query($sql1);
$person = null;
if($query->num_rows>0){
while ($r=$query->fetch_object()){
$person=$r;
break;
}
}
?>
<?php if($person!=null):?>
<form role="form" method="post" action="php/actualiza... | true |
83162604de535866ab6b545c8c5e1cfd3c966b21 | PHP | Endrju0/biblioteka | /app/Repositories/BaseRepository.php | UTF-8 | 1,126 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Repositories\RepositoryInterface;
use Illuminate\Database\Eloquent\Model;
abstract class BaseRepository implements RepositoryInterface {
protected $model;
/**
* Get all records in a table with optional column selection
*/
public function getAll($column... | true |
ee27c53b2780fac03066c762e9fec2182c3eb61c | PHP | IgrisUVG/ASH-MINI | /data/menuRlist.php | UTF-8 | 2,643 | 2.609375 | 3 | [] | no_license | <?php
// Построение из массива древовидного списка без использования рекурсии
$menu=array(
1=>array('name'=>'Овощи', 'parent'=>0),
6=>array('name'=>'Капуста', 'parent'=>1),
7=>array('name'=>'Помидоры', 'parent'=>1),
9=>array('name'=>'Салат', 'parent'=>1),
... | true |
3e230f6e3376baa5591df41ebe2c2d2e58bb55bf | PHP | scantee/scantee | /application/library/printfection-api/uploading.php | UTF-8 | 3,633 | 2.90625 | 3 | [] | no_license | <?php
require "config.php";
require "lib/PFAPI.php";
// Set this to the direct path of the image on your web server
// Your webserver must be able to access this image so ensure the permissions are set correctly on the image file
$image_path = 'public/images/tmp/qr-code.png'; // Set your image path he... | true |
2d7661e73b6ae0a1ca3605d44eeb280a8b310452 | PHP | DocKob/PHP-Games-Archives | /Isalow/pages/forum_sujet.php | UTF-8 | 4,705 | 2.828125 | 3 | [] | no_license | <?php $forum = $_GET['forum']; ?>
<table width="670" border="0" align="center" cellpadding="0" cellspacing="0" class="txt">
<tr>
<td><a href="jeu.php?include=forum_nouveau&forum=<? echo($forum); ?>"><img src="images/bout_forum_nouveau.gif" width="70" height="20" border="0"></a></td>
</tr>
</table>
<br>
<?php
$nbr =... | true |
c80319f4c31557700fb952d3620359cde64a3af2 | PHP | dulonbora/agp_sms | /model/Model_Group.php | UTF-8 | 2,776 | 2.734375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Model_Group
*
* @author Dulon
*/
class Model_Group {
public function __construct() {... | true |
0385ea68563d4687ca18646d6a4fb25ffc5a0fc9 | PHP | frafu/liederliste | /web/inc/functions.php | UTF-8 | 1,325 | 2.84375 | 3 | [] | no_license | <?php
define("JSON_SETTINGS", __DIR__ . "/../settings/settings.json");
define("SYNC_COMMAND", __DIR__ . "/../scripts/syncrasperries");
define("LIST_COMMAND", __DIR__ . "/../scripts/listrasperries");
define("RESET_COMMAND", __DIR__ . "/../scripts/reset");
/**
* @return string settings... | true |
f3abbf529de758b8a3f1b4ddad0bead3506ff86b | PHP | digidip/url-rewriter | /src/Contracts/CircuitBreakerAdapter.php | UTF-8 | 845 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace digidip\Contracts;
interface CircuitBreakerAdapter
{
public const DIGIDIP_CHECK_URL = 'https://visit.digidip.net/digi-health-check.php';
function getCircuitState(): bool;
function setCircuitToOpen(): void;
function setCircuitToClosed(): void;
function registerFailure(int $maxFail... | true |
d44b7b3cbffac63b6fb6c8ff36a0685b25555fb0 | PHP | BmOnhdPj/Work | /SQL Injection/pg_query.php | UTF-8 | 400 | 2.53125 | 3 | [] | no_license | <?php
$conn = pg_pconnect("host=localhost port=5432 dbname=eshop user=postgres password=P0s_sw0rd");
if (!$conn) {
echo "Could not connect.\n";
exit;
}
$result = pg_query($conn, "SELECT * FROM users WHERE \"name\"='" . $_GET['name'] . "'");
if (!$result) {
echo "Произошла ошибка.\n";
exit;
}
while ($row = pg... | true |
1c8b2ad65117366ba6e04905facf1b41d6dae67b | PHP | duynguyen212/web_programming | /php_projects/stock_system/php_action/fetchProduct.php | UTF-8 | 1,949 | 2.640625 | 3 | [] | no_license | <?php
require_once 'core.php';
$sqlStr = "SELECT product.product_id, product.product_name, product.product_code, product.product_image, brands.brand_name,
category.categories_name, product.quantity, product.rate, product.status
FROM product
INNER JOIN brands ON product.brand_id = brands.brand_id
I... | true |
71bf765dc7de3cb3366c1a707143649fe58b8664 | PHP | thanhtham010891/php-profiler | /src/html/public/index.php | UTF-8 | 279 | 3.484375 | 3 | [] | no_license | <?php
function run()
{
$i = 0;
while ($i < 100) {
$i = mt_rand(1, 101);
}
if ($i < 9) {
return 0;
}
return mt_rand(9, $i);
}
$i = mt_rand(8888, 9999);
$randomStr = "";
while ($i > 0) {
$randomStr .= run();
$i--;
}
echo 'Done!!'; | true |
7c97fed5c51d46798866acc8ecebbb58c9bf036e | PHP | powersrc/amazon-advertising-api | /src/Models/RequestParams/KeywordBidRecommendationParams.php | UTF-8 | 1,181 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace PowerSrc\AmazonAdvertisingApi\Models\RequestParams;
use PowerSrc\AmazonAdvertisingApi\Models\Lists\BidRecommendations\BidRecommendationsCreateList;
class KeywordBidRecommendationParams extends RequestParams
{
/**
* The list of parameter names and default values.
... | true |
200d5caa158710805ef872adc4844ec7d458fedb | PHP | toka-io/toka-old | /app/src/service/SearchService.php | UTF-8 | 684 | 2.703125 | 3 | [] | no_license | <?php
require_once('repo/SearchRepo.php');
class SearchService
{
public static function searchChatroomsByName($name) {
$searchRepo = new SearchRepo(false);
$result = $searchRepo->searchChatroomsByName($name);
if (isset($result['error']))
return array();
... | true |
748792b87e5a962d12a01c4df58a31fa9383711d | PHP | PinkyUni/Yom-web | /application/models/recipe_edit_model.php | UTF-8 | 2,975 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Anya
* Date: 03.05.2019
* Time: 0:28
*/
class Recipe_Edit_Model extends Model
{
public function get_data($id)
{
$recipe = $this->get_recipe($id);
$data = array(
'recipe' => $recipe,
);
return $data;
}
private fun... | true |
5f7cc5f5b7c51eb0777fbb5954f1c7c0f25aa3b2 | PHP | makafuifie/FindMe | /reservation.php | UTF-8 | 751 | 2.796875 | 3 | [] | no_license | <?php
include_once("dbConnect.php");
class reservation extends dbConnect{
function addReservation($name, $phone, $address, $website, $user){
$strQuery = "insert into reservations set
placeName = '$name',
placeAddress = '$address',
website = '$website',
phoneNumber = '$phone',
userID = $user... | true |
3da9e5ef4510f86cee88e9313221ab768b7c8592 | PHP | mfrost503/wheedle | /src/Wheedle/OptionsFilter.php | UTF-8 | 762 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wheedle;
/**
* A trait to handle the filtering of query string params
*
* @author Matt Frost <mfrost.design@gmail.com
* @license MIT http://opensource.org/licenses/MIT
* @package Wheedle
*/
trait OptionsFilter
{
/**
* Method to filter out any unavailable parameters
*
* @param A... | true |
20bdc4634042f1bf73b17e93c81d913cfa757779 | PHP | Sebastien-M/Knowledgewebsite0.2 | /classes/Upvotes.php | UTF-8 | 517 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Upvotes
*
* @author seb
*/
class Upvotes {
protected $article;
protected $author;
protecte... | true |
091beb1031ccc31972d699a7fb781542469e35c3 | PHP | mapshub/TCache | /src/TCache/Criterias/Criteria/Values/Value.php | UTF-8 | 1,408 | 2.96875 | 3 | [] | no_license | <?php
namespace TCache\Criterias\Criteria\Values;
use TCache\Criterias\Criteria;
class Value
{
/** @var Criteria */
private $criteria;
private $sid;
private $text;
function __construct($sid, $text, $criteria)
{
$this->sid = $sid;
$this->text = $text;
$this->criteria ... | true |
fb0530c1a2d78d77d9dbb8705037ad4942078d86 | PHP | guywithprtzl/OMTS | /homePage.php | UTF-8 | 1,218 | 2.703125 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<body>
<h3>Login confirmed.</h3>
<?php
$dbh = mysqli_connect('127.0.0.1', "root", "", "themovies");
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$loginID = $_POST["userID"];
$passwordHash = $_POST["password"];
$query = mysqli_query($dbh,"se... | true |
b0d81301cb3e37bdab2c999fafdde6c84086d136 | PHP | TungNguyen205/connecting | /app/Model/PinterestBoardModel.php | UTF-8 | 739 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
/**
* Class PinterestBoardModel
*
* @package App\Models
*/
class PinterestBoardModel extends Model
{
public $incrementing = false;
/**
* @var string
*/
protected $table = 'pinterest_board';
/**
... | true |
1d43ad220e2ea9136c28faa02abe60dd1bd75f96 | PHP | Anton-Patokin/web-backend-oplossingen | /SESSION hASSAN/session.php | UTF-8 | 510 | 2.6875 | 3 | [] | no_license | <?php $name= array();
session_start();
if(isset($_POST["name"]==""){
setcookie("todo",$_POST["name"],time()+3600);
}
$_SESSION["todo"][0]="anton";
$_SESSION["todo"][1]="anton";
$_SESSION["todo"][2]="anton";
if(isset($_POST["name"])){
$_SESSION["todo"][]=$_POST["name"];
}
var_dump($_SESSION);
?>
<!DOCTYPE ... | true |
d56cef0bcf3e34fad913647e58bdb3944af4d42a | PHP | snomannaseem/pms | /app/Repositories/ActionsRepo.php | UTF-8 | 3,908 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
#namespace BusinessLogic;
namespace App\Repositories;
use Doctrine\ORM\Query;
use LaravelDoctrine\ORM\Facades\EntityManager;
use App\Repositories\BaseRepo;
use App\Entities\Actions;
use Validator;
class ActionsRepo extends BaseRepo{
// Basic Methods
// public static function check(){
// print "hello w... | true |
7081868281ac87989bf67e528b653d7d2abe9af8 | PHP | adrianpisabarrogarcia/php-introduction-exercises | /01-introduccion/ejercicio22.view.php | UTF-8 | 251 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Ej22</title>
</head>
<body>
Encuentra Islandia:
<?php
echo foundElementArray($countries, "Islandia");
?><br>
Encuentra Rumanía:
<?php
echo foundElementArray($countries, "Rumanía");
?><br>
</body>
</html> | true |
67a18362789413690f1e474067b0aba28c5141ac | PHP | veselin-istatkov/php-homeworks | /HW_01/homework_1.php | UTF-8 | 1,034 | 3.4375 | 3 | [] | no_license | <head> <link href="style.css" type="text/css" rel="stylesheet"/> </head>
<form action="Homework_1.php" method="get">
<input type="text" name="number">
<input type="submit" value="Enter">
</form>
<?php
function is_prime($n) {
for($i = 2; $i < sqrt($n); $i++) {
if($n % $i == 0) retu... | true |
64f426b2061178783fc549364c0f582a53ba6af2 | PHP | rahulyhg/espace-createur | /app/Controller/WebsitesController.php | UTF-8 | 991 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Websites Controller
* By: Louis <louis@ne02ptzero.me>
*/
class WebsitesController extends AppController {
public function beforeFilter() {
parent::beforeFilter();
if (AuthComponent::user('type'))
$this->redirect("/");
}
/**
* Add a Website function
*/
public function ... | true |
e70337d799446ea507a23688ae51e2474ce081c1 | PHP | skiredon/php-slack-test | /Main.php | UTF-8 | 2,230 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__.'/vendor/autoload.php';
require "Utils.php";
use Slack\User;
use Slack\ChannelInterface;
#https://hooks.slack.com/services/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
$loop = React\EventLoop\Factory::create();
#$client = new \Slack\ApiClient($loop);
$client = new Slack\RealTimeClient($loop);
... | true |
3d70ebe783222f1af04957f8f6c06b3e927142b3 | PHP | thunderseven659/Data-Stock-Project | /app/User.php | UTF-8 | 664 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
protected $table= 'user';
protected $primaryKey= 'username';
protected $fillable= ['username','email','password','r... | true |
f9f8f75eafb07e4090671da7776055e975c4b125 | PHP | rahulyhg/moneyzaurus-api | /web/app/src/Service/Predict/Price.php | UTF-8 | 2,743 | 2.875 | 3 | [] | no_license | <?php
namespace Api\Service\Predict;
use Doctrine\ORM\EntityManager;
use Api\Service\AccessorTrait;
/**
* Class Price
*
* @package Api\Service\Predict
*
* @method Price setEntityManager(EntityManager $entityManager)
* @method EntityManager getEntityManager()
*/
class Price
{
use AccessorTrait;
... | true |
b60f2e170caad24606ae4f97c8a8ba7c48d3310b | PHP | van-kazin/ncubeicms | /database/migrations/2021_09_05_051638_create_church_settings_table.php | UTF-8 | 970 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateChurchSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('church_s... | true |
2e699115c1142d6a96b54cfc91cd875e9f7091a6 | PHP | eser/pullyn | /functions.php | UTF-8 | 447 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
$config = include "config.php";
$directoryIterator = new DirectoryIterator($config["directory"]);
$directories = array();
foreach ($directoryIterator as $file) {
$filename = $file->getFilename();
if ($filename[0] === ".") { // $tFile->isDot()
continue;
}
if (!$file->isDir()) {
... | true |
711b04b126e01de1d125b4a055cc65e4d1ac3536 | PHP | aungzawpyae/LaravelVue3 | /app/Console/Commands/Install/CreateRole.php | UTF-8 | 1,143 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Console\Commands\Install;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use App\Models\Role;
use App\Models\Permission;
class CreateRole extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'make... | true |
061f119930c372c8203c5660f63f159d21db6e16 | PHP | MateusM7/MasterProflot | /app/Http/Controllers/ProfessorController.php | UTF-8 | 2,671 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace MasterProflot\Http\Controllers;
use Illuminate\Http\Request;
use MasterProflot\Http\Requests;
use MasterProflot\Http\Controllers\Controller;
use MasterProflot\Repositories\ProfessorRepository;
use MasterProflot\Http\Requests\AdminProfessorRequest;
class ProfessorController extends Controller
{
... | true |
cc0e68d1d65ad237a8f53bd9e36567b0300801a7 | PHP | raptorjesus93/cst336 | /hw/hw3/functions.php | UTF-8 | 2,802 | 2.90625 | 3 | [] | no_license | <?php
function displayGame(){
global $boxes;
for($i = 1; $i < 10; $i++){
echo "<select name='category$i' class='text'>";
echo "<option value='$boxes[$i]'>$boxes[$i]</option>";
echo "<option value='x'>X</option>";
echo "<option value='o'>O</option>";
echo "</select>";
if ($i % 3 == 0){
ech... | true |
5f1b2d5808d4e7d51d5d109edf12cc1994bf0492 | PHP | romanekhlakov/cmtt-ru-vacancy-backend | /src/backend/service/AdsController.php | UTF-8 | 1,343 | 2.65625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace service;
use service\Service;
class AdsController extends Service
{
public function create(array $arrayToValidate)
{
$validationObject = $this->inputValidator->check($arrayToValidate);
$validData = $this->inputValidator->callMethod($validationObject, '... | true |
52cec935adafabbde10f3de58b0d8423e17de12d | PHP | RuchitaGanni/php_project | /pagination.php | UTF-8 | 897 | 2.53125 | 3 | [] | no_license | <?php
include('establish.php');
session_start();
$offset=$_POST['offset'];
$limit=$_POST['limit'];
$paginate="SELECT id,name,age,dob FROM users limit ". $limit ." offset ".$offset;
$output=mysqli_query($conn,$paginate);
if($output->num_rows>0){
// while($output->fetch_assoc()){
$dataArray= array();
$i=0;
w... | true |
7e50c9c1d77991974f9a67622cb3da8bdc21e2ae | PHP | MonuBit/loginadmin | /index.php | UTF-8 | 1,531 | 2.9375 | 3 | [] | no_license | <?php
$msg = "";
if(isset($_POST['upload']))
{
$target = "images/".basename($_FILES['image']['name']);
$db = mysqli_connect("localhost","root","root","photos");
$image = $_FILES['image']['name'];
$text = $_POST['text'];
$sql = "INSERT INTO images (image,text) VALUES ('$im... | true |
cee0c18f3aa24e7ab93c30b81e9d970576115d1f | PHP | bmehler/PictureGallery | /applications/ListView/src/Repository/UploadRepository.inc.php | ISO-8859-1 | 621 | 2.890625 | 3 | [] | no_license | <?php
/*
* Ldt ein Bild in das Uploadverzeichnis
*/
function savePicture($user, $name, $format, $size)
{
$dbh = connectToDatabase();
try {
$stmt = $dbh->prepare('INSERT INTO Picture (updated_at, user_id, name, image_format, image_size) VALUES (now(), :user_id, :name, :image_format, :image_siz... | true |