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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9add722af2d262b93aedd5f5fe3049da4a0014b1 | PHP | flooris/resource | /src/Fields/RelationCount.php | UTF-8 | 948 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Flooris\Resource\Fields;
use Illuminate\Support\Str;
class RelationCount extends AbstractField implements CountsRelationField
{
protected string $relationToCount;
public function __construct(string $name, null|string $relation = null, ?string $label = null)
{
$relation = $relatio... | true |
afbb69738ab94e601e2cb6d5c7b7ddf9c0a24134 | PHP | TanZng/patrones-combinados | /4-Patron/php/TexturaSkin.php | UTF-8 | 361 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
class TexturaSkin
{
private $rutaTextura;
function __construct($rutaTextura)
{
$this->rutaTextura = $rutaTextura
}
function getRuta()
{
return $this->rutaTextura;
}
function setRuta($nRuta)
{
$this->rutaTextura = $nRuta;
}
function mostrarTextura()
{
echo "<img src='" .... | true |
0ea7acd21579e304ffd22f4d8215f73216b9fe9c | PHP | SamNicholson/IPFO | /src/Abstracts/DataMapper.php | UTF-8 | 1,062 | 2.609375 | 3 | [] | no_license | <?php
namespace SNicholson\IPFO\Abstracts;
use SNicholson\IPFO\IPRight;
use SNicholson\IPFO\Searches\SearchError;
use SNicholson\IPFO\Parties\Party;
/**
* @property mixed mapped
* @property mixed mappedResponse
*/
abstract class DataMapper
{
protected $mapped;
protected $unmappedResponse;
protected ... | true |
1f3731ceb14ab65a72b02ac79ae34b9d6f58ff4f | PHP | webmechanicx/php.tools | /src/vendor/satooshi/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedExceptionTest.php | UTF-8 | 2,028 | 2.5625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception;
/**
* @covers Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception\RequirementsNotSatisfiedException
*
* @author Kitamura Satoshi <with.no.parachute@gmail.com>
*/
class RequirementsNotSatisfiedExceptionTest extends \PHPUnit_Framework_TestCase
{
... | true |
132d983c740df6b1f949ed22a7c93240621ac416 | PHP | AmineMissaoui/amimal-backend | /src/Entity/Adoption.php | UTF-8 | 1,237 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\AdoptionRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Annotation\ApiFilter;
/**
* @ApiResource()
* @ORM\Entity(repositoryClass=AdoptionReposi... | true |
1817967e3ea6f4fb11e6149e11cc9e517e5e0f42 | PHP | Edenschool-Repos-Wanted/Paris_MVC_Eval | /app/views/articles/index.php | UTF-8 | 1,491 | 2.5625 | 3 | [] | no_license | <?php
require APP_ROOT . '/views/inc/head.php';
require APP_ROOT . '/views/inc/nav.php';
?>
<main>
<div class="container">
<div class="row">
<div class="col-lg-12">
<!-- AFFICHAGE ARTICLE -->
<?php foreach($data['articles'] as $article): ?>
<div class="container-item">
<!-... | true |
27dc7c950add891b972230785354701869b84605 | PHP | mdiaz1010/hormiga | /application/libraries/session/SessionSeguridad.php | UTF-8 | 2,045 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
Libreria dedicada a la Confirmacion de permisos de usuario
* para un metodo o Clase(se verifica en el __constructor)
*
*
* El nivel mas alto de acceso es 1.. y cada numero mayor representa un menor nivel de acceso 2
* el 0 representa qu... | true |
721919829f1a0a25a213cdfbe4db6b51708d2c1a | PHP | KaRtON325/FunctionalTours | /app/Models/Hotel.php | UTF-8 | 1,530 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Database\Factories\HotelFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
... | true |
755c016131fb9a5ed615fe2de6db918072adc49a | PHP | arnoschn/uber-tools | /tests/fixtures/object/Dummy.php | UTF-8 | 447 | 3.265625 | 3 | [] | no_license | <?php
class Dummy
{
public $var1 = 1;
public $var2 = 2;
public $var3 = 3;
public function call1()
{
return __METHOD__;
}
public function call2()
{
return __METHOD__;
}
public function setVar1($value)
{
$this->var1 = $value;
}
public functio... | true |
4cc8f3c16a703bafb256a02f1c990c043d10acd5 | PHP | zyandeep/online-food | /application/controllers/Cart.php | UTF-8 | 2,251 | 2.640625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Cart extends CI_Controller
{
public function index()
{
$this->load->view('includes/header');
$this->load->view('cart');
}
public function get_orders()
{
$this->load->model('bill_model');
$orders = $this->input->post('order', true... | true |
501db2f199c43fd8d588678f298ec392d212ede2 | PHP | Luckum/trip-assistant | /common/models/ServiceContentField.php | UTF-8 | 1,843 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "service_content_field".
*
* @property integer $id
* @property integer $service_id
* @property string $field_type
* @property string $field_id
* @property string $field_label
*
* @property Service $service
* @property ServiceCo... | true |
09e55299b783bb20b4c935d9cedb4fbf4df3ffce | PHP | norbe/ndab | /Ndab/RowFactory.php | UTF-8 | 849 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Ndab
*
* Copyright (c) 2012 Jan Skrasek (http://jan.skrasek.com)
*
* For the full copyright and license information, please view
* the file license.txt that was distributed with this source code.
*/
namespace Ndab;
use Nette,
Nette\Database\Table;
/**
* Ndab selection... | true |
cfafed7898b7ba10d86855a08a1f52e21d3d27e4 | PHP | shaldengeki/tagETI | /global/user.php | UTF-8 | 16,902 | 2.96875 | 3 | [] | no_license | <?php
class User {
public $id;
public $username;
public $tags;
public $managedTags;
public $unManagedTags;
public $lastLoginCheckTime;
public $role;
public $switched_user;
public $dbConn;
public function __construct($dbConn, $id=False, $username=False) {
$this->dbConn = $dbConn;
... | true |
1b22f60cc10abe9370ddb9518d2f348898a65a9d | PHP | tekoraik/trex-yii-artimestamps | /src/TimestampBehavior.php | UTF-8 | 2,838 | 2.859375 | 3 | [] | no_license | <?php
/**
* TimestampBehavior class file
*/
namespace trex\yii\artimestamps;
use yii\db\ActiveRecord;
use yii\base\Behavior;
/**
* TimestampBehavior class
*
* This behavior adds a creation and update timestamps in the Active Record
* when it is created, inserted and updated.
*
* <h4>Usage</h4>
* 1. Add a cr... | true |
894df731bde3e168ad7a966a73bd9dba43890e9f | PHP | wg-cepi/sso | /sso/register.php | UTF-8 | 7,787 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require_once 'Autoloader.php';
use ModuleSSO\Messages;
use ModuleSSO\EndPoint\LoginMethod\ThirdParty\FacebookLogin;
use ModuleSSO\EndPoint\LoginMethod\ThirdParty\GoogleLogin;
Database::init();
function registerUserListener()
{
if(isset($_GET['create']) && $_GET['create'] == 1) {
if... | true |
89e92b39014c882227bdf6eae0fa7ed01b4af9d4 | PHP | chrfritsch/NR_CodingContest_DebtManagement | /app/Controller/LoginController.php | UTF-8 | 2,472 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: fritze
* Date: 26.11.11
* Time: 08:50
* To change this template use File | Settings | File Templates.
*/
namespace Controller;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Silex\ControllerCollection;
class LoginController implements Contr... | true |
080f37f227147d4ff4fc7ddf5011d1b1c926e30f | PHP | stefb965/phabricator | /src/applications/metamta/adapter/PhabricatorMailImplementationAdapter.php | UTF-8 | 2,774 | 2.703125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
abstract class PhabricatorMailImplementationAdapter extends Phobject {
private $key;
private $priority;
private $options = array();
final public function getAdapterType() {
return $this->getPhobjectClassConstant('ADAPTERTYPE');
}
final public static function getAllAdapters() {
return id(ne... | true |
17c5ccf450bf03a13a297fb46bd9496dcb985f1f | PHP | kobaltkween/SimpleBase | /simplebase/QueryBuilder.php | UTF-8 | 8,049 | 3.515625 | 4 | [] | no_license | <?php
namespace Kobalt\SimpleBase;
/* The query builder class. Allows for modular query building, so that queries can be built programmatically.
* The DBManager class uses this class to execute standard queries
*/
class QueryBuilder{
/* The SQL query built
* @var string
*/
public $sql = "";
... | true |
18d3b642ec4542325239757f325b9d61d9ac359d | PHP | n33kos/three.cms | /lib/models/model_admin.php | UTF-8 | 44,818 | 2.671875 | 3 | [
"Unlicense"
] | permissive | <?php
class admin extends Model
{
function __construct()
{
parent::__construct(); // This line is very important
}
}
function initSettings($getID){
global $tpl_settings;
$tpl_settings = getSettings();
}
function initData($getID){
global $tpl_args;
... | true |
b099d8fdb50ea0febf3bb8a0d3db8d2d2fe06814 | PHP | EliasFigueroaG/Conejito_Blanco_yii2_v2 | /models/Hito.php | UTF-8 | 944 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "hito".
*
* @property integer $id_hito
* @property string $descripcion
* @property string $fecha
* @property string $rut_parvulo
*/
class Hito extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static functi... | true |
8f9ddce98cc15c784e6b2627a0521d9d67cac8e5 | PHP | sindastra/CPPaste4 | /src/www/view.php | UTF-8 | 2,894 | 2.6875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* CPPaste4
*
* Copyright (c) 2015 - 2021 Sindastra <https://github.com/sindastra>
* All rights reserved.
*
* The above copyright notice and this notice shall be included in all
* copies or substantial portions of the Software.
*
* See LICENSE file for more info.
*
* @author Sindastra <https://githu... | true |
96dbf2180237770d79fb5e9963679dfd8aaf638b | PHP | pdf4me/pdf4me-clientapi-php | /tests/Pdf4me/API/LiveTests/PdfATest.php | UTF-8 | 1,034 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pdf4me\API\LiveTests;
/**
* PdfA test class
*/
class PdfATest extends BasicTest
{
/**
* Test the use of API 'PdfA/PdfA'
*/
public function testpdfA()
{
$pdfA = $this->client->pdf4me()->pdfA(
[
"document"=> [
'name' => 'tes... | true |
4bcbf0a5ea56c41ae57b579f99366bbd9e300a89 | PHP | barretron/phphaml | /tests/haml/OriginalHamlTests.class.php | UTF-8 | 4,740 | 2.984375 | 3 | [] | no_license | <?php
/**
* Original Haml tests from svn.hamptoncatlin.com. Remember
* phpHaml is not same as original Haml. I must change this
* tests.
*
* @author Amadeusz Jasak <amadeusz.jasak@gmail.com>
* @package phpHaml
* @subpackage Tests.Haml
*/
/**
* Original Haml tests from svn.hamptoncatlin.com. Remember
* phpHa... | true |
907d5cf0659a590a2930502698bdba5ff0ecaee8 | PHP | Anewczs/Stock-Trading-Simulator | /public/buy.php | UTF-8 | 1,899 | 2.640625 | 3 | [] | no_license | <?php
require("../includes/config.php");
if ($_SERVER["REQUEST_METHOD"] == "GET")
{
// else render form
render("buy_form.php", ["title" => "buy"]);
}
else if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if (empty($_POST["symbol"]) || empty($_POST["shares"]))
{
... | true |
5b2e253f01c7182c7563cceed25c7bf404bb6769 | PHP | PhewP/php-intro | /src/hope/week1/ej9.php | UTF-8 | 560 | 3.078125 | 3 | [
"MIT"
] | permissive | <html>
<head>
<title>Excercise 9</title>
</head>
<body>
<?php
$directory = opendir('photos');
while (false !== ($photo = readdir($directory)))
{
if($photo != "." && $photo != "..")
{
echo "<td><a href = ... | true |
106db26bf6486ad2b4a6358b733f39e1189c5cea | PHP | enduser/zendexpressive-session-middleware | /src/Http/Session/SessionMiddleware.php | UTF-8 | 653 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dragonmantank\Http\Session;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
class SessionMiddleware
{
protected $sessionContainer;
public function __construct(SessionContainer $sessionContainer)
{
$this->sessionContainer = $sessionContainer;
... | true |
8edc93e519c593bd3461ac5042937c40befdc4b9 | PHP | DataMincer/DataMincer | /src/Plugins/Fields/Exec.php | UTF-8 | 1,103 | 2.6875 | 3 | [] | no_license | <?php
namespace DataMincerPlugins\Fields;
use DataMincerCore\Plugin\PluginFieldBase;
use DataMincerCore\Plugin\PluginFieldInterface;
/**
* @property PluginFieldInterface exec
* @property PluginFieldInterface[] params
*/
class Exec extends PluginFieldBase {
protected static $pluginId = 'exec';
function getVa... | true |
bcb1168b799f82b3736eea84cac0e7739d03cb46 | PHP | Fishfaceeast/nemo | /htdocs/app/Repositories/DetailRepository.php | UTF-8 | 655 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: yuqian
* Date: 16/5/8
* Time: 下午2:08
*/
namespace App\Repositories;
use App\User;
use App\Detail;
class DetailRepository {
/**
* Get the detail for a given user.
*
* @param User $user
* @return Collection
*/
public function forUser(User $user)
{
$detailC... | true |
f460c955f782fc6aa664509445c8f9c4253875f8 | PHP | ashrafhesham-92/static_json_php5 | /app/library/RequestValidation.php | UTF-8 | 7,940 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\library;
use Validator;
use Illuminate\Http\Request;
class RequestValidation
{
private $request;
private $Validator;
private $request_array;
private $message;
private $result;
public function __construct($request)
{
$this->request = $request;
$this->req... | true |
86bd22e2d3a2bd9c5d60606aa4766bd3894bfad2 | PHP | lbmzorx/yii2-components | /src/action/ErrorAction.php | UTF-8 | 2,592 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace lbmzorx\components\action;
use Yii;
use yii\base\Action;
use yii\base\Exception;
use yii\base\UserException;
/**
* ErrorAction displays application errors ... | true |
6517b095256b428108a98a116c906a5ee9d52b0b | PHP | RodrigoMolina/seminarioPHP | /seminarioPHP/php/altausuario.php | UTF-8 | 2,991 | 2.65625 | 3 | [] | no_license | <?php
session_start();
include ('conect.php');
$link = connectdb();
$_SESSION['error'] = "";
// Valida el nombre de usuario
$cadenaval = "/^[a-zA-Z ñÑáéíóúÁÉÍÓÚäëïöüÄËÏÖÜ\']*$/";
if (isset($_POST['Nombre']) && ($_POST['Nombre'] !== "") && (preg_match($cadenaval, $_POST['Nombre']))){
... | true |
3fb67877ced47cc12eac3219bb24c337b684ef81 | PHP | arik-so/soev | /app/View/Home/index.ctp | UTF-8 | 1,318 | 2.65625 | 3 | [] | no_license | <script type="text/javascript">
<?php if(!$hasLocation){ ?>
function getLocation(){
if (navigator.geolocation){
navigator.geolocation.getCurrentPosition(showPosition);
}
}
function showPosition(position){
location.href = '?lat='+position.coords.latitude+'&lon='+pos... | true |
820b3e57487d4548c02557392e31f70c465cec1a | PHP | kope-i/portfolio_1 | /database/migrations/2020_05_26_190317_create_experimentations_table.php | UTF-8 | 1,233 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateExperimentationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('experi... | true |
8d7eee790026b77f298331e7f3bee4bed28e2754 | PHP | irwtdvoys/bolt | /library/classes/Base.php | UTF-8 | 1,323 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Bolt;
class Base
{
public function __construct($data = null)
{
if ($data !== null)
{
$this->populate($data);
}
}
private function populate($data)
{
$properties = $this->getProperties();
if (count($properties) > 0)
{
foreach ($properties as $property)
{
... | true |
85d05cc558ab2d9e66f083eb7197f971486e4087 | PHP | SophieOps/NeuroWeb | /simu_end.php | UTF-8 | 3,203 | 2.609375 | 3 | [] | no_license | <?php
// On démarre la session AVANT d'écrire du code HTML
session_start();
try
{
// On se connecte à MySQL
$bdd = new PDO('mysql:host=127.0.0.1;port=8889;dbname=Neuro;charset=utf8', 'root', 'root', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); //'mysql:host=localhost;dbname=Neuro;charset=utf8', ...'
}
... | true |
3ebfd19b839ec77f6cf6c49d8e1806bba4d5a395 | PHP | camilagsilva/PHPCurso | /funcoes/db.php | UTF-8 | 704 | 3.015625 | 3 | [] | no_license | <?php
function conectar()
{
$configDb = require 'config/db.config.local.php';
$conexao = pg_connect("host={$configDb['host']} port={$configDb['port']} dbname={$configDb['database']} user={$configDb['user']} password={$configDb['password']}");
return $conexao;
}
function inserirUsuario($nome, $email, $senh... | true |
e6cd689ff823a44bade8b964fe0d4c35c68912c3 | PHP | cabradilla04/TrekkPH | /database.php | UTF-8 | 1,380 | 2.796875 | 3 | [] | no_license | <?php
class Database {
public $numRow;
public $conn;
public $cmd;
public $result;
public function __contruct() {
$this->cmd ="";
$this->conn =NULL;
$this->numRow =-1;
$this->result =NULL;
}
public function connect() {
$this->conn = new mysqli("localhost","root","","softeng");
r... | true |
c08b438f0e4bbbc1f8b2535343d4e15fbc605d82 | PHP | oliveris/sdk-mail | /tests/index.php | UTF-8 | 6,080 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
include "../vendor/autoload.php";
use Mail\Mail;
/**------ Testing the MailGun driver ------**/
$mail = Mail::getDriver('mailgun');
// $mail->setKey('');
// $mail->setDomain('');
// Test Sending
//$mail->setTo('');
//$mail->setFrom('');
//$mail->setSubject('This is a test subject');
//$mail->... | true |
e07edc19be2337cfcd96a773bbdd72714040e840 | PHP | ExtraSemester/EducationSystem | /Project/stu_class.php | UTF-8 | 1,494 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 王琦
* Date: 2016/7/4
* Time: 9:57
*/
//防止显示到浏览器时乱码
header('Content-Type:text/html; charset=utf-8;');
header('Content-Type:text/json');
//session_start();
require_once './database.php';
//防止显示到浏览器时乱码
header('Content-Type:text/html; charset=utf-8... | true |
54653b77c4a75e1f75f57c71083575eb1610756e | PHP | krokki/6lab | /6lab_2.0/sample.test/_www/modules/show_films_from_cinema.php | UTF-8 | 676 | 2.59375 | 3 | [] | no_license | <?php
//all film for cinema
if(isset($_GET['id_cinema'])) {
$id_cinema = htmlspecialchars($_GET['id_cinema']);
$url_add = "add_film_into_cinema.php?id_cinema=".$id_cinema;
$sql = "SELECT * FROM table_cinema_films WHERE cinema_id = " . $id_cinema;
$film_id = array();
if (($connection... | true |
f31e91b13978a5ea82be5c16f2d46bdbdad1b546 | PHP | OGtheZ/exercises-1-3 | /exercise_01_03.php | UTF-8 | 112 | 3.359375 | 3 | [] | no_license | <?php
$name = "Edgars";
$lastName = "Zaicevs";
$age = 30;
echo $name . " " . $lastName . " " . $age . PHP_EOL; | true |
c66ce7006facf077cde667121102d9e009852108 | PHP | lebris/braverats-yolo | /src/Domain/Joueurs/Stub.php | UTF-8 | 1,277 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace BraveRats\Domain\Joueurs;
use BraveRats\Domain\Joueur;
use BraveRats\Domain\Cartes\Modificateur;
use BraveRats\Domain\Collections\CarteCollection;
class Stub implements Joueur
{
public
$nextModificateurs,
$modificateursNextManche,
$modificateurs... | true |
0ac4d448b894c52847cff5fd142a73e74dc527a0 | PHP | clarkso/NLFMS | /framework/application/libraries/dubbox/invokerDesc.php | UTF-8 | 1,430 | 3.046875 | 3 | [] | no_license | <?php
namespace dubbox;
/**
* 调用实现
*
* @author clarkso
*
*/
class invokerDesc
{
private $serviceName = " ";
private $group = " ";
private $version = " ";
private $schema = 'jsonrpc';
/**
* 构造函数
* @param unknown $serviceName
* @param unknown $version
* @param unknown $g... | true |
414126910f101fcf36848f34155ee98ec8e266e3 | PHP | snipertomcat/PhoneSubscriber3000 | /app/Question.php | UTF-8 | 3,319 | 2.546875 | 3 | [] | no_license | <?php
namespace Apithy;
use Apithy\Utilities\Master\Master;
use Illuminate\Database\Eloquent\Model;
class Question extends Model
{
protected $casts = [
'id' => 'integer',
'company_id' => 'integer',
'title' => 'string',
'image' => 'str... | true |
106746787d2cddafe5f999e5acd98ef0c862e8d9 | PHP | marcosggoncalves/api-acheaquiali | /classes/cidades.php | UTF-8 | 1,230 | 2.765625 | 3 | [] | no_license | <?php
class Cidade
{
private $conection;
function __construct($db)
{
$this->conection = $db;
}
public function getCidades(){
$stmt = $this->conection->prepare("SELECT Id,nome from tab_cidades where ativo = 'on' order by nome asc");
$stmt->execute();
$cidades = [];
while($row = $stmt->f... | true |
54e366c8ea3ab1b68bb5fea72ac925a8fd34da63 | PHP | handyCAPS/timsocial | /scripts/get_search_result.php | UTF-8 | 1,062 | 2.828125 | 3 | [] | no_license | <?php
require_once "db/connection.php";
$name = trim($_POST['searchBox']);
$type = trim($_POST['searchFor']);
$db = new tiso_mysqli();
$name = $db->real_escape_string($name);
$dbtype = $db->real_escape_string($type);
if ($type === 'User Name') {
$dbtype = 'user_name';
} else if ($dbtype === 'Screen Name') {
$dbty... | true |
1256b7f70d9b4a321243933b5d850c607639afa2 | PHP | yudanilam/loginlaravel | /app/Http/routes.php | UTF-8 | 1,703 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| an... | true |
805e55dae2e2c621de86f49eef0866a8782ac8ed | PHP | almino/Onimla-SemanticUI | /Traits/Floated.php | UTF-8 | 1,822 | 2.71875 | 3 | [] | no_license | <?php
namespace Onimla\SemanticUI\Traits;
use Onimla\SemanticUI\Constant;
/**
* @method \Onimla\HTML\Attribute\Klass getClassAttribute()
*/
trait Floated {
public function unsetFloated() {
$this->getClassAttribute()->strictRemoveClass(Constant::LEFT, Constant::FLOATED);
$this->getClassAttribut... | true |
42432eb1ddc42a09e6dc3c684204f116244cecdf | PHP | AdamPetera/IWWW_SemestralniPrace | /IWWW_SemestralniPrace_Petera/classes/RoleController.php | UTF-8 | 1,057 | 2.984375 | 3 | [] | no_license | <?php
class RoleController
{
static function getAllRoles() {
$conn = Connection::getPdoInstance();
$stmt = $conn->prepare("SELECT * FROM `role`");
$stmt->execute();
$temp_roles = $stmt->fetchAll();
$roles = array();
foreach ($temp_roles as $role) {
ar... | true |
340a0733f8cc1a014411b19073cfd5731dd8db86 | PHP | pierregi/ATM | /application/controllers/Artiste.php | UTF-8 | 8,796 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Artiste extends CI_Controller{
public function __construct(){
parent::__construct();
$this->load->model('ArtisteModel');
}
public function home(){
$data['subView'] = "home";
$this->load->vars($data);
$this->load->view('template');
}... | true |
ed1b76a46f03951379033c2cd9c6c70bcbe296de | PHP | anjelessuor/csv | /app/Controller/PartnersController.php | UTF-8 | 10,142 | 2.78125 | 3 | [] | no_license | <?php
namespace Controller;
use \W\Controller\Controller;
use \Model\PartnersModel;
use \Model\UserModel;
class PartnersController extends \W\Controller\Controller
{
//Page qui liste les événements coté back
public function index()
{
$user_manager = new UserModel();
$user = $this->getUser... | true |
25e148b7fe4a1b04f7ee36c994b6f268ca67c774 | PHP | kunglaw/informasea | /app2.0/modules/company/views/include/gallery-list-item.php | UTF-8 | 823 | 2.515625 | 3 | [] | no_license | <?php
$username = $company[0]['username'];
?>
<ul class="image-grid image-grid-5">
<?php
if(!empty($photo))
{
foreach ($photo as $photo_company) {
$logo_img = $photo_company["nama_gambar"];
$username = $photo_company['username'];
$path_img = "";
$profile_pic = "";
$title ... | true |
7dbdb4780fb7008cad2293bb746f544734040126 | PHP | magersoft/configurator | /migrations/m190523_130548_create_property_category_table.php | UTF-8 | 2,436 | 2.578125 | 3 | [] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%property_category}}`.
* Has foreign keys to the tables:
*
* - `{{%category}}`
* - `{{%property}}`
*/
class m190523_130548_create_property_category_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{... | true |
ef23f290ec98d733dad3ae4f8beb46f5a89fc5fc | PHP | almohamady96/ayman_project | /app/Classes/ArabicDate.php | UTF-8 | 3,628 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Classes;
class ArabicDate {
static function GetDate($your_date)
{
$months = array("Jan" => "يناير", "Feb" => "فبراير", "Mar" => "مارس", "Apr" => "أبريل", "May" => "مايو", "Jun" => "يونيو", "Jul" => "يوليو", "Aug" => "أغسطس", "Sep" => "سبتمبر", "Oct" => "أكتوبر", "Nov" => "نوفمبر",... | true |
fb6a3fd40015891ef7b1d53e3ad686001bdf7c95 | PHP | grigoryya/bitshares-php | /src/JSON_RPC20.php | UTF-8 | 2,030 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FurqanSiddiqui\BitShares;
use FurqanSiddiqui\BitShares\Exception\BadResponseException;
use FurqanSiddiqui\BitShares\Exception\ErrorResponseException;
/**
* Class JSON_RPC20
* @package FurqanSiddiqui\BitShares
*/
class JSON_RPC20
{
/**
* @param string $method
... | true |
d97cd4d0801ddf72bd517d9e6b531eebe959b46c | PHP | Interdose/DB | /DB.php | UTF-8 | 47,696 | 2.65625 | 3 | [
"MIT"
] | permissive | <?PHP
namespace Interdose;
use PDO;
if (!class_exists('Interdose\DB')) {
/**
* Interdose DB MySQL
*
* Basic PDO functionality enhanced it with some additional features, e.g. caching and LINQ inspired database queries.
*
* @author Dominik Deobald
* @version 1.6.1
* @package Interdose\DB
* @date 2022-12-01 10:... | true |
b4bd69d7fd1dcd55ba9f6fdbbe97133792604f4b | PHP | mikeds/UM20004-admin360 | /application/core/Admin_Controller.php | UTF-8 | 7,552 | 2.515625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CMS_Controller class
* Base controller ?
*
* @author Marknel Pineda
*/
class Admin_Controller extends Global_Controller {
private
$_stylesheets = array(),
$_scripts = array();
protected
$_base_controller = "admin",
$_ba... | true |
079f9adecd33a93fa109643ead789c0618093043 | PHP | heropoo/decision-tree | /src/DecisionTree.php | UTF-8 | 388 | 2.734375 | 3 | [] | no_license | <?php
namespace Moon\DecisionTree;
class DecisionTree
{
// protected $id;
// protected $name;
public function __construct(array $attributes)
{
foreach ($attributes as $attribute => $value){
$this->$attributes = $value;
}
}
//todo 规则
public function __toString... | true |
777d5f5254da9a4a4e28a04a556f50c38d8185e3 | PHP | Ashokkumar18/addetails | /frontend/models/Addetails.php | UTF-8 | 1,841 | 2.53125 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "addetails".
*
* @property int $id
* @property string $category_id
* @property string $title
* @property string $description
* @property string $amount
* @property string $seller_name
* @property string $seller_email
* @property s... | true |
6895f6eb95cb1024bc15305e91685c3bbd4c3a24 | PHP | gerardnt/WebServices-CSE451 | /cse451-gerardnt-web-master/keyCas/info.php | UTF-8 | 5,745 | 2.875 | 3 | [] | no_license | <?php
/*
Nicholas Gerard
Key value interaction with remote and local
using CAS for Authentication
Based off Dr. Campbells starter code and previous code
pasword.php must have:
$user, $pass, $db, $host $addPass $vendorKey
*/
require_once 'vendor/apereo/phpcas/CAS.php';
require_once 'vendor/autoload.ph... | true |
d03071b0df1fa8110f3639d7e118e08130ba6212 | PHP | modpreneur/trinity-utils | /Tests/Entity/EntityObject.php | UTF-8 | 1,711 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Trinity\Component\Utils\Tests\Entity;
/**
* Class EntityObject
*/
class EntityObject extends EntityParent
{
/** @var string */
private $name;
/** @var int */
private $price;
/** @var string */
private $desc;
/** @var bool */
private $active;
/**
* E... | true |
d75eb9f85f24e8bd78d1094bdf146e64d02ab4db | PHP | vongolalahad/Projet-Janvier-CSI3 | /site/model/dao_article.php | UTF-8 | 703 | 2.6875 | 3 | [] | no_license | <?php
//fonctions qui envoie et récupère les requete de la table article de la base de donnee
function AffichageArticle($link){
$requete="SELECT id_article, nom_article, description, type_article FROM article ORDER BY nom_article" ;
$reponse=mysqli_query($link,$requete);
return $reponse;
}
function Donne... | true |
098c10d4753f0724a2212b8a47a2349fa2abd965 | PHP | Amine-H/EDBM | /inc/procedure.class.php | UTF-8 | 2,628 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* class:Procedure class
* for:creating,updating and deleting procedures
*/
class Procedure
{
private static function formatParams($input)
{
$result = "";$n=sizeof($input['dir']);
for($i=0;$i<$n;$i++)
{
$result.=$input['dir'][$i]." ";
$result.=$input['name'][$i]." ";
$result.=$input['type'][$... | true |
9b2b0497902f762f147099684533e956fd8c9ac7 | PHP | fintech-fab/mcom | /src/FintechFab/Payments/RuRuPayment/RuRuPayment.php | UTF-8 | 3,999 | 2.75 | 3 | [] | no_license | <?php
namespace FintechFab\Payments\RuRuPayment;
class RuRuPayment
{
protected $apiUrl = 'https://178.20.234.188/RuRu.FrontEnd.ServiceProvider2/TransactionService.svc';
public $secretKey = '';
protected $spId = null;
public function __construct($spId, $secretKey, $apiUrl = null)
{
$this->secretKey = $secre... | true |
6952b195973dae6360918cf9dab5d7305ec91e6f | PHP | Harutin1991/gnel | /admin/application/models/settingsmodel.php | UTF-8 | 353 | 2.59375 | 3 | [] | no_license | <?php
class SettingsModel extends BaseModel {
private $table="settings";
public function get($key) {
$query = $this->db->get_where($this->table, array('key' => $key));
if($query->num_rows() > 0) {
$res = $query->row_array();
return $res['value'];
}
... | true |
e6436d03e064b40d21cf925567cf728bbc667312 | PHP | jasonchen736/LAMP_Based_Ecommerce_Candy_Subscription_Website | /getsnacked/library/customerCore.php | UTF-8 | 5,117 | 2.84375 | 3 | [] | no_license | <?
class customerCore {
// stores customer user and login info
private static $customer = false;
// global customer variables
private static $startDate = false;
private static $endDate = false;
/**
* Retrieve a customer variable
* Args: (str) variable name
* Return: (mixed) variable value
... | true |
a306289bd13cfa9a86cc094a9a52192b56113b22 | PHP | Yuta-Saito0310/SophiaTennisQuiz | /database/seeds/QuizzesTableSeeder.php | UTF-8 | 2,194 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class QuizzesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
$allquizzes = [
$quiz1 = [
'id' => 1,
'title' => '「一期一笑」のコピーで広告を... | true |
c22ec568990954673b39cb11fbc885ff03075bf5 | PHP | theperfectwill/php-ultimate-sessions | /src/UltimateSessions/UltimateSessionManager.php | UTF-8 | 17,548 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace MikeBrant\UltimateSessions;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
/**
* Class UltimateSessionManager
*
* This class is an object-oriented wrapper around common PHP session management
* functions along with features geared at enhancing security
* and... | true |
57a2ba7715039932bbe020b43ed323558b9a2e85 | PHP | piiskop/pstk | /kalmer/lessons/lesson03code/exercise03afinal.php | UTF-8 | 922 | 3.03125 | 3 | [] | no_license | <?php
/**
* Try it Lesson 3
*
* This program creates a php file demonstrating PHPDoc blocks
* and basic PHP syntax
*
* @version 1.0 2011-02-03
* @package PHP & MySQL 24-hr Trainer
* @subpackage Lesson 3
* @copyright Copyright (c) 2011 Your company name
* @license GNU General Public License
* @since... | true |
7fff635581b1121f77e1a92625dca83dfc8254dd | PHP | buresmi7/weather-forecast | /scripts/prepare-database.php | UTF-8 | 585 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
$databaseConfig = require(__DIR__ . '/../config/database.config.php');
$conn = new mysqli(
$databaseConfig['host'],
$databaseConfig['username'],
$databaseConfig['password']
);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$conn->query("CREATE DATABASE forecas... | true |
1ea6fbcf71dd4a05befd7f6caa23e6919ba47a13 | PHP | TomCatzhu/myproject | /artproject/data/13_lottery_stat.php | UTF-8 | 786 | 2.625 | 3 | [] | no_license | <?php
//接收客户端提交的uid查询该用户的抽奖信息形如
//{uid:10,"total":39,"used":3}
header("Content-Type:application/json");
@$uid=$_REQUEST['uid']or die('{"code":401,"msg":"uid required"}');
//即将要输出给客户端的统计数据
$output=[
'uid'=>$uid,
'total'=>0,
'used'=>0
];
require('1_init.php');
//SQL1:根据用户编号获取所有订单的总金额
$sql="SELECT SUM(price) F... | true |
8e79b63b4fc3c18657cf5b7b11e4d4baf2a26bf7 | PHP | martonkaufmann/psp-media-test-task-solution | /app/Rules/GenderRule.php | UTF-8 | 452 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class GenderRule implements Rule
{
private const ALLOWED_GENDERS = ['male', 'female'];
/**
* @param string $attribute
* @param mixed $value
*/
public function passes($attribute, $value): bool
{
return \in... | true |
9e2d818dc388314b213a71225eab24b76a8844d3 | PHP | nele/phpkursus2016 | /ylesanded/yl0203.php | UTF-8 | 419 | 2.859375 | 3 | [] | no_license | <?php
/*
Nele, 5. mai 2016
Ülesanne 0203
Lisa käsitsi massiivi kümne näitleja nime kasutades massiivi loomiseks array funktsiooni
$stars = array('Clint', 'Bruce');
Väljasta see "for" tsükliga.
*/
$stars = array('Palmiste', 'Malmsten', 'Loog', 'Pohla','Haasma','Uuspõld','Reinsalu','Lunge','Aadli','Lass');
for($i... | true |
5861e82e0937a7921a4584823dc9c2e572275fd5 | PHP | hoan-bv/we-money | /database/seeds/PostSeeder.php | UTF-8 | 1,438 | 2.609375 | 3 | [] | no_license | <?php
use Phinx\Seed\AbstractSeed;
class PostSeeder extends AbstractSeed
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeders is available here:
* http://docs.phinx.org/en/latest/seeding.html
*/
public function run()
... | true |
d815daead27505d7e89f40c9f9570eae8a97f227 | PHP | xf0r3m/ospmanager | /forms/comp_about_mod.php | UTF-8 | 2,450 | 2.640625 | 3 | [] | no_license | <?php
$row0 = mysqli_fetch_row($result0);
echo "<form action=\"index.php?page=comp_about&action=mod&id=" . $row0[0] . "\" method=\"post\">
<table>
<tr>
<td>Nazwa: </td>
<td><input class=\"form_inputs\" type=\"text\" name=\"c_about_nazwa\" value=\"" . $row0[1] . "\" /></td>
</tr>
<tr>
<td>Rodzaj: ... | true |
f134b01117ca678691172829ea3c02c87aba75fb | PHP | fedorovanton/yii2-crm-online-hackathon | /common/components/SmsService.php | UTF-8 | 1,172 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: antonfedorov
* Date: 16/09/2019
* Time: 09:00
*/
namespace common\components;
use Yii;
/**
* Сервис, который управляет отправкой SMS
*
* Class SmsServices
* @package common\services
* @link http://sms.ru/php
*/
class SmsService
{
public static function getT... | true |
547b0af1ade997e5f67379eccb58aaf083356e08 | PHP | S0hiba/portfolio | /source/apps/core/model.php | UTF-8 | 645 | 2.578125 | 3 | [] | no_license | <?php
# -----------------------------
# ポートフォリオサイト本体 モデル抽象クラス
# 2021.05.31 s0hiba 初版作成
# -----------------------------
abstract class ModelCore
{
/**
* データ操作に用いるデータストアオブジェクト
*/
protected QueryBuilderWithPhpRedisDataStore $dataStore;
/**
* コンストラクタ
* @param QueryBuilderWithPhpRedisDataS... | true |
884c4b6e620c92955bc738cd1e4049602dee13a6 | PHP | chen-huai/php | /PHP/30.课件_第七章 正则表达式[3]-模式修正符/demo7_3/2.php | UTF-8 | 286 | 3.09375 | 3 | [] | no_license | <?php
/*
模式修正符 : s
如果设定了此修正符,那么.将匹配所有的字符包括换行符(\n)
*/
$pattern='/t.st/s';
$str="t\nst";
/*
$str="t
st";//其实在windows里面就等价于$str="t\r\nst"
*/
var_dump(preg_match_all($pattern,$str,$arr));
var_dump($arr);
?> | true |
68d38e057b8c10de438158f4d2c0e2ab8fa6f4a3 | PHP | rahulyhg/arena-pl-magento-1 | /app/code/community/ArenaPl/Magento/vendor/arena-pl/arena-pl-php-sdk/src/ApiCall/GetTaxonTree.php | UTF-8 | 1,019 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace ArenaPl\ApiCall;
use ArenaPl\ApiCall\Traits\TaxonTrait;
class GetTaxonTree extends AbstractApiCall implements ApiCallInterface
{
use TaxonTrait;
/**
* {@inheritDoc}
*/
public function getMethod()
{
return ApiCallInterface::METHOD_GET;
}
/**
* {@inherit... | true |
2f854fc720c4a3e5164043cbabd2297163d33b88 | PHP | tarikakbay/ShareAndLike | /api/v1/controller/UserLoginPost.php | UTF-8 | 1,621 | 2.734375 | 3 | [] | no_license | <?php
// required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Header... | true |
ca1db859a4ab30e7c0e7cb8b06b4274ddf58d622 | PHP | RAYCHEV/PHPFundamentals2017 | /homeworks/5.1-Functions/8-TripLength.php | UTF-8 | 1,021 | 3.4375 | 3 | [] | no_license | <?php
$inputValue = "-1, -2, 3.5, 0, 0, 2";
$xy = explode(", ",$inputValue);
$points = [
1 => [
1 => $xy[0],
2 => $xy[1],
],
2 => [
1 => $xy[2],
2 => $xy[3],
],
3 => [
1 => $xy[4],
2 => $xy[5],
]
];
function dist($x1, $y1, $x2, $y2)... | true |
4fd7ec12c37a794aeb4f5e37a454219a669a8483 | PHP | MathieuVMaurik/authentimail | /src/authregistration.script.php | UTF-8 | 2,123 | 2.640625 | 3 | [] | no_license | <?php
require 'include/db.php';
session_start();
$errors = array();
$registered = false;
if(isset($_GET['token']))
{
$stmt = $db->prepare('SELECT * FROM registrations WHERE token = :token');
$stmt->bindParam(':token', $_GET['token']);
$stmt->execute();
$registration = $stmt->fetch(PDO::FETCH_OBJ);
... | true |
96284ac54681b30222c084ca86b96f6359b9abd3 | PHP | mogaozq/phpStorm | /regex/filter.php | UTF-8 | 279 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: MOGA
* Date: 2017-07-08
* Time: 12:24 PM
*/
$array = ["my name is moga", "my name i sably", "something is wrong", "my name is dada"];
$result = preg_grep("/my name is \\w+/", $array);
echo "<pre>";
var_dump($result);
echo "</pre>";
| true |
6b1c940e6e122ff7edf1fb22eaae1d025f76772d | PHP | jrestr29/JsonRender | /util/imagen_element.php | UTF-8 | 1,009 | 3.25 | 3 | [] | no_license | <?php
include_once('html_element.php');
class Imagen extends Element {
private $src;
private $width;
private $height;
public function __construct($id) {
$this->setType("img");
$this->setName($id);
$this->setId($id);
$this->createLabel();
$this->createStyle();
... | true |
9d9e2ce6d9cb79e62a75ec2fd3f8a52d6fdee690 | PHP | JoseAplitic/sos | /modelos/carritoModelo.php | UTF-8 | 2,328 | 2.515625 | 3 | [] | no_license | <?php
if($peticionAjax){
require_once "../core/mainModel.php";
}else{
require_once "./core/mainModel.php";
}
class carritoModelo extends mainModel
{
protected function verificar_producto_carrito_personal($cliente, $producto)
{
$sql=mainModel::conectar()->prepare("SELECT cantidad FROM carrito_personal ... | true |
e36e86a98a90e45d1f5d472045698da787081837 | PHP | RomanIlkiv/signup-ajax | /lib/user_class.php | UTF-8 | 908 | 2.84375 | 3 | [] | no_license | <?php
require_once "database_class.php";
class User extends DataBase {
public function __construct() {
parent::__construct();
}
public function AddUser($login, $email, $name, $age, $country, $city, $password, $gender, $avatar) {
if(!$this->checkData($login, $password)) return false;
return $t... | true |
4163221a89af2e584270848fea0de05e8cfa50b3 | PHP | Limych/penati | /app/Http/Controllers/SitemapController.php | UTF-8 | 1,081 | 2.5625 | 3 | [] | no_license | <?php
namespace Penati\Http\Controllers;
use App;
use URL;
use Penati\Offer;
use Illuminate\Support\Facades\View;
class SitemapController extends Controller
{
/**
* Display a sitemap listing.
*
* @return View
*/
public function index()
{
// create new sitemap object
$s... | true |
ed208f3006d77a7cde9676a9568e6322fc242b3e | PHP | castorland/hu-holidays | /src/Traits/Holidays/NagyboldogasszonyNapja.php | UTF-8 | 697 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Castorland\HUHolidays\Traits\Holidays;
use Castorland\HUHolidays\Carbon;
trait NagyboldogasszonyNapja
{
/**
* Setting Nagyboldogasszony napja holiday for given year
*
* @param int $year The year to get the holiday in
*/
private function setNagyboldogasszonyNapja(int $year)... | true |
c1c6e79d0f77342879c01307cbcedffc122cd1c0 | PHP | pick-6/pick6 | /database/seeds/SelectionsSeeder.php | UTF-8 | 571 | 2.8125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class SelectionsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->fakeSelections();
}
public function fakeSelections()
{
for ($i=0; $i < 500; $i++) {
$s... | true |
785d311fdbd0717145a985b1a2dbe06bb8ab8918 | PHP | Diverst/slink | /model/User.php | UTF-8 | 1,425 | 2.921875 | 3 | [] | no_license | <?php
class User
{
private $username = "username";
private $password = "password";
private $email = "email";
private $premium = false;
public function __construct()
{
}
public function get_user_data()
{
$user_data = get_object_vars($this);
unset($user_data[... | true |
fb916f21a70250c6f931ba5038a80f988a219b8d | PHP | Jagyiri/shop | /shop_login/Man_Project/getuser.php | UTF-8 | 666 | 2.59375 | 3 | [] | no_license | <?php
$supp=$pro=$quan=$cp=$sp=$bp="";
$q = $_GET['q'];
$con = mysqli_connect('localhost','root','Ja01072016$','shop');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"shop");
$sql="SELECT * FROM supplier WHERE Product = '".$q."'";
$result = mysqli_query($con,$sql);
while($... | true |
ff450d621eefdb21f350d8141e645e5e74f0d724 | PHP | vmunich/arkx.io | /app/Models/Announcement.php | UTF-8 | 1,843 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Models\Concerns\HasSiblings;
use Illuminate\Database\Eloquent\Model;
use Parsedown;
use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
class Announcement extends Model
{
use HasSlug, HasSiblings;
/**
* The attributes that are mass assignable.
*
... | true |
e03df0a6153b156729b9e82d4f3009cca861c077 | PHP | svtokarevsv/smartspace | /app/models/UserLocation.php | UTF-8 | 2,589 | 2.53125 | 3 | [] | no_license | <?php
namespace App\models;
use App\lib\App;
use App\lib\Config;
use App\lib\Model;
class UserLocation extends Model
{
function updateUserLocation($user_id, $lat, $ln)
{
$sql = 'INSERT INTO user_locations(user_id,lat,ln)
VALUES(:user_id,:lat,:ln)
ON DUPLICATE KEY UP... | true |
c715974b50f7c386e0858ba0719c08b2c688e6fd | PHP | poiz777/flower-shop-management-tool | /src/Extensions/Twig/Helper/MarkdownExtension.php | UTF-8 | 702 | 2.625 | 3 | [] | no_license | <?php
/**
* Author : Poiz
* Date : 17.03.18
* Time : 12:01
* FileName : MarkdownExtension.php
* ProjectName : simf.pz
*/
namespace App\Extensions\Twig\Helper;
use App\Services\MarkdownTransformer;
class MarkdownExtension extends \Twig_Extension {
/**
* @var MarkdownTransf... | true |
77684f4e6c00790ff113fb32de176d0f72ad9e86 | PHP | hjhnju/pflag | /library/PFlag/Config/Ini.php | UTF-8 | 6,883 | 2.9375 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../Interface/Config.php';
/**
* PFlag config from .ini file.
* e.g.
* [base]
* feature.F1.enabled = false
* feature.F1.type = business
* feature.F1.params.start_date = '2013-11-06 00:00:00'
* feature.F1.params.end_date = '2013-11-11 23:59:59'
* [dev:base]
* f... | true |
72eb949abe8425826dd5842dd39b6a2a1dff4602 | PHP | RegioneER/sirer | /html/html/xCDMProtocolloLib/Iride/soapClient/Fascicolo/Type/CreaFascicoloString.php | UTF-8 | 1,781 | 2.828125 | 3 | [] | no_license | <?php
namespace IrideWFFascicolo\Type;
use Phpro\SoapClient\Type\RequestInterface;
class CreaFascicoloString implements RequestInterface
{
public function __construct($FascicoloInStr, $CodiceAmministrazione, $CodiceAOO)
{
$this->FascicoloInStr = $FascicoloInStr;
$this->CodiceAmministrazion... | true |
76d4c7e4afa0418f088985e06771a0c15ca25d9f | PHP | johncallahan/poche | /inc/3rdparty/content-extractor/SiteConfig.php | UTF-8 | 7,341 | 2.53125 | 3 | [
"WTFPL"
] | permissive | <?php
/**
* Site Config
*
* Each instance of this class should hold extraction patterns and other directives
* for a website. See ContentExtractor class to see how it's used.
*
* @version 0.6
* @date 2011-10-30
* @author Keyvan Minoukadeh
* @copyright 2011 Keyvan Minoukadeh
* @license http://www.gnu.org/lic... | true |
45e81a9aa3a9bb20f1b603a818ae08c1dba4d9ec | PHP | devlabs91/generic-ota-hotel-api-service | /src/StructType/OriginalIssueInfo.php | UTF-8 | 6,875 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Devlabs91\GenericOtaHotelApiService\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for OriginalIssueInfo StructType
* Meta informations extracted from the WSDL
* - documentation: The original ticket/document issue information.
* @subpackage Structs
*/
class Or... | true |
5558cb57e2fef20f55eeaa72979c20c5b7524013 | PHP | ktapia576/SpF-Research-Project | /public_html/controller/getUserImages.php | UTF-8 | 686 | 2.609375 | 3 | [] | no_license | <?php
include 'dbconfig.php';
$conn = Connect();
$userId = $_COOKIE['userId']; // Get userId created from cookie and passed as GET method through AJAX
$imageQuery = "SELECT * FROM 2018spfdb.Images WHERE userID = '$userId'";
$imageQueryResult = mysqli_query($conn, $imageQuery);
if(!$imageQueryResult) {
die("Dat... | true |
8de309decac2cef680d2f9411d391ac47288e461 | PHP | antisage/SWE_Project | /user_home.php | UTF-8 | 3,366 | 2.734375 | 3 | [] | no_license | <?php
session_start();
include_once("config.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>User Home</title>
<link href="css/style2.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id=”nav”>
<a href="change_email.php">Change Email</a>
<a href="index.php">Log Out</a>
... | true |