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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d6b40e9dd9b8702041535ad6664acec860489b26 | PHP | alabamustapha/security-analysis | /app/Http/Controllers/OfficerController.php | UTF-8 | 2,163 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests;
use Illuminate\Http\Request;
use App\User;
use App\Building;
use App\Respondent;
class OfficerController extends Controller
{
public function store(Requests\CreateNewOfficer $request){
$user = User::create([
'name' => $reque... | true |
e4783f5e5831e93175bf53e54c15babd6bacbfc4 | PHP | mj223dg/1DV608 | /lectures/LectureCode/Prepared/UserPicker/PickUserController.php | UTF-8 | 578 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace controller;
class PickUserController {
private $view;
private $model;
public function __construct(\model\UserArray $users, \view\UserView $view) {
$this->view = $view;
$this->model = $users;
}
public function doPickUser() {
//Get user input
$selected = $this->view->getSelectedUser();... | true |
f286fec7b1c6de049cb4d707737c94b2936a1484 | PHP | btam06/addressbook | /app/Controller/ContactsController.php | UTF-8 | 1,887 | 2.84375 | 3 | [] | no_license | <?php
class ContactsController extends AppController {
public $helpers = array('Html', 'Form');
//Display all contacts
public function index() {
if ($this->request->is('post')) {
$data = $this->request->data;
if (isset($data['Contact']['name'])) {
$contacts = $this->Contact->find('all', array(
... | true |
7518cc2eb55e8a18c4ba3c1d4501ba8c2fb2a857 | PHP | dermanov-ru/bitrix_iblock_reader_and_writer | /local/lib/Data/Iblock/Read/ElementReader.php | UTF-8 | 5,559 | 2.71875 | 3 | [] | no_license | <?php
/*
* Created by PhpStorm.
* Date: 05.10.2017
*
* @author dev@dermanov.ru
*/
namespace Data\Iblock\Read;
class ElementReader extends Engine
{
/**
* Iblock engine version: 1.0 or 2.0
* */
protected $iblockEngineVersion = 2;
protected $selectProps = [];
public function fetchA... | true |
569ac420a2edcee65a91bb7d63b06b424494447b | PHP | ratiw/petro | /classes/auth/acl/petroacl.php | UTF-8 | 1,133 | 2.609375 | 3 | [] | no_license | <?php
namespace Petro;
class Auth_Acl_PetroAcl extends \Auth_Acl_Driver
{
protected $table_name = 'app_acl';
public function has_access($condition, Array $entity)
{
// get user's group level
$group = \Auth::group()->get_level();
// parse conditions, area and rights in question
$condition = static::_par... | true |
14cdf1a31858b0c7cbbb2c503519e7bcadbffbd2 | PHP | masumbillah3416/RESTURANT-ERM | /app/View/Components/package.php | UTF-8 | 582 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\View\Components;
use App\Models\package as ModelsPackage;
use Illuminate\View\Component;
class package extends Component
{
/**
* Create a new component instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the view / con... | true |
0ab3a02065c828f57b98cb02cb25eeda9cdb9ca9 | PHP | irma1991/php_beginning | /index.php | UTF-8 | 2,140 | 2.609375 | 3 | [] | no_license | <?php
$vardas = "Irma";
//$pavarde = "Linartaite";
//$elPastas = "irmalinaretaite@gmail.com";
//
//$output = '<div>';
//$output .= $vardas;
//$output .= '</div>';
// echo 'Mano vardas yra '.$vardas.'. Mano parave yra '.$pavarde.'. Mano el. pastas yra '.$elPastas.'.'
// vietoj echo, galima naudoti print
... | true |
3bec214ab5979141ae186e371f3a60d830d4ad56 | PHP | khanhth99/web_bt | /Frontend/Controllers/ProductCategoryController.php | UTF-8 | 737 | 2.546875 | 3 | [] | no_license | <?php
include "Frontend/Models/ProductModel.php";
class ProductCategoryController extends Controller{
use ProductModel;
public function index(){
$pageSize = 7;
$totalRecord = $this->totalRecord();//ham trong model
//tinh so trang
$numPage = ceil($totalRecord/$pageSize);
$... | true |
a5d82d844a2351b8ccf2a06d1afb2022dfcbe3aa | PHP | DanielCTrindade/Upload | /upload.php | UTF-8 | 752 | 2.609375 | 3 | [] | no_license | <?php require_once("config.php") ?>
<?php
$destino = dirname(__FILE__)."/{$pasta}";
$file = $_FILES['arquivo'];
/**
switch($file['error']){
case 0: print "nenhum erro"; break;
case 1: print "Maior que o máximo permitido"; break;
case 3: print "Envio parcial do arquivo"; break;
case 4: print "Arquivo ... | true |
200f3e53a2d3377a8ffb1ce4296e038181ca95e3 | PHP | rainrocka/xinhu | /webmain/flow/input/mode_demoAction.php | UTF-8 | 3,974 | 2.5625 | 3 | [] | no_license | <?php
/**
* 此文件是流程模块【demo.演示测试】对应控制器接口文件。
*/
class mode_demoClassAction extends inputAction{
/**
* 重写函数:保存前处理,主要用于判断是否可以保存
* $table String 对应表名
* $arr Array 表单参数
* $id Int 对应表上记录Id 0添加时,大于0修改时
* $addbo Boolean 是否添加时
* return array('msg'=>'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组
*/
protecte... | true |
90eee9d3c2336273aae3988cdea1af24e1d0075d | PHP | maxxsch28/eess | /func/setupAjaxChequesDiferidos.php | UTF-8 | 1,914 | 2.6875 | 3 | [] | no_license | <?php
// cargaUltimasFacturasCliente.php
// recibe datos del form y los procesa en mysql
include(($_SERVER['DOCUMENT_ROOT'].'/include/inicia.php'));
//print_r($_POST);
//Array ( [mes] => 31/12/2019 [rangoInicio] => 01/01/2018 )
if(isset($_POST['rangoInicio'])){
$fin=explode("/", $_POST['rangoInicio']);
$... | true |
1fa2dd4e69b7fe6ad14653afe0af7c104f102d41 | PHP | eyebug/itearoa-base-i_group | /application/library/convertor/Help.php | UTF-8 | 2,952 | 2.59375 | 3 | [] | no_license | <?php
/**
* 帮助管理数据转换器
*/
class Convertor_Help extends Convertor_Base {
/**
* 标签列表转换器
* @param array $list
* @return array
*/
public function TypeListConvertor($list) {
$data = array(
'code' => intval($list['code']),
'msg' => $list['msg']
);
... | true |
765f70b643611e3e89fb4a6d9e07ea2a2f84ae1d | PHP | wbrc/product-rating-portal | /src/Controllers/UserHome.php | UTF-8 | 1,136 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Controllers;
class UserHome extends \Framework\Controller
{
private $authenticationManager;
private $dataLayer;
public function __construct(\DataLayer\DataLayer $dataLayer, \BusinessLogic\AuthenticationManager $authenticationManager)
{
$this->dataLayer = $dataLayer;
$thi... | true |
ea2861bf979ef4a425e017ea6a76d392c0b2fb1c | PHP | ogmo0n/educational-testing | /quiz/quiz/review_student.php | UTF-8 | 4,119 | 2.6875 | 3 | [] | no_license | <?php
require_once('lib.php');
// Initialise session and database
$db = NULL;
$ok = init($db, TRUE);
// Initialise parameters
$id = 0;
$testId = getQuizId($db, $_SESSION['courseCode']);
//$testId = $_SESSION['version'];
$questions = getQuestions($db, $_SESSION['courseCode'], $testId);
$numbQuestion = count($q... | true |
361c8b16d7e8e9d7451a499bd7938f159f9e2e2a | PHP | scorp1323/dnw | /home/Тут все смотри/_Restart_Udali.ua/www/basa/proba.php | UTF-8 | 871 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
$host = '127.0.0.1'; // или (localhost) - имя хоста (уточняется у провайдера)
$dbname = 'testsite2'; // имя базы данных, которую вы должны создать
$user = 'root'; // заданное вами имя пользователя, либо определенное провайдером
$password = ''; // заданный вами пароль (чаще пустой)
//============================... | true |
df8ffa4091ef4f80ffba26c1bb1a3efa9061dc60 | PHP | ngyuki/psr-pipeline | /src/Pipeline.php | UTF-8 | 1,872 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace ngyuki\PsrPipeline;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use InvalidArgumentException;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
class Pipeline implements MiddlewareInterface, RequestHandlerInterface
{
/**
... | true |
385e4e3e3eee0b3ed661425a630f7d645307cb00 | PHP | kmjamsheed0/task-2-final | /db.php | UTF-8 | 927 | 3.15625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "one";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create datab... | true |
7637caac04f7ceef72d3caa52c827deed4599e75 | PHP | thienth/web2013.1-php1 | /lesson4/index.php | UTF-8 | 921 | 3.078125 | 3 | [] | no_license | <?php
$data = "LOrem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cill... | true |
626d23a51ff502289cc9723f36a137854415e2df | PHP | dovydaslabutis/KCS_Web_Lectures | /failas.php | UTF-8 | 150 | 3.53125 | 4 | [] | no_license | <?php declare(strict_types=1);
function sandauga(int $a,int $b): int{
return $a * $b;
}
echo sandauga(2,2) ;// 4
echo sandauga (sandauga(3,3),3); //27 | true |
49bf0e11d087807acc923d714a3537d06de95782 | PHP | hostnet/wsdl2php | /test/resource/Nmbrs/SingleSignOn/generated/psr-0/Controle/SingleSignOnClient.php | UTF-8 | 1,570 | 2.84375 | 3 | [] | no_license | <?php
namespace Controle;
/**
* SingleSignOnClient
*/
class SingleSignOnClient extends \SoapClient {
const WSDL_FILE = "SingleSignOn.wsdl";
private $classmap = array(
'GetTokenResponse' =>
'\Controle\GetTokenResponse',
'GetToken2Response' =>
'\Controle\GetToken2Response',
... | true |
a619e04b3c37559a2f465caf302ab4bf4e30d3f3 | PHP | daanvanberkel/openid-connect-bundle | /src/DTO/OpenidTokens.php | UTF-8 | 745 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Daanvanberkel\OpenidConnectBundle\DTO;
use Symfony\Component\Serializer\Annotation\SerializedName;
class OpenidTokens
{
public function __construct(
#[SerializedName('access_token')]
private readonly string $accessToken,
#[SerializedName('refresh_... | true |
ecc62cdc1e095de3250fac7fa5cf3389c5c60c1e | PHP | MartialBE/laravel-dingtalk | /src/WorkBot/Application.php | UTF-8 | 927 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Martialbe\LaravelDingtalk\WorkBot;
use Martialbe\LaravelDingtalk\Kernel\ServiceContainer;
/**
* Class Application
*
* @property \Martialbe\LaravelDingtalk\WorkBot\Messages\Client $messages
* @property \Martialbe\LaravelDingtalk\WorkBot\InteractiveCards\Client $interactiveCards
* @pro... | true |
46b19beba834558666f9318589ba193d81c5482e | PHP | taviroquai/mapigniter2 | /app/Idiom.php | UTF-8 | 863 | 2.875 | 3 | [] | no_license | <?php
namespace App;
use App;
use Session;
/**
* Implements session idioms operations
*/
class Idiom
{
/**
* Change session idiom
*
* @param string $idiom
* @return redirect
*/
static function setIdiom($idiom)
{
App::setLocale($idiom);
Session::put('idiom'... | true |
6df85971a206d38e67796e94589e0624ad6203bd | PHP | marcoskubis/php-design-patterns-learning | /strategy.php | UTF-8 | 2,465 | 3.109375 | 3 | [] | no_license | <?php
/**
* Strategy
*
* Define uma famíla de algorítimos, encapsula cada um deles e os torna intercambiáveis.
* A estratégia deixa o algorítimo variar independentemente dos clientes que o utilizam.
*/
abstract class Duck {
protected $flyBehavior;
protected $quackBehavior;
abstract public function d... | true |
4d875100e6eb169ed1432f39ecb1dc50dd023a69 | PHP | ciumchen/lk_admin | /app/Libs/Wanwei/Http/HttpRequest.php | UTF-8 | 2,724 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License")... | true |
71fb71a6a9f18845481c6ccbf15fbc7db8057173 | PHP | niki9796dk/SRP2016-Lysstyring | /PHP/readPresets.php | UTF-8 | 1,215 | 2.71875 | 3 | [] | no_license | <?php
// Denne fil har til formål at hente og tjekke alle gemte presets - til senere brug.
// Inkluder readState.php for at få tilgang til relevant data.
include $_SERVER['DOCUMENT_ROOT']."/SRP1/PHP/readState.php";
//Settings:
$presetDic = $_SERVER['DOCUMENT_ROOT']."/SRP1/PHP/presets.txt"; // Lokalisationen af file... | true |
5ff76c578f001b258fa04ae5e8454082a262f89e | PHP | crissl/gestion_laboratorios | /entidades/Campus.php | UTF-8 | 661 | 2.96875 | 3 | [] | no_license | <?php
class Campus{
private $id_campus;
private $nombre;
private $direccion;
private $estado;
public function getId_campus(){
return $this->id_campus;
}
public function setId_campus($id_campus){
$this->id_campus = $id_campus;
}
public function getNombre(){
return $this->nombre;
}... | true |
08e93db4159eb5e28d30794513f7af1a42202413 | PHP | tiago1994/small-crm | /app/Repositories/Eloquent/ClientRepository.php | UTF-8 | 866 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent;
use App\Models\Client;
class ClientRepository
{
protected $model;
public function __construct(Client $model)
{
$this->model = $model;
}
public function getAll()
{
return $this->model->query();
}
public function find($id)
... | true |
a2e9a0d10127888bcf589060e811d8b8f01c0bf9 | PHP | shitfSign/arsenals | /Arsenals/Core/Views/ArsenalsTemplates.php | UTF-8 | 3,509 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Arsenals\Core\Views;
use Arsenals\Core\Abstracts\Arsenals;
use Arsenals\Core\Config;
use Arsenals\Core\Exceptions\ClassTypeException;
use Arsenals\Core\Registry;
if (!defined('APP_NAME')) {
exit('Access Denied!');
}
class ArsenalsTemplates extends Arsenals implements View
{
/**
* 模板文件后缀
... | true |
7026680f21ba3e9dda19db178dddd65f3e56a78c | PHP | mostman47/cmpe272-xaxi | /team/service/authentication.php | UTF-8 | 1,094 | 2.6875 | 3 | [] | no_license | <?php
$ADMIN_NAME = "admin";
$HASH_SALT = "Hello";
extract($_POST);
if (!$username || !$password) {
header('Content-Type: application/json');
print_r('{"status": false,"message":"username or password cannot be empty"}');
die();
}
if ($username != $ADMIN_NAME) {
header('Content-Type: application/json');... | true |
2666d8aa1bd1d56d53cc8bc58fe82418c2e971c0 | PHP | smakki/yii2 | /models/Vk.php | UTF-8 | 882 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: днс
* Date: 26.02.2017
* Time: 9:57
*/
namespace app\models;
use Yii;
use yii\base\Model;
class Vk extends Model
{
private $access_token;
private $url = "https://api.vk.com/method/";
private $version = "3";
public function method($method, $params = null... | true |
ea04a9f23691d8b64a67490a95fac16393d86d20 | PHP | Starbear3/raccoon5 | /app/common.php | UTF-8 | 1,685 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
// 应用公共文件
function delete_dir_file($dir_name)
{
$result = false;
if (is_dir($dir_name)) {
if ($handle = opendir($dir_name)) {
while (false !== ($item = readdir($handle))) {
if ($item != '.' && $item != '..') {
if (is_dir($dir_name . DIRECTORY_SEPARA... | true |
5630ec96e49d242a2a4f3cd4e163c155f711a11a | PHP | WillbeS/php_basic_exam | /App/Http/HttpHandlerAbstract.php | UTF-8 | 1,624 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Http;
use App\Data\UserDTO;
use App\Service\User\UserServiceInterface;
use Core\DataBinderInterface;
use Core\SessionInterface;
use Core\TemplateInterface;
use Exception\AppException;
abstract class HttpHandlerAbstract
{
/**
* @var TemplateInterface
*/
private $t... | true |
ef3a7632bfe5cc8901b83eb75c76fbb5bd595107 | PHP | PhongGCS/vuetify | /site/web/app/themes/cs-indotrek-com/classes/ILab/StemContent/ACF/ContentTemplateField.php | UTF-8 | 2,134 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ILab\StemContent\ACF;
use Stem\Core\Context;
use Stem\Core\Log;
class ContentTemplateField extends \acf_field {
function __construct() {
$this->name = 'content_template';
$this->label = __('Content Template', 'stem-content');
$this->category = 'choice';
$this->defaults = [];
parent::__co... | true |
8f85ef14a57a1d429ac7f93ae875e063eb504a18 | PHP | minhvu278/shop | /app/Http/Services/Menu/MenuService.php | UTF-8 | 1,945 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Services\Menu;
use App\Models\Menu;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Str;
class MenuService
{
public function getParent() {
// Lấy tất cả parent_id có id = 0
return Menu::where('parent_id', 0)->get();
}
public function getAll() {
... | true |
97d6d76a7e6cc11e6fcf25b6f7a682b85d20fa81 | PHP | tarik817/CSV-test | /core/db/connection.php | UTF-8 | 1,217 | 3.109375 | 3 | [] | no_license | <?php
/**
* Connection
* Realization of singleton pattern.
*
* @package Database
* @author Taras Kostiuk <tarik817@gmail.com>
*/
class Connection
{
private static $engine;
private static $host;
private static $database;
private static $user;
private static $pass;
private static $dns;
private ... | true |
c5004ae73394d659410f22abc7699ba5e4ce7d3f | PHP | iguana007/nette-iMail | /source/iMail.php | UTF-8 | 5,668 | 2.703125 | 3 | [] | no_license | <?php
namespace MartyIX\Utils\Mail;
use Nette;
use MartyIX;
/**
* Implementation of more advanced template based email sending
*
* @author Martin Vseticka
* @link http://forum.nette.org/cs/7881-kompletni-sablona-pro-email
* @link http://forum.nette.org/cs/7881-kompletni-sablona-pro-email#p59885
*/
class iMail
... | true |
f78a76e0c2a2cfaccf3846c5e746cefbc431ab21 | PHP | Lyrikz/zoo | /src/AppBundle/Doctrine/ORM/Extension/UuidTrait.php | UTF-8 | 576 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AppBundle\Doctrine\ORM\Extension;
/**
* Trait UuidTrait.
*/
trait UuidTrait
{
/**
* @var string
*
* @ORM\Column(name="uuid", type="string", length=255)
*/
protected $uuid;
/**
* Set uuid.
*
* @param string $uuid
*
* ... | true |
9848f0f02e079f94651c24cf99d9853cb2f96ede | PHP | 1320174388/Xiao_Cheng_Xu5_KaiFa1_FuWu_KF | /server/application/models/admin/Store.php | UTF-8 | 1,815 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/6/6 0006
* Time: 15:52
*/
class Store extends CI_Model
{
private $tableName = 'data_stores';
/**
* 获取门店信息
*/
public function selectStore()
{
return $this->db->get($this->tableName)->result();
... | true |
34eabf62bdefae94bce0d9755f090a636ca623e2 | PHP | jnashsiegle/SSL | /Week2/Activities/basic_mvc_app/views/captcha.php | UTF-8 | 2,386 | 3.484375 | 3 | [] | no_license | <?php
/*
* ======================================
* PROJECT: SSL - LAB 03 PREP
* FILE: views/captcha.php
* AUTHOR: Jana Nash-Siegle
* CREATED: 12/2/2015
* ======================================
*/
?>
<?php
// Optional: set on the fly... how long session should last
// ini_set('session.gc_maxlifetime', 5 * 60)... | true |
1c4eb122f18e69dd753ed277ba3500ef39de01b2 | PHP | fedosovmu/electronic-queue | /models/Ticket.php | UTF-8 | 3,606 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "ticket".
*
* @property int $id
* @property string $creation_time
* @property string $transfer_time
* @property string $completion_time
* @property int $window_oper_id
*
* @property WindowOperator $windowOper
*/
class Ticket exten... | true |
718d1f655ccd463e912cc81abd2645cbdc5c4b6e | PHP | gabbriela/ProjectManager | /src/AppBundle/DataFixtures/ORM/LoadProjectData.php | UTF-8 | 1,004 | 2.671875 | 3 | [] | no_license | <?php
namespace AppBundle\DataFixtures\ORM;
use AppBundle\Entity\Project;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
class LoadProjectData extends AbstractFixture implements OrderedFixtureInterfac... | true |
5ae878cafbea6a96efb7c8b7fb5f8dcf99214868 | PHP | huuquynh142/watchstore.vn | /app/models/PurchaseInvoicesDetail.php | UTF-8 | 5,430 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Models;
class PurchaseInvoicesDetail extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
* @Primary
* @Identity
* @Column(type="integer", length=11, nullable=false)
*/
protected $id;
/**
*
* @var integer
* @Column(type="integer", length=11, nu... | true |
dcf5ee285bd14c3bf67aa16b486e2c04ad0f9ec0 | PHP | hyperf-ext/sms | /src/Drivers/SmsBaoDriver.php | UTF-8 | 1,797 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of hyperf-ext/sms.
*
* @link https://github.com/hyperf-ext/sms
* @contact eric@zhu.email
* @license https://github.com/hyperf-ext/sms/blob/master/LICENSE
*/
namespace HyperfExt\Sms\Drivers;
use HyperfExt\Sms\Contracts\SmsableInterface;
use HyperfExt\S... | true |
d728d60a71e4ef0e643b4640dcb21299a603e3a2 | PHP | pwFoo/pop-db | /tests/SqlTest.php | UTF-8 | 3,341 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Pop\Db\Test;
use Pop\Db\Db;
use Pop\Db\Sql;
use PHPUnit\Framework\TestCase;
class SqlTest extends TestCase
{
public function testConstructor()
{
$db = Db::connect('sqlite', ['database' => __DIR__ . '/tmp/db.sqlite']);
$db2 = Db::connect('pdo', ['database' => __DIR__ . '/... | true |
25988250fc8cbfdb03b5de1dfcdd092af690a0da | PHP | Drakenpen/Inschrijfsysteem.16mb.com | /inc/connection.php | UTF-8 | 458 | 2.53125 | 3 | [] | no_license | <?php
$mysqlhost = 'mysql.hostinger.nl';
$mysqldb = 'u340186610_db';
$mysqluser = 'u340186610_memai';
$mysqlpass = 'rt2Cg+pz6Q';
try
{
//connection to db
$db = new PDO('mysql:host='. $mysqlhost.';dbname='.$mysqldb.';charset=utf8mb4', $mysqluser, $mysqlpass);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO:... | true |
538ce1dce614aee21b55355b257b1b1a92f44f0a | PHP | vimes1984/ItalyStrap | /lib/custom_meta_box.php | UTF-8 | 1,771 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
//Meta box to visualize slide in home page
//http://wp.tutsplus.com/tutorials/plugins/how-to-create-custom-wordpress-writemeta-boxes/
add_action( 'add_meta_boxes', 'slide_init' );
function slide_init(){
add_meta_box("slide", __('Select if you want show this in home page slider', 'ItalyStrap'), "italystrap_select... | true |
99966ffa53eb66e882130d526a12d88e06e95c57 | PHP | kngell/kngell_new_framwork | /app/Model/taxeregionmanager.class.php | UTF-8 | 795 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
class TaxeRegionManager extends Model
{
protected $_colID = 'trID';
protected $_table = 'taxe_region';
protected $_colTitle = 'tr_rate';
protected $_colIndex = 'tr_country_code';
//=======================================================================
//construct... | true |
733cea141a6ec61fa7eaf60745b25a78d3e43da6 | PHP | avisota/contao-message-element-gallery | /src/DefaultRenderer.php | UTF-8 | 5,913 | 2.59375 | 3 | [] | no_license | <?php
/**
* Avisota newsletter and mailing system
* Copyright © 2016 Sven Baumann
*
* PHP version 5
*
* @copyright way.vision 2016
* @author Sven Baumann <baumann.sv@gmail.com>
* @package avisota/contao-message-element-article
* @license LGPL-3.0+
* @filesource
*/
namespace Avisota\Contao\Messag... | true |
dce9cc029eadbe102a0e9c1838ee16cea01a8eac | PHP | xzeebee/testWSB | /app/Repositories/UserRepository.php | UTF-8 | 296 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\User;
class UserRepository extends BaseRepository{
public function __construct(User $model){
$this->model=$model;
}
public function getAllStudents(){
return $this->model->where('type','student')->orderBy('name','asc')->get();
}
} | true |
36b2ace35c326f0f4c5a48e35f327903fe05bfea | PHP | isotope/core | /system/modules/isotope/library/Isotope/Backend/SubtableVersion.php | UTF-8 | 3,890 | 2.625 | 3 | [] | no_license | <?php
/*
* Isotope eCommerce for Contao Open Source CMS
*
* Copyright (C) 2009 - 2019 terminal42 gmbh & Isotope eCommerce Workgroup
*
* @link https://isotopeecommerce.org
* @license https://opensource.org/licenses/lgpl-3.0.html
*/
namespace Isotope\Backend;
use Contao\Database;
use Contao\StringUtil;... | true |
7bfdb029c72c5299b4680af4f62fd97ac40ad7ee | PHP | fossabot/develovation-project | /develovation/app/core/init/class/__Loader.php | UTF-8 | 2,923 | 2.796875 | 3 | [] | no_license | <?php
/**
* Load the Core File
*/
class __Loader{
/**
* Loader Init
*
* @param bool $is_display_error
*/
public function __construct($is_display_error = true)
{
// Auto Loader
$this->__auto_loader();
// Default Settings
$this->__default_settings();
... | true |
95b8106bfa4a225d016d383b6bb98e72e4794659 | PHP | Mackeloss/SCRUM | /Model/Class/Avis.class.php | UTF-8 | 1,296 | 3.375 | 3 | [] | no_license | <?php
/* Avis.class.php
*
* Décrit l'objet Avis
*
*/
class Avis{
private $id;
private $idArticle;
private $idAdherent;
private $note;
private $critique;
private $date;
/*Constructeur avec critique*/
public function __construct($id, $idArticle, $idAdherent, $note, $critique, $date){
$this->id = $id;... | true |
cd993e85f1c5ff98f61e4fa55960642b4b47f6e0 | PHP | Akshat303/F-S-W-D | /php_Oops/7_constants.php | UTF-8 | 996 | 3.84375 | 4 | [] | no_license | <?php
echo "<h2> PHP class Constants </h2>
<h3> Constant can't be changed once i is declared. <br>
Class constant is declared inside a class wih the const ketword. <br>
class constant are case-sensitive . HowEver, it is recommended to name the constant in all upercase letters. <br>
We can ax=ccess a constant from out... | true |
ea0a1422b4b21307d2f9a321e104851fd415b2ea | PHP | dcotta/code-books | /walace-php5-conceitos/Capitulo 15/image_rectangle.php5 | UTF-8 | 831 | 2.53125 | 3 | [] | no_license | <?php
header("Content-type: image/png");
$_img = imagecreatetruecolor(300,300);
$_w = imagesx($_img);
$_h = imagesy($_img);
$_b = imagecolorallocate($_img, 255,255,255);
imagefilledrectangle($_img, 0,0,$_w,$_h, $_b);
for($_i=0;$_i<=128;$_i++) {
$_r = mt_rand(0,255);
$_g = mt_rand(0,255);
... | true |
4170d4dfff36f7c3a752f80ab8794c6cbefcf2b6 | PHP | omarqe/brievcase | /includes/class-theme.php | UTF-8 | 10,223 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Showcase - an open source portfolio platform for freelancers.
*
* @package Showcase.Themes
* @author Omar Mokhtar Al-Asad
* @link http://omarqe.com
*
* @copyright Copyright (C) 2016-2017 Margs Empire. All right reserved.
* @license MIT license; see LICENSE.txt for more detials.
**/
/**
* ... | true |
21c0dadd3e6499a36cceb4cf31069c4fb6030905 | PHP | ontechgg/om30 | /app/Helpers/function_helper.php | UTF-8 | 1,731 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
function replace_fields($value){
$value = trim($value);
$value = str_replace(".", "", $value);
$value = str_replace("-", "", $value);
$value = str_replace(" ", "", $value);
return $value;
}
function valid_cpf($cpf)
{
// Verifiva se o número digitado contém todos os digitos
$cpf = str_pad(preg_repl... | true |
fbf84d24b18d9dc89e1fd579b021c0eab6727f2c | PHP | rahulyhg/wohlig | /system/database/drivers/mssql/mssql_utility.php | UTF-8 | 1,460 | 2.640625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license http://codei... | true |
7be8c2a3b147a48c8c285da63e3ebe8ae4354843 | PHP | google/site-kit-wp | /includes/Core/Authentication/Clients/OAuth2.php | UTF-8 | 1,456 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Class Google\Site_Kit\Core\Authentication\Clients\OAuth2
*
* @package Google\Site_Kit
* @copyright 2022 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://sitekit.withgoogle.com
*/
namespace Google\Site_Kit\Core\Authentication\Clients;
use ... | true |
9a26dc6c3e64a1d43a0ac0c3a170557aaf0cb09d | PHP | Mpreyzner/FMTGP | /FMTGP.php | UTF-8 | 977 | 3.71875 | 4 | [] | no_license | <?php
/*
* Algorithms from
* From Mathematics to Generic Programming
* by Alexander A. Stepanov, Daniel E. Rose
* written by me as an exercise
*/
/**
* egyptian multiplication by addition algorithm
* variables names suck but i dont intent do reuse it so
* @param type $a
* @param type $n
* @return type int
... | true |
e6da142ae3602c2431592d19a17a2e9aed6949e0 | PHP | Joyboo/curl-oauth | /examples/WeiXin.php | UTF-8 | 1,146 | 2.640625 | 3 | [] | no_license | <?php
/**
* @author gaobinzhan <gaobinzhan@gmail.com>
*/
class WeiXin
{
public function index()
{
$config = new \OAuth\WeiXin\Config();
$config->setAppId('appid');
$config->setState('easyswoole');
$config->setRedirectUri('redirect_uri');
$oauth = new \OAuth\WeiXin\OA... | true |
e233699a7d2cb11ef5e229e928e0cbffac924927 | PHP | contributte/apitte | /tests/Cases/OpenApi/Schema/ContactTest.php | UTF-8 | 1,278 | 2.625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Tests\Cases\OpenApi\Cases\Schema;
require_once __DIR__ . '/../../../bootstrap.php';
use Apitte\OpenApi\Schema\Contact;
use Tester\Assert;
use Tester\TestCase;
class ContactTest extends TestCase
{
public function testOptional(): void
{
$contact = new Contact();
$cont... | true |
2db7e38496e86aa1ac30b5c9eed1692147be217d | PHP | TheDreamatorium/design-patterns-implementation | /src/Iterator/Mp3IteratorInterface.php | UTF-8 | 181 | 3 | 3 | [] | no_license | <?php
interface Mp3IteratorInterface
{
public function hasNext(): bool;
public function hasPrevious(): bool;
public function next();
public function previous();
}
| true |
179c4306b95b688d1abe7ee145fab7d60558ebe4 | PHP | suhanyujie/laravelBlog | /app/MyBlog/Services/AuthService.php | UTF-8 | 2,003 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Samuel
* Date: 2019/4/19
* Time: 14:18
*/
namespace App\MyBlog\Services;
class AuthService
{
public function checkIsBot(array $params)
{
$options = [
'score' => 0,
];
$options = array_merge($options, $params);
if ($opti... | true |
da2d0fe620a622cc49e07dcec936c10cfcf289bd | PHP | MalejaMartos/ProyecEmprendi | /search-the-food-master/registroEstablecimiento.php | ISO-8859-2 | 2,063 | 2.671875 | 3 | [] | no_license | <?php
/*Archivo encargado del registro del cliente en la base de datos*/
include_once("config.php");
//se capturan los datos enviados por el metodos POST
$nombre = $_POST['nombre'];
$tipoComida = $_POST['tipoComida'];
$descripcionHorario = $_POST['descripcionHorario'];
$latitud = $_POST['latitud'];
$longitud =... | true |
4d9407bfaf34608058271a9854b7959419a99a5f | PHP | alex-yashin/pina-media | /src/Storages.php | UTF-8 | 310 | 2.65625 | 3 | [] | no_license | <?php
namespace PinaMedia;
class Storages
{
public static function get($storageKey)
{
static $storages = array();
if (!empty($storages[$storageKey])) {
return $storages[$storageKey];
}
return $storages[$storageKey] = new Storage($storageKey);
}
} | true |
bf5630db2fdfe0128e0615ff3c3f9e1aba2de638 | PHP | manuelsayago15/php_exercises | /exercises/exercise02.php | UTF-8 | 773 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Exercise 2</title>
<meta charset="utf-8">
</head>
<body>
<form name="form1" method="post" action="#"> <!-- action tenía calculadora.php -->
<label for="num1"></label>
<input type="text" name="name" id="name" placeholder="Ingresa tu nombre">
... | true |
3e1c8ba2cd2fde4ec2e9b12dd78f9dffeb773686 | PHP | ibndooom/magento_2016_7 | /beyondyoga_usa/app/code/community/CueBlocks/SitemapEnhanced/Model/SitemapEnhancedIoFile.php | UTF-8 | 4,011 | 2.78125 | 3 | [] | no_license | <?php
/**
* Description of SitemapEnhancedIoFile
* @package CueBlocks_SitemapEnhanced
* @company CueBlocks - http://www.cueblocks.com/
* @author Francesco Magazzu' <francesco.magazzu at cueblocks.com>
*/
class CueBlocks_SitemapEnhanced_Model_SitemapEnhancedIoFile extends Varien_Io_File
{
/**
* F... | true |
cfa1aaebe06ab479fc15f487426ae120cd4f51fe | PHP | duhon/phppatterns | /patterns/decorator/0.1.php | UTF-8 | 804 | 3.328125 | 3 | [] | no_license | <?php
abstract class Beverage
{
protected $description;
protected $cost = 0;
public function getDescription()
{
return $this->description;
}
abstract public function cost();
}
class HouseBlend extends Beverage
{
protected $description = 'Древний рецепт кавы';
public function cost()
{
return 12;
}
}
c... | true |
366a94d47e357f04f53e71aa74bba58f3b22546d | PHP | robertmylne/test-multiple-domains | /app/Http/Controllers/Controller.php | UTF-8 | 666 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Site;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use Au... | true |
4130e887c3ef6b0d6281080c3983a2d3d649a66b | PHP | candango/myfuses | /util/data/MyFusesDataUtil.class.php | UTF-8 | 3,872 | 2.640625 | 3 | [] | no_license | <?php
/**
* MyFusesDataUtil - MyFusesDataUtil.class.php
*
* This is utility class has some methdos that handles basic php transforming
* and encoding.
*
* PHP version 5
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except i... | true |
2b0d7c7e8e11ee7b79d04419f56ccd89656a4ced | PHP | michaelventura01/MasterManager | /API/eventos/eventos.php | UTF-8 | 542 | 2.578125 | 3 | [] | no_license | <?php
require_once("../model/evento.php");
if($_SERVER['REQUEST_METHOD']){
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Content-Type: application/json');
}
function verEventosActivos($estados, $documentos){
$evento = new Evento();
... | true |
daa3b30b7bbff2172d137a6633edea0255a375ab | PHP | Ahmed-Halim/Hotel-System | /header.php | UTF-8 | 2,784 | 2.75 | 3 | [] | no_license | <?php
//in order to display nav bar in different ways for guest, hotel manager and admin we did the following
//if there is session get user id of it
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
}
if (isset($_COOKIE['user_id'])) {
$user_id = $_COOKIE['user_id'];
}
//function check if user... | true |
4cc666f653402a6c1d2265a98d37b55a59e9d16b | PHP | arbi/MyCode | /backoffice/library/DDD/Domain/Apartment/Search/Apartment.php | UTF-8 | 2,955 | 2.90625 | 3 | [] | no_license | <?php
namespace DDD\Domain\Apartment\Search;
/**
* Specific domain to use in product autocomplete
* @author Tigran Petrosyan
* @final
*
* @package core
* @subpackage core/domain
*/
final class Apartment
{
protected $id;
protected $status;
protected $url;
protected $name;
protected $city;
... | true |
4a2f563d89ca6eb4374d34321ba64c8b85f3eb1e | PHP | mselorm/voters-app | /engine.php | UTF-8 | 10,003 | 2.53125 | 3 | [] | no_license | <?php
/*********************
* login function
/*********************/
function login_user(){
include 'db.php';
extract($_POST);
if(!empty($phone)){
$this_phone = mysqli_real_escape_string($con, $phone);
$verify_num = rand();
$verify_num = subst... | true |
f8d37a19a0a3a518fe864da22e6c34c9a3e57d5b | PHP | HemGrg/b2bvue | /Modules/Payment/Service/TransactionService.php | UTF-8 | 1,717 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Payment\Service;
use Modules\Payment\Entities\Transaction;
class TransactionService
{
// Currently not being used anywhere
public function deposit($vendorId, $amount, $isCod, $remarks = null)
{
try {
$currentBalance = $this->getCurrentBalance($vendorId);
... | true |
d47e17ab7c30477f6d320e6bc1b1393fc04f32f6 | PHP | btcpayserver/btcpayserver-php-client | /src/BTCPayServer/Payout.php | UTF-8 | 8,671 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* @license Copyright 2019 BTCPayServer, MIT License
* see https://github.com/btcpayserver/btcpayserver-php-client/blob/master/LICENSE
*/
namespace BTCPayServer;
/**
* Class Payout
* @package BTCPayServer
*/
class Payout implements PayoutInterface
{
/**
* @var string
*/
protected $id;... | true |
2995eed1d9148f9cfcb6674ca92a0484634afeb8 | PHP | code-ans/server | /app/Http/Controllers/AuthController.php | UTF-8 | 1,106 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use DB;
use JWT;
use Carbon\Carbon;
class AuthController extends Controller
{
public function test()
{
if (JWT::isNeedToRefresh()) {
$token = JWT::refresh();
return success_response([
'message' => 'token is need to refresh',
'token' => $token
]);
} else {... | true |
1816d0399c7204563dcf0b84649383c279f594a8 | PHP | matt9mg/c5-profiler | /mt_profiler/src/DataCollector/LogDataCollector.php | UTF-8 | 2,165 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Concrete\Package\MtProfiler\DataCollector;
use Concrete\Core\Logging\LogList;
use Concrete\Core\User\User;
use DebugBar\DataCollector\DataCollector;
use DebugBar\DataCollector\Renderable;
/**
* Class LogDataCollector
* @package Concrete\Package\MtProfiler\DataCollector
*/
... | true |
b0088d52fa1fb27bc0cb0f2524725bd64cc28643 | PHP | mstovicek/kamoza-board | /index.php | UTF-8 | 4,531 | 2.609375 | 3 | [] | no_license | <?php
/**
* ?reset - shows form to set Jira password
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
require __DIR__ . '/vendor/autoload.php';
session_start();
if (isset($_GET['reset']) || !isset($_SESSION['username']) || !isset($_SESSION['password'])) {
if (isset($_POST['username']) && isset($_POST... | true |
900090759ab5c49d565802a516a2694daa9b012b | PHP | TheBheta/CubeClash | /getScramble.php | UTF-8 | 583 | 3.09375 | 3 | [] | no_license | <?php
$lastTwist = "";
$lastAxis = "";
$scramble = "";
$moves = ["L", "R", "U", "D", "F", "B"];
$suffixes = ["", "'", "2"];
for ($j = 0; $j < 20; $j++){
$createdMove = false;
$move = random_int(0, 5);
while (!$createdMove){
if ($lastTwist == $move || $lastAxis == floor($move/2)){
$move ... | true |
b27b688cc9408e1c880af69d8b647c02821c6d07 | PHP | shoemoney/PHPplayground | /Iterator.php | UTF-8 | 859 | 3.640625 | 4 | [] | no_license | <?php
use Countable, Iterator;
class Book
{
private string $name;
private string $author;
function __construct($name, $author)
{
$this->name = $name;
$this->author = $author;
}
function getName()
{
return $this->name;
}
}
class BookList implements Countable, Iterator
{
private array $... | true |
8de8df5c872a5a818a82b5c57a724697bc0ce7d1 | PHP | MontanariMirko/progetto-SAR | /php/carica_novita.php | UTF-8 | 870 | 2.546875 | 3 | [
"Unlicense"
] | permissive | <?php
//File di configurazione del database
include 'config.php';
$return_arr = array();
$username = mysql_real_escape_string($_POST['usr']);
//caricamento delle novità
$query = "SELECT testo,data FROM novita WHERE user1='".$username."' OR user2='".$username."' GROUP BY data";
$result = mysql_qu... | true |
7d7e14797aed79016382fde263c122605070e0a7 | PHP | flatphp/pagination | /Style/Elastic.php | UTF-8 | 787 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace Flatphp\Pagination\Style;
use Flatphp\Pagination\Paginator;
class Elastic extends Sliding
{
public function getRange(Paginator $paginator)
{
$page_range = $paginator->getPageRange();
$current_page = $paginator->getPage();
$page_count = $paginator->getPageCount();
... | true |
a8625e9e42a7271fe4c523b8a43f59343c5a505b | PHP | timglabisch/pimunit | /lib/Pimunit/Controller/Dispatcher/Standard.php | UTF-8 | 4,613 | 2.53125 | 3 | [] | no_license | <?php
class Pimunit_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Standard {
protected $hooks = array();
public function setHooks(array $arrayOfCallables) {
foreach($arrayOfCallables as $v)
if(!is_callable($v))
throw new \Exception('invalid Arg');
... | true |
37ea68933eb2eaa56162b7e77395031ce8bd0163 | PHP | baksiu/elektroniczna_biblioteka | /aplikacje/source_code/wypozycz.php | UTF-8 | 1,181 | 2.78125 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['login']))
{
header("location:index.php");
}
include 'classes.php';
?>
<head>
<title>e-Biblioteka</title>
</head>
<body>
<form method="post" action="mainpage.php">
<input type=submit name=logout value="Strona glowna">
</form>
<?php
print("Zalogowany jako: ");
print($_... | true |
8147de4bd42f1cb20ab6c38a683a23f97e292d22 | PHP | nathanchantrell/emonextras | /csv.php | UTF-8 | 891 | 2.921875 | 3 | [] | no_license | <?php
// Emonextras csv feed
// I use this with cosm.com so that cosm can pull data from emoncms
// Just give cosm the url to pull from eg. http://yourserver/csv.php
// By Nathan Chantrell http://nathan.chantrell.net
// Connect to DB (change USER, PASSWORD and DATABASE)
$link = mysql_connect("localhost", "USER", "P... | true |
7e0227766c350f270123a314d2d5bb0743442984 | PHP | Ratha8/rachna | /model/manageparent.php | UTF-8 | 6,316 | 2.625 | 3 | [] | no_license | <?php
include 'parents.php';
function insertParent($parent){
$conn = getConnection();
$sql = "INSERT INTO T_Parents(
student_id,
parent_name,
nationality,
relationship,
position,
contact_number,
addre... | true |
50b149a7774190322bb7583aacbe13b143140a64 | PHP | Billinkbv/Magento-2 | /Gateway/Request/ActionDataBuilder.php | UTF-8 | 1,733 | 2.515625 | 3 | [] | no_license | <?php
namespace Billink\Billink\Gateway\Request;
use Billink\Billink\Gateway\Helper\SubjectReader;
use Billink\Billink\Gateway\Helper\Workflow as WorkflowHelper;
use Billink\Billink\Observer\DataAssignObserver;
use Magento\Payment\Gateway\Request\BuilderInterface;
/**
* Class AddressDataBuilder
*/
class ActionData... | true |
a183541c50a444a24c632a475c4dda9a4af8132d | PHP | kompo/kompo | /src/Commands/MakeForm.php | UTF-8 | 1,545 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Kompo\Commands;
use Illuminate\Console\GeneratorCommand;
class MakeForm extends GeneratorCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'kompo:form {name} {--demo}';
/**
* The console command description.
... | true |
a31d746f1b6fe7885a0d44134579011a3932a214 | PHP | ChrisPortokalis/DataBaseProject | /Project/addClass.php | UTF-8 | 2,547 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<?php require("projFuncs.php");
session_start();
checkLogin('admin');
menuBar();
?>
<html leng = "en">
<head>
<title> Project: Chris Portokalis </title>
<link rel = "stylesheet" type ="text/css" href = "projStyle.css">
<meta http-equiv="Content-Type" content="text/html" charset= "utf-... | true |
7367d734eb9135e7ec4d438ff3d2809aecef7405 | PHP | luongtruonggiang/demo3 | /entities/product.class.php | UTF-8 | 1,047 | 2.9375 | 3 | [] | no_license | <?php
require_once("/config/db.class.php");
class Product{
public $productID;
public $productName;
public $cateID;
public $price;
public $quantity;
public $description;
public $picture;
public function __construct($pro_name, $cate_id, $price, $quantity, $desc, $pictur... | true |
7c0d1c28e018e5f426600b22d74829bea56bafe8 | PHP | MiloTang/BeeNoob | /Core/Libs/drive/log/MysqlLog.class.php | UTF-8 | 1,222 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: milo
* Date: 11/1/2016
* Time: 6:33 PM
*/
namespace Core\libs\Drive\Log;
use Core\libs\Model;
class MysqlLog implements Log
{
private static $_instance;
private function __construct()
{
}
public static function getInstance()
{
if (!(self::$... | true |
0ed1655e5b713c96f7c3b018f026a2b5f61b25ee | PHP | chiangyiyang/PhpTutorial | /1003/06-02-02.php | UTF-8 | 374 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<?php
print_r($_POST);
echo "<hr>";
if ($_POST["usrname"] == "abc" && $_POST["passwd"] == "123")
$login = "yes";
else
$login = "no";
?>
</head>
<body>
<?php
if ($login == "yes")
print "登入成功";
else
... | true |
0ebc9b2430eeeda94b39cdfb2ac48b59d67e608d | PHP | Diego-Brocanelli/random-data | /src/Validate/CNPJ.php | UTF-8 | 1,091 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Random\Validate;
/**
* @author Diego Brocanelli <contato@diegobrocanelli.com.br>
*/
class CNPJ
{
/**
* Code ported from:
* - https://github.com/Respect/Validation
* - jsfromhell.com
*/
public function isValid(string $cnpj): bool
{
... | true |
11da6d60cfff6db8fd5bd9353c30f1ca420321c8 | PHP | g4code/tasker | /src/Injector.php | UTF-8 | 2,452 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace G4\Tasker;
use G4\Tasker\Model\Domain\Recurring;
use G4\Tasker\Model\Domain\Task as TaskDomain;
use G4\Tasker\Model\Repository\RecurringRepositoryInterface;
use G4\Tasker\Model\Repository\TaskRepositoryInterface;
use G4\Cron\CronExpression;
use G4\ValueObject\Uuid;
class Injector
{
/**
* @va... | true |
e5c92a14cd36bfa661f8c8ba2bd29008a1174f94 | PHP | hamidgh83/onlinequiz | /src/Service/RouteService.php | UTF-8 | 4,089 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace Service;
class RouteService
{
/**
* Controller
*
* @var string
*/
private $controller = 'index';
/**
* Action
*
* @var string
*/
private $action = 'index';
/**
* Params
*
* @var array
*/
private $params = [... | true |
f44ed917c670752c5a0285913f75451985709839 | PHP | april-kelly/port | /includes/models/users.php | UTF-8 | 11,654 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2013 William Caleb Kelly
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | true |
2f51ad98fe7f4abeb9fd9d558d71336c61d4172d | PHP | dev0x13/roxifi | /protected/models/BlogsMessages.php | UTF-8 | 6,878 | 2.765625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "blogs_messages".
*
* The followings are the available columns in table 'blogs_messages':
* @property integer $id
* @property integer $user
* @property string $name
* @property string $text
* @property string $time
* @property integer $privacy
*/
class BlogsMess... | true |
3ca0a6441e0631fc8cb2bc1fe93e16eb00a381cb | PHP | dimitri-moeson/poo | /App/Model/Table/Game/Item/ItemTable.php | UTF-8 | 6,173 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* UserEntity: admin
* Date: 01/05/2019
* Time: 18:28
*/
namespace App\Model\Table\Game\Item;
use App\Model\Entity\Game\Item\ItemEntity;
use App\Model\Table\Game\GameTable;
use Core\Database\Query;
use Core\Database\QueryBuilder;
class ItemTable extends GameTable
{
/**
*... | true |