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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
91e1760f0f49e58ac0b87f3bba046a8d1368f4e9 | PHP | clementbiron/dfwp_replace | /dfwpreplace.php | UTF-8 | 5,912 | 2.53125 | 3 | [] | no_license | <?php
/*
Plugin Name: DFWPReplace
Plugin URI:
Description: Replace URLs in posts GUID and posts content
Version: 1.0.0
License: GPL2
Author: Clément Biron
Author URI: http://www.clementbiron.com
Text Domain: dfwpreplace
Domain Path: /lang
*/
//Exit si accès direct
if(!defined('ABSPATH')) exit;
if(!class_exists('DFWP... | true |
c83c85962fb82dde8291c56c306307110f1e10fe | PHP | Corvo/Chain | /Chain.php | UTF-8 | 8,233 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Twire\Common\Decorators;
use \BadMethodCallException;
/**
* Decorator class Chain
*
* As long as "setter" methods are called (as in: no return value) then $this is returned.
* This allows method-chaining on an otherwise unchainable object.
*
* Only downside is that methods that intent... | true |
be33056267d10df87a37b7a6e0fc0cae814fd375 | PHP | laurynasgadl/travers | /tests/TraversTest.php | UTF-8 | 6,494 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Luur\Tests;
use Luur\Exceptions\BranchNotFoundException;
use Luur\Travers;
use PHPUnit\Framework\TestCase;
class TraversTest extends TestCase
{
/**
* @var array
*/
protected $tree;
public function setUp(): void
{
parent::setUp();
$this->tree = [
... | true |
4f8c72a7da3b892e800b7834df58634a868ffcc9 | PHP | xiaomalover/yii2study | /console/migrations/m160507_123635_create_sphinx_test.php | UTF-8 | 2,008 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* This will create `document` and `tags` table for sphinx test
* Table is designed as same as the sphinx documentation
*/
class m160507_123635_create_sphinx_test extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('{{%docu... | true |
20a428bffb7216e97f36ea7ab106af6789186520 | PHP | nicomisfits/Programacion-III | /Practico_Uno/calculadora.php | UTF-8 | 335 | 3.640625 | 4 | [] | no_license | <?php
$operador="*";
$op1=10;
$op2=2;
switch($operador)
{
case "+":
echo "La suma es ".($op1 + $op2);
break;
case "-":
echo "La resta es ".($op1 - $op2);
break;
case "*":
echo "La multiplicacion es ".($op1 * $op2);
break;
case "/":
echo "La division es ".($op1 / $op2);
... | true |
409bcad4ea7d5e014e4c201f12d4c3db3451e3c1 | PHP | haleemason/hackd-web | /static/avg_monthly_usage_per_day.php | UTF-8 | 1,203 | 2.609375 | 3 | [] | no_license | <html>
<body>
<?php
$servername = "removed";
$username = "removed";
$password = "removed";
$dbname = "removed";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//$sql = "SELEC... | true |
cfafb4f0ffc5ba6347a41fa80df89d1b6c5106e4 | PHP | oxitovaldeci/WEBSOAP | /fruits-server.php | UTF-8 | 615 | 3.203125 | 3 | [] | no_license | <?php
class Fruit{
private $fruits;
public function __construct(){
$f = file_get_contents("fruits.json");
$this->fruits = $f;
}
public function getPrice($fruit){
return $this->fruits[$fruit];
}
public function getFruits(){
echo "<pre>";
var_dump($this->fruits);
echo "</pre>";
... | true |
c1670f77f42ec764b3825aa03832e23f01d4475e | PHP | AntonZaharewsky/restapi | /src/AppBundle/Controller/UsersController.php | UTF-8 | 3,710 | 2.59375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Controller;
use AppBundle\Services\UsersDataStore;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Except... | true |
4928a021cb141bebc64edcc41497bb689d74515f | PHP | Albert4940/Map_App | /model/address/Address.php | UTF-8 | 978 | 3.375 | 3 | [] | no_license | <?php
/**
* class represent the addresses
*/
class Address
{
private $_id;
private $_address;
private $_city;
private $_country;
private $_zip_code;
public function __construct( array $data )
{
$this->hydrate( $data );
}
private function hydrate($data)
{
foreach ($data as $key => $va... | true |
519bef57e792c2cf5078e6ba2f9737f30de1272a | PHP | vasyldorosh/autofiles | /protected/models/RimBoltPattern.php | UTF-8 | 3,530 | 2.5625 | 3 | [] | no_license | <?php
class RimBoltPattern extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return BodyStyle the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
... | true |
025897a00e8a9e7def9e98dd5675433b7aa63df9 | PHP | TeerapatPond/SoftwareTestingProject | /src/deposit/service.php | UTF-8 | 3,488 | 2.734375 | 3 | [] | no_license | <?php
require_once '../serviceauthentication/serviceauthentication.php';
//require_once '../serviceauthentication/stub_serviceauthentication.php';
function connect_database()
{
$con = mysqli_connect("sql128.main-hosting.eu",
"u334971496_cutqa", "cutqa1234", "u334971496_cutqa");
if (mysqli_connect_errn... | true |
951bd2d1209365e87ba8f98173d057f664a9b682 | PHP | js-wei/Wechat | /ThinkPHP/Library/Vendor/Snake/CResponseGetPlayerStatusFromStateServer.php | UTF-8 | 1,990 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*
* User: snake
* Date: 14-11-15
* Time: 下午1:55
*/
class CResponseGetPlayerStatusFromStateServer
{
public $ResultID;
public $MyUin;
public $Count;
public $PlayerStatus;
public $buffer;
function __construct()
{
$this->Count = 0;
}
public function getBuff... | true |
6096d89f997437ba63f2a670b13bcb5b87f1539a | PHP | elmeriki/session_form | /controller/Form.php | UTF-8 | 422 | 2.921875 | 3 | [] | no_license | <?php
class Form{
private $name;
private $gname;
private $cname;
public function person($newname){
$this->name = $newname;
echo "Your Student Name is :$newname ";
}
public function guadian($newgname){
$this->gname = $newgname;
echo "Your Guadiann Name is :$newgname";
}
public function course($newcna... | true |
a343555abb53f79161a2b23722a6ea9fc63ffa4d | PHP | pear/PHP_Compat | /tests/function/array_search.phpt | UTF-8 | 300 | 2.875 | 3 | [] | no_license | --TEST--
Function -- array_search
--FILE--
<?php
require_once 'PHP/Compat/Function/array_search.php';
$array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red');
var_dump(php_compat_array_search('green', $array));
var_dump(php_compat_array_search('red', $array));
?>
--EXPECT--
int(2)
int(1) | true |
e9631d188bfda08c036eaa160fa76f1efbaf8d35 | PHP | iheblhbib/caisses | /fetch.php | UTF-8 | 440 | 2.703125 | 3 | [] | no_license | <?php
if(isset($_POST['action']))
{
include('database_connection.php');
$output = '';
$query = "
SELECT price, name FROM tbl_product
WHERE name = :name
";
$statement = $connect->prepare($query);
$statement->execute(
array(
':name' => $_POST["query"]
)
);
$result = $statement->fetchAll(... | true |
7ca70798248eb19d658d9fadd0441a0251a2e963 | PHP | kuustudio/grab | /models/Cqdata.php | UTF-8 | 1,403 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "cqdata".
*
* @property integer $id
* @property string $alias
* @property string $data_txt
* @property string $start
* @property string $end
* @property integer $regret_number
* @property integer $forever
* @property integer $stat... | true |
3e92393c57b0e290eb094d3e400b1c31b0c42685 | PHP | muhammadizzat/ContractorManagement | /app/Constants/CaseStatus.php | UTF-8 | 248 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Constants;
use Illuminate\Database\Eloquent\Model;
class CaseStatus
{
const OPEN = 'open';
const CLOSED = 'closed';
public static $dict = [
self::OPEN => "Open",
self::CLOSED => "Closed",
];
} | true |
76cb878170bd1d56b05013f2168ec0f016739ba4 | PHP | maksumkurosov/test_old_menu | /controllers/Station.php | UTF-8 | 5,946 | 3.359375 | 3 | [] | no_license | <?php
class Station
{
public function getStationList()
{
// Соединение с БД
$db = Db::getConnection();
// Запрос к БД
$result = $db->query('SELECT id, name, architect, date, short_content, full_content,x,y,number FROM station');
// Получение и возврат результатов
... | true |
f7f11c11b9b10552cf7f74447e5439d591f31250 | PHP | cha63506/crawler | /corpus-ys/Single_Judge.php | UTF-8 | 8,577 | 2.921875 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<?php
require_once "CutWord.php";
/*
*连接mysql
*/
//---------------------------------------------------------------------------------------------
$con = mysql_co... | true |
666963d72f092c0aee2e0d2d8fdf31f22060f9d1 | PHP | luongdoan277/PHP_basic | /Lab3/test_static.php | UTF-8 | 218 | 3.1875 | 3 | [] | no_license | <HTML>
<head>
<title>
hello
</title>
</head>
<body>
<?php
function decrement(){
static $static_int =99;
$static_int --;
echo"the decrement is $static_int";
}
decrement();
?>
</body>
</HTML> | true |
837389053403c5f4a25f3e1a08d0d6c03348fb1f | PHP | hanacapr4/sissmkn2 | /config/ujian-online/jawaban-siswa.php | UTF-8 | 2,617 | 2.5625 | 3 | [] | no_license | <?php
class Jawaban_siswa extends Database{
function buat_kode($kunci, $jumlah_karakter=0 ){
$con = $this->dbconnect();
$sql = "SELECT id_jawaban_siswa as max_id_ujian FROM jawaban_siswa ORDER BY id_jawaban_siswa DESC LIMIT 1";
$query = mysqli_query($con,$sql);
$datakode = mysqli_fetch_array($query);
if (... | true |
875d9fd258463393d5ebccf03778adbc397bf847 | PHP | vinaysanwal/larvelphpoops | /init.php | UTF-8 | 3,133 | 3.140625 | 3 | [] | no_license | <?php
use Bookstore\Domain\Book;
use Bookstore\Domain\Customer;
use Bookstore\Domain\Manager;
use Bookstore\Domain\Customer\Basic;
use Bookstore\Domain\Customer\Premium;
use Bookstore\Domain\Payer;
//autoloader function to autoload classes
function autoloader($classname){
$lastSlash = s... | true |
4ad75c473a50cacbd04e1e4bf561f2136882b8f3 | PHP | aweapi/openapi-elements | /src/Builders/MediaTypesBuilder.php | UTF-8 | 1,036 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Aweapi\Openapi\Builders;
use Aweapi\Openapi\Objects;
final class MediaTypesBuilder implements Objects\MediaTypesFactory
{
private $mediaTypes = [];
public function addMediaTypes(iterable $mediaTypes): self
{
foreach ($mediaTypes as $key => $mediaType) {
... | true |
c7b3be39ae5425ea0fb20153ad4728cb0cf9841f | PHP | baekdoo7/test01 | /getipaddress.php | UTF-8 | 10,875 | 2.671875 | 3 | [] | no_license | <?php
/*
// www.krnic.or.kr/jsp/infoboard/stats/interProCurrentXml.jsp 에서
// 아이피정보를 받아 아이피를 국내 IP 생성
//http://www.ipwatch.co.kr/ip/?ip=210.180.216.195
*/
ob_start();
//메모리사이즈와 실행시간 프리...
ini_set("max_execution_time",3000);
ini_set("memory_limit",-1);
/*전역변수 정의*/
$dbInfo = array("localhost","root","root","adop_tes... | true |
92cdf0671dfea6687cdb790c283d7b538e43f928 | PHP | hrach/hlen | /tags/0.5/hform_conditions.php | UTF-8 | 2,437 | 2.8125 | 3 | [] | no_license | <?php
/**
* HLEN FRAMEWORK
*
* @author Jan Skrasek <skrasek.jan@gmail.com>
* @copyright Copyright (c) 2008, Jan Skrasek
* @version 0.5 $WCREV$
* @package Hlen
*/
class HFormCondition
{
private $rule;
private $form;
private $el;
private $arg;
private $rule... | true |
0a1ca1593cc19e07abfe228d143c9b07bd72b05a | PHP | ctiborv/spitzen-wein.ch | /include/classes/views/navmenu_view.class.php | UTF-8 | 1,515 | 2.625 | 3 | [] | no_license | <?php
class Navmenu_View extends Template_Based_View
{
public function __construct(View_Manager $view_manager)
{
parent::__construct($view_manager);
$this->_attributes->register('current'); // currently active menuitem
$this->_attributes->register('autodetect'); // automatic detection of current menuitem (over... | true |
feecf0971c93e0164c3f768b1123cd9223b8e2d0 | PHP | ibnaliou/PROJET-PHP-SESSION | /login.php | UTF-8 | 1,592 | 2.734375 | 3 | [] | no_license | <?php
//good login admin et good login user good password user et good password admin profil admin et user
$listUser=fopen("new2.txt", 'r+');
$nbre_d_utilisateur = fopen('compteur.txt', 'r+');
$nombre = fgets($nbre_d_utilisateur);
for ($i=0;$i<$nombre;$i++) {
$users = fgets($listUser);
$info=explode("-",$us... | true |
46823c429b2bf8da31d38e982a3052bb7cde4f22 | PHP | chuniman/PhpTecnologias | /app/controllers/AuthController.php | UTF-8 | 1,149 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Models\User;
use Zend\Diactoros\Response\RedirectResponse;
class AuthController extends BaseController {
public function LoginView() {
return $this->renderHTML('login.twig');
}
public function LoginUser($request) {
$postData = $request->getParsed... | true |
f06b09ce07525185a6e2a8bd4b336130289a3ad6 | PHP | guillez/ramas | /php/nucleo/formulario/kolla.php | UTF-8 | 1,241 | 2.84375 | 3 | [] | no_license | <?php
/**
* Esta clase contiene el puente hacia TOBA. Si se quisiese utilizar con otro
* framework hay que implementar estos objetos (con la misma interfaz).
*
* @author demo
*/
class kolla
{
static private $rest_php;
static private $abm_php;
/**
* @return toba_db
*/
static function db()... | true |
6819032ae8a01a6ccf63b264ec19d71ba9e143e2 | PHP | congloib3/TTVH | /token.php | UTF-8 | 1,024 | 2.9375 | 3 | [] | no_license | <?php
$n =0; $id=0; $r1=0; $r2 =0; $c=0;
$k=0; $k2=8259;
$t ="";
$x=0;
$id = 879176;
$k=4256891;
$x = $id;
$n = date("d") *1000 + date("m")*10 + date("s");
$r1= 1+2;//role
$r1= $r1 ^ (($id + 6655) % 10000);
$id = $id ^ $n;
$n = $n ^ $k;
$c=0;
while ($x !=0)
{
$c = $c+ $x%10;
$x = $x /10;
}
$c = $c%10;
$t = "5".$c... | true |
a552ad95b9f244ae0aaf56739e278f6fb484bf65 | PHP | KasunDA/PostalMailManagementSystem | /connect.php | UTF-8 | 421 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_NOTICE);
function connect()
{
define('DB_HOST', 'localhost');
define('DB_NAME', 'pmms');
define('DB_USER','root');
define('DB_PASSWORD','123');
$con=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysqli_error());
$db=mysqli_se... | true |
7aca054d62c2f9d9588ed6f8b4d84fcfbfd636f8 | PHP | nikolairevkin/MapSite | /backend/app/Http/Controllers/UserController.php | UTF-8 | 3,360 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
use App\User;
class UserController extends Controller
{
private $status_code = 200;
public function userSignUp(Request $request) {
$validator = Validator::make($request->all(), [
"name" => "required",
... | true |
61b584d016a77550cc1d5a006fe03fc3c3730b82 | PHP | sasin91/ia-ddd | /app/Domains/Agent/Models/Account.php | UTF-8 | 5,502 | 2.625 | 3 | [] | no_license | <?php
namespace App\Domains\Agent\Models;
use Throwable;
use App\User;
use function config;
use Ramsey\Uuid\Uuid;
use function data_get;
use BenSampo\Enum\Traits\CastsEnums;
use App\Domains\Billing\BillingMethod;
use App\Domains\Billing\Models\Revenue;
use Illuminate\Database\Eloquent\Model;
use App\Domains\Agent\Enu... | true |
a21bc11782dd61ce9123c75400a090c8de2c8fd8 | PHP | FailLikeAChamp/uswriters | /app/UsWriters/Models/Letter.php | UTF-8 | 1,567 | 2.734375 | 3 | [] | no_license | <?php
namespace UsWriters\Models;
use \ActiveRecord\Model;
class Letter extends Model
{
static $belongs_to = array(
array('writer'),
array('contact')
);
static $validates_presence_of = array(
array('writer_id', 'message' => 'Could not find the writer!', 'on' => 'create'),
array('contact_id', 'messa... | true |
be4e1397cd9d97e2c5bda6d254ccc46f0fc6aa72 | PHP | weezyjagbabe/admin | /dashboardBarChart.php | UTF-8 | 2,938 | 2.546875 | 3 | [] | no_license | <?php
$pageName = "DashboardBarChart"; // Set the page name
require_once './models/classes/Configurations.php'; // Include the configurations class
require_once './controllers/formProcess.php';
if( !$AdminClass -> adminIsLoggedin() ) { $AdminClass -> redirect( 'sign-in' ); }
//
$approv... | true |
73fe47df18701576852673469dcb7acd68cdf805 | PHP | chitkadia/doodooadmin | /src/Models/ResourceMaster.php | UTF-8 | 1,344 | 2.546875 | 3 | [] | no_license | <?php
/**
* Model file for operations on resource_master table
*/
namespace App\Models;
class ResourceMaster extends AppModel {
// Initialize model
use ModelInitialize;
/**
* @override
*/
protected function _setTable() {
$this->_table = "resource_master";
$this->_table_ali... | true |
f00049c141e1c9a1438d2a25a398add7c9fc69a4 | PHP | the2baddavid/GIVECenter | /sql/update/update_banner_old.php | UTF-8 | 3,302 | 2.828125 | 3 | [] | no_license | <?php
include_once(dirname(__FILE__).'/../../php/MySQLDatabase/MySQLDatabaseConn.php');
include_once(dirname(__FILE__).'/../../php/ini/GIVECenterIni.php');
$conn =0;
try{
$conn = new MySQLDatabaseConn($GIVE_MYSQL_SERVER, $GIVE_MYSQL_DATABASE, $GIVE_MYSQL_UNAME, $GIVE_MYSQL_PASS);
}
catch(Exception $e){
echo $e;
}
... | true |
f12bf86cf83e5deac4b2351dfb517381ef0da48e | PHP | crayner/Busybee | /src/Timetable/Form/Subscriber/TimetableSubscriber.php | UTF-8 | 1,848 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Timetable\Form\Subscriber;
use App\Core\Manager\SettingManager;
use App\Entity\TimetableDay;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
class TimetableSubscrib... | true |
e151884b1751c3465568def2e85aee6276122fe7 | PHP | BlackBetty15/8bitFront-end | /ResponseMessages.php | UTF-8 | 3,871 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: milic
* Date: 18.9.2017.
* Time: 22:56
*/
require_once 'Connection.php';
class ResponseMessages
{
private $messageId;
private $receivedMessageId;
private $receiver;
private $sentStatus;
private $finnished;
private $message;
public function __... | true |
10d5b1b59b5ca135f0df1cdc527fb83c5cd231b2 | PHP | PhperCc/Cc | /rdcos/Apps/CenterSite/Sensors/PulseRange.php | UTF-8 | 869 | 2.734375 | 3 | [] | no_license | <?php
use MCU\Sensor\SensorBase;
class PulseRange extends SensorBase
{
protected $portType = 'ModbusRTUPort';
protected $mode = 'passivity';
protected $name = 'PulseRange';
protected $_repeat_command = [0x03,0x00,0x7D];
public function init()
{
$this->interval = $this->getConfig('i... | true |
fa7d7447b0aa16cbba9c8e96c0947a9ce11c69c7 | PHP | tomkyle/atomic | /src/Urls/HasUrlInterface.php | UTF-8 | 237 | 2.578125 | 3 | [] | no_license | <?php
/**
* @author Carsten Witt <carstenwitt@germania-kg.de>
*/
/**
* Namespacing
*/
namespace tomkyle\Atomic\Urls;
/**
* @author Carsten Witt <carstenwitt@germania-kg.de>
*/
interface HasUrlInterface
{
public function setUrl($url);
public function getUrl();
}
| true |
6a1dd5ece3716e43f62357dd7bcc7cfe9ebcc0dd | PHP | yoooong/LaravelForLive | /vendor/lokielse/omnipay-alipay/src/Requests/LegacyExpressPurchaseRequest.php | UTF-8 | 10,548 | 2.546875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace Omnipay\Alipay\Requests;
use Omnipay\Alipay\Responses\LegacyExpressPurchaseResponse;
use Omnipay\Common\Message\ResponseInterface;
/**
* Class LegacyExpressPurchaseRequest
* @package Omnipay\Alipay\Requests
* @link https://doc.open.alipay.com/docs/doc.htm?treeId=108&articleId=104743&docType=1
... | true |
6347d2d94e7d2df94260d8f93d8ca8abe14323cf | PHP | ArmenPetrosyan/WebDesignLabs | /lab9/lab9.php | UTF-8 | 1,358 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Petrosyan
* Date: 14.02.15
* Time: 12:22
*/
error_reporting(~E_WARNING);
function getDayNameUA($day=null){
switch($day){
case 1:return "Понеділок";
case 2:return "Вівторок";
case 3:return "Середа";
case 4:return "Четвер";
case 5:... | true |
99eaf489001cdb810d24f5f11db3631be7f9fbaf | PHP | noriotakei/suraimu | /class/Smarty/libs/extends/function.make_link.php | UTF-8 | 783 | 2.78125 | 3 | [] | no_license | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty {make_link} function plugin
*
* Type: function
* Name: make_link
* リンクURLの作成
*
* Examples:{make_link action="action_*****_*****" getTags=$getTag(引数)}
* @param array
* @param Smarty
* @return string|null
*/
function... | true |
36b34c24fa251c06f54a3ac0d72c9313a65e6284 | PHP | luigif/WsdlToPhp | /samples/xignite-indices/List/XiIndicesServiceList.php | UTF-8 | 5,272 | 2.546875 | 3 | [] | no_license | <?php
/**
* Class file for XiIndicesServiceList
* @date 08/07/2012
*/
/**
* Class XiIndicesServiceList
* @date 08/07/2012
*/
class XiIndicesServiceList extends XiIndicesWsdlClass
{
/**
* Method to call ListIndices
* Meta informations :
* - documentation : Lists available indices.
* @uses XiIndicesWsdlCl... | true |
1a10e6ba927c53551e7823ee26de981397b34a72 | PHP | xtompie/cqa | /app/Core/Event/EventBus.php | UTF-8 | 853 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core\Event;
use Closure;
use Xtompie\Lainstance\Instance;
use Xtompie\Lainstance\Shared;
class EventBus implements Shared
{
use Instance;
protected Closure $chain;
public function __construct()
{
$this->chain = $this->chain($this->middlewares());
}
public funct... | true |
6926a7ebb6213f954a79835708e2d48f70197ce5 | PHP | TomOndiba/locatie-informatie | /src/Stefanius/LocatieInformatieBundle/Conversion/CityConverter.php | UTF-8 | 2,353 | 2.671875 | 3 | [] | no_license | <?php
namespace Stefanius\LocatieInformatieBundle\Conversion;
use Stefanius\LocatieInformatieBundle\Entity\City;
use Stefanius\LocatieInformatieBundle\Entity\Postcode;
class CityConverter extends AbstractConverter
{
/**
* Check and create a new City if its not existing
* @param Postcode $postcode
*... | true |
b65967446a0c24a6e51022cae0ed770b38ddc096 | PHP | vreaxe/php-mvc | /application/libs/Log.php | UTF-8 | 1,116 | 3 | 3 | [] | no_license | <?php
class Log {
private static $filename = "logs";
private static $folder = "logs";
private static $now;
private function setNow() {
self::$now = date("d/m/Y H:i:s");
}
private function checkIfExistsFolder() {
if (!file_exists(self::$folder)) {
mkdir(self... | true |
dcc9af328aa2e92486b0dde3256ec8be232e575d | PHP | diegofu/dotatrade | /protected/controllers/SiteController.php | UTF-8 | 2,781 | 2.5625 | 3 | [] | no_license | <?php
class SiteController extends Controller
{
/**
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
*/
public function actionIndex()
{
$heroes = Heroes::model()->findAll();
$this->render('index', array('heroes'=>$heroes));
}
public function... | true |
7a8393317fa5e504ae57e3c1bf001a61853740d4 | PHP | wx1820663102/personal-blog | /blog/Model/RoleModel.class.php | UTF-8 | 825 | 2.609375 | 3 | [] | no_license | <?php
namespace Model;
use Think\Model;
//Role模型model类
class RoleModel extends Model{
//分配权限,收集信息、二期制作、存储信息
function saveAuth($role_id,$authids){
//① 数组的authid 变为 字符串的authid
$authid_str = implode(',',$authids);
//② 根据字符串的authid信息 查询对应的"控制器-操作方法""
$authinfo = D('Auth')->select($... | true |
827ae7a7c917328f2fc7dc095306a930681f3344 | PHP | bucksbunny/Online_Recruitment_Portal | /search.php | UTF-8 | 2,346 | 2.5625 | 3 | [] | no_license | <?php
include("checkSession.php");
$servername = "localhost";
$username = "guestuser";
$password = "guestuser";
$database = "login";
$conn = new mysqli($servername, $username, $password, $database);
if($conn->connect_error){
// To be changed
die("Connection Error : ".$conn->connect_error);
}
if($_SERVER['REQUEST_... | true |
73d8503b285372ea74df83cbed400c0133878cc1 | PHP | hunt4499/3N_Gallium | /application/models/Model_game_users.php | UTF-8 | 1,432 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Model_game_users extends CI_Model
{
public function __construct()
{
parent::__construct();
}
public function getData($id = null,$status = null)
{
$this->db->select('US.*, GU.name as name,GU.email as email,GU.mobile_no,GU.last_logged_in,GU.subscription_from,GU.subscription_to');
$this->... | true |
f9d1d0ab6a070c816dfb263dd5ba428a2ccdc4c0 | PHP | Cancer-Expert-Now/prismic-client | /test/Unit/Document/Fragment/MediaLinkTest.php | UTF-8 | 1,112 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace PrismicTest\Document\Fragment;
use Prismic\Document\Fragment\MediaLink;
use PrismicTest\Framework\TestCase;
class MediaLinkTest extends TestCase
{
public function testConstructor(): MediaLink
{
$link = MediaLink::new(
'url',
'filename'... | true |
b746e64e74143ce14c0652e79950c95da865b7c2 | PHP | lmadaninoureddine97/intro-php-brief | /loops/exercice-2.php | UTF-8 | 82 | 2.8125 | 3 | [] | no_license | <?php
$var2=30;
for($var1=0;$var1<=20;$var1++){
echo $var1*$var2."<br>";
}
?>
| true |
0eb2979ee4a9dc85225b7a3a422f215ed2f54446 | PHP | kennefy/WebDemos | /INCLUDES/PHP/account.inc.php | UTF-8 | 5,329 | 2.671875 | 3 | [] | no_license | <?php
include"INCLUDES/PHP/Var_Dumps.php";
include_once"INCLUDES/PHP/dbConn.php";
include_once "INCLUDES/PHP/validator2.php";
include_once"INCLUDES/PHP/messageFlags.class.php";
include_once"INCLUDES/PHP/children.inc.php";
$error = new messageBox();
$error->setBoxType("error", "Sorry there is an Error", "");
$succ... | true |
8a89d2b26cbd1dd0020c3b371c389c7663d081d3 | PHP | zepetto7065/study | /php/htdocs/core/lib.php | UTF-8 | 1,145 | 3.046875 | 3 | [] | no_license | <?php
function alert($msg){
echo "<script>alert('{$msg}')</script>";
}
function move($url = false){
echo "<script>";
echo $url ? "location.replace('{$url}')" : "history.back();";
echo "</script>";
exit;
}
function access ($bool, $msg, $url = false){
if(!$bool){
alert($msg);
mo... | true |
8acc99e661271a338940f3950b3cbe4599ab62cf | PHP | 1Joy1/IntersogLabs | /intersog-fotographer.my/www/basic/models/AlbumImages.php | UTF-8 | 2,934 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use app\models\ResizedPhotos;
/**
* This is the model class for table "album_images".
*
* @property string $id
* @property string $albums_id
* @property resource $image
* @property string $created_at
*
* @property Albums $albums
* @property OrderImages $orderImages
*/
c... | true |
ff37efe6ae19d870a0a2478d7c1e5829566e2faa | PHP | TBG-FR/IUT_PHP_PicturesProject | /project_site/public_gallery.php | UTF-8 | 5,892 | 2.578125 | 3 | [] | no_license | <?php
require_once("classes/all.inc.php"); // Include all the Classes & Functions & Co + Session Start + Disconnection Management
?>
<script>
$(document).ready(function(){
$(".filter-button").click(function(){
var value = $(this).attr('data-filter');
if(value == "all")
{
... | true |
27d0af5aad9202baab1b193f8a36ac0570d0ed7b | PHP | s-ichikawa/react-example | /example/SendGrid/react_bulk_sender.php | UTF-8 | 3,187 | 2.703125 | 3 | [] | no_license | <?php
namespace Example\SendGrid;
use React\EventLoop\Factory;
use React\EventLoop\LoopInterface;
use React\HttpClient\Client;
use React\HttpClient\Request;
use React\HttpClient\Response;
use React\Socket\Connector;
use React\Stream\WritableResourceStream;
require_once __DIR__ . '/../../vendor/autoload.php';
class ... | true |
45b2083045870d427f33b45008e9e5d70a0775f4 | PHP | Shofiul-Alam/magento-app | /src/vendor/temando/module-shipping-m2/Sync/Exception/EventProcessorException.php | UTF-8 | 958 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"OSL-3.0",
"AFL-2.1",
"AFL-3.0",
"MIT"
] | permissive | <?php
/**
* Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
*/
namespace Temando\Shipping\Sync\Exception;
use Magento\Framework\Exception\LocalizedException;
/**
* Temando Event Processing Exception.
*
* The event should get handled but an error occurred.
*
* @package T... | true |
34a4ceb69b51f0cbf0e1dfcc6c8ad1765852710e | PHP | ben-speelmeyer-s3729184/SE_team_project | /login.php | UTF-8 | 2,631 | 2.71875 | 3 | [] | no_license | <?php
include("config.php");//inlcude database configuration file
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST"){
$myUserName = mysqli_real_escape_string($db,$_POST['userName']);//get value from form and remove sql elements for security
$myPassword = mysqli_real_escape_string($db,$_POST['password']);
... | true |
8ef6c910b893f9732f1a59153448ea5089745c5c | PHP | mizuhotakeda/slotify | /includes/config.php | UTF-8 | 388 | 2.546875 | 3 | [] | no_license | <?php
ob_start();
session_start(); //セッション開始
$timezone = date_default_timezone_set("Europe/Warsaw");
$con = mysqli_connect("localhost", "root", "", "slotify");
//("サーバー名", "ユーザー名", "パスワード","データベース名")
if(mysqli_connect_errno()) { //エラーの場合
echo "Failed to connect: " . mysqli_connect_errno();
}
?>
| true |
9ac86facf3b9dcee08546a568587989dbc49728d | PHP | AlexNiko01/pps_m | /libs/pps/pps-payment/ILogger.php | UTF-8 | 267 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace pps\payment;
/**
* Interface ILogger
* @package pps\payment
*/
interface ILogger
{
/**
* @param mixed $txid
* @param int $type
* @param mixed $data
* @return bool
*/
public function log($txid, int $type, $data);
} | true |
969d67b63922b62f64ec9cb6eccf8b6461adf158 | PHP | plusForta/craft-ekomi | /src/models/Data.php | UTF-8 | 1,608 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* ekomi plugin for Craft CMS 3.x
*
* Download ekomi data
*
* @link https://github.com/plusForta/craft-ekomi
* @copyright Copyright (c) 2019 Marc Runkel
*/
namespace plusforta\ekomi\models;
use plusforta\ekomi\Ekomi;
use Craft;
use craft\base\Model;
/**
* EkomiData Model
*
* Models are conta... | true |
5e81035fb23968297a86c81b21c61d1964075823 | PHP | hialan/myptt | /src/ptt/ptt_helper.inc | UTF-8 | 5,930 | 2.875 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../core/Term.inc';
class ptt_helper {
private $client;
public function __construct($client) {
$this->client = $client;
}
public function login($user, $password) {
$this->client->exec('', false);
echo $this->client->getScreen();
$this->cl... | true |
df260d17cc6bc0595d24ae2eaa6090ce08f5db2e | PHP | jolicode/php7-checker | /src/Checker/FunctionAddedChecker.php | UTF-8 | 2,024 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the php7-checker project.
*
* (c) Loïck Piera <pyrech@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Joli\Php7Checker\Checker;
use Joli\Php7Checker\Error\Error;
use PhpParse... | true |
8d85992f98bbb97943e9a7b01ad89e9387181ee4 | PHP | chzcb/minifw | /com/amqp/rpc_server.php | UTF-8 | 2,055 | 2.5625 | 3 | [] | no_license | <?php
require_once FW_PATH.'/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
/**
* Created by PhpStorm.
* User: zhangcb
* Date: 2017/12/26
* Time: 14:11
*/
class AMQPRpcServer
{
static $defaultConfig = array('name' => 'default', 'host' => '127.0.0.1', 'port' => 5672, 'user' => 'guest',... | true |
b87d70dcbdd0d92780739c80cb3d4ea7c2cf4a97 | PHP | joshredel/Orientation-Week-Registration-System | /admin/management/payschedule.php | UTF-8 | 8,831 | 2.828125 | 3 | [] | no_license | <?
require_once('../../functions.php');
// check for a session
checkForSession();
// check if they have submitted the payschedule creation form
if(isset($_POST['amount']) && $currentRole->hasPermission(org\fos\Role::$EDIT_PAYSCHEDULE)) {
// get the information from the form
$startDate = $_POST['startdateraw'];
$en... | true |
d400e471554f10ebe02bd6e6343d6d811259911f | PHP | rodrigopscampos/try-php | /impar-par.php | UTF-8 | 315 | 3.5 | 4 | [] | no_license | <?php
$n = $_GET['n'];
/*
$impar = ($n % 2) == 1;
if($impar) print 'Impar';
else print 'Par';
*/
$dividendo = $n;
$divisor = 2;
if($dividendo < 0)
$dividendo *= -1;
while($dividendo >= $divisor) {
$dividendo -= $divisor;
}
$impar = $dividendo != 0;
if($impar) print 'Impar';
else print 'Par';
?> | true |
1474e9ce94788cb2607fd0f24ea6453f025ea5be | PHP | pgrau/quotes | /src/Shared/Domain/Model/Api/ApiError.php | UTF-8 | 511 | 2.796875 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace Quote\Shared\Domain\Model\Api;
class ApiError
{
public function __construct(private string $code, private string $message)
{
}
public static function create(string $code, string $message): self
{
return new self($code, $message);
}
public... | true |
b51e2518a44e5655722415f9b6a201f3b260e6b0 | PHP | sweetbai/duxravel-app | /src/core/Util/Excel.php | UTF-8 | 4,626 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Duxravel\Core\Util;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\IOFactory;
class Excel
{
public static function import($url, $start = 1): ?array
{
$ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
$extArr = ['xlsx', 'xls', 'csv'];
if (!in... | true |
ed5c51eb3a5808b5745a1c0b5f8e7f9cca18dd80 | PHP | Phantomea/autoservisy | /src/DB/Job.php | UTF-8 | 1,617 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Phantomea\Autoservis\DB;
use Nette\Utils\DateTime;
use Nette\Utils\Random;
use Nette\Utils\Strings;
use Storm\Collection;
use Storm\Model;
/**
* @table{"name":"autoservis_job"}
*/
class Job extends Model
{
public const PATTERN = '00000000';
/**
* @column
* @var string
*/
public $subject;... | true |
bb738576de7adbd54d1e39e5f1e1ce37890943bf | PHP | unckleg/ForceCMS | /app/Core/Model/Admin/Blog/BlogTag.php | UTF-8 | 2,307 | 2.65625 | 3 | [] | no_license | <?php
namespace Core\Model\Admin\Blog;
class BlogTag extends \Zend_Db_Table_Abstract
{
// table name
protected $_name = 'cms_blog_tag';
// soft delete constants
const IS_DELETED = 1;
const IS_ACTIVE = 0;
const STATUS_VISIBLE = 1;
const STATUS_HIDDEN = 0;
/**
* Return array-obje... | true |
3ea20ebbf67e1c7bd6d83b254a891b3dc0b3c379 | PHP | tiagofpresende/cookbook | /login.php | UTF-8 | 1,462 | 2.9375 | 3 | [] | no_license | <?php
// Retrieve the username and password from the form data
$username = $_POST['username'];
$password = $_POST['password'];
// Check if the username and password are correct
if ($username === 'gustavo' && $password === 'pastry123') {
// If the credentials are correct, redirect the user to the dashboard page
hea... | true |
03ac52debe56407ebfa79ad86ece4921a1b4affd | PHP | jaivis/black | /app/Http/Controllers/DealController.php | UTF-8 | 4,232 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class DealController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function... | true |
72b0bebf3117b7864609315ce3a8e800bd40c956 | PHP | ktcl444/php | /algorithm/maximum_units.php | UTF-8 | 954 | 3.265625 | 3 | [] | no_license | <?php
require_once 'base\AlgorithmBase.php';
//卡车上的最大单元数-排序
class Solution extends \algorithm\base\AlgorithmBase
{
function maximumUnits($boxTypes, $truckSize) {
array_multisort(array_column($boxTypes,1), SORT_DESC, $boxTypes);
//$list = array_flip($list);
//krsort($boxTypes);
... | true |
a33ec27e7ec55afd64972a1857873714572b2c67 | PHP | TaikiSugiyama/laravel_study | /app/Http/json.php | UTF-8 | 430 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once('config.php');
require_once('functions.php');
$dbh = connectDb();
$sth = $dbh->prepare("SELECT * FROM tasks");
$sth->execute();
$userData = array();
while($row = $sth->fetch(PDO::FETCH_ASSOC)){
$userData[]=array(
'created_at'=>$row[null],'id'=>$row['1'],'name'=>$row["111"],"updated_at... | true |
18024f868686c0a969c06b990590bce186c9f9e7 | PHP | zolya99/AFP2_Projekt | /webaruhaz/app/Models/Package.php | UTF-8 | 3,157 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Package extends Model
{
protected $table ='packages';
public static function forOrder(string $order_id)
{
return DB::table('packages')->where('order_id', 'like', "%$order_id%")->get();
... | true |
e7ab7f205b5fb9aef19c13bec745270bcf44077c | PHP | bensisko69/projet_42 | /piscine/php/j01/ex09/ssap2.php | UTF-8 | 817 | 3.25 | 3 | [] | no_license | #!/usr/bin/PHP
<?PHP
$my_array = Array();
$my_array_alpha = Array();
$my_array_nbr = Array();
$my_array_other = Array();
for ($i=1; $i < $argc; $i++)
$my_array = array_merge(preg_split("/[\s]+/", $argv[$i]), $my_array);
$len = count($my_array);
for ($i = 0; $i < $len; $i++)
{
if (ctype_digit($my_array[$i]... | true |
a1d53dfc0026d91debaa3cf9965195cde38560bd | PHP | lexvitorino/projetos.php.rgagold | /models/Videos.php | UTF-8 | 4,040 | 2.609375 | 3 | [] | no_license | <?php
class Videos extends model {
public function __construct() {
parent::__construct();
}
public function getData($id_subscriber, $id) {
$sql = "SELECT *
FROM videos
WHERE id_subscriber = $id_subscriber AND
id = $id";
$s... | true |
f0448538ce44a49269757bc94ce7916d145d7d40 | PHP | daniallio/fatturaNetSurfingPdf | /config/conn.php | UTF-8 | 292 | 2.828125 | 3 | [] | no_license | <?php
try {
$conn = new PDO("sqlsrv:server=$serverName;Database = $database", $user, $pwd);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
throw new Exception("Error connecting to SQL Server" . $e->getMessage());
}
return $conn;
?> | true |
dd5fe55638ef026762e0b0624bbc420d07ecaf7b | PHP | robialakbar/Sepakat_Berkawan | /model/model_mutasi.php | UTF-8 | 2,151 | 2.84375 | 3 | [] | no_license | <?php
// CLASS MODEL PENDUDUK
class model_mutasi extends database {
// DIGUNAKAN UNTUK MENJADI OBJEK SAAT INSTANSIASI DI SINI
// METHOD
// FUNCTION __CONSTRUCT UNTUK MENANGANI INSTANSIASI CLASS DARI MODEL
function __construct() {
// INSTANSIASI CLASS KONEKSI
parent::__construct();
}
... | true |
3b78283211d1f2a0d7ca5778e085a9b7f5c24ac2 | PHP | yeganemehr/telebot | /Methods/SetChatTitle.php | UTF-8 | 1,021 | 3.140625 | 3 | [] | no_license | <?php
namespace packages\telebot;
class SetChatTitle extends Method {
/**
* @var int|string
*/
protected $chatId;
/**
* @var string
*/
protected $title;
public function __construnt($chatId, string $title) {
$this->chatId = $chatId;
$this->title = $title;
}
/**
* @param int|string $... | true |
eb51024894af2a95f529ae187b7fe35d8fcc09d0 | PHP | cedric444/dwwm2020-Cedric | /01-PHP Cli/Exercices-2/6.7 sans fonction.php | UTF-8 | 322 | 3.734375 | 4 | [] | no_license | <?php
$somme = 0;
for ($i=0; $i < 9; $i++) {
do{
do {
$note = readline("Entrer une note: ");
}while(!is_numeric($note));
}while(!is_int($note*1));
$notes[]=$note;
$somme += $note;
}
$moyenne = $somme / count($notes);
echo "La moyenne des notes est de " . $moyenne ."."... | true |
a166fecd37f76182edbabc64bca01652a29bea09 | PHP | vishaldobariya/usapakamal | /migrations/m200709_125145_create_product_table.php | UTF-8 | 1,429 | 2.546875 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%product}}`.
*/
class m200709_125145_create_product_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%brand}}', [
'id' => $this->primaryKey(),
'name' => $this->string(... | true |
6bc0618ee9caa36dc7c393011ad08321d8061082 | PHP | shogydimov/ittechFinalProject | /controller/mainController.php | UTF-8 | 2,162 | 2.765625 | 3 | [] | no_license | <?php
use \model\orders\Order;
use \model\products\Product;
use \model\users\User;
use \model\DataBase\DBManager;
use \model\DataBase\OrderDao;
use \model\DataBase\ProductDao;
use \model\DataBase\UserDao;
function __autoload($class_name)
{
$class_name = '..\\' . $class_name;
$class_name = str_replace("\\", "/... | true |
85e1dd33631687108bb115f3c228d15bcf23aa79 | PHP | prathamesh149/RaptorVisualization | /test.php | UTF-8 | 290 | 3.484375 | 3 | [] | no_license | <?php
//$var = ' ';
//$var = trim($var);
// This will evaluate to TRUE so the text will be printed.
if (isset($var)) {
echo "This var is set so I will print.\n";
}
if(empty($var))
{
echo "$var is empty\n";
}
if(is_null($var))
{
echo "$var is null\n";
}
?> | true |
0e4a7d2489bf6a8e0c97932dccdba1dba69a5818 | PHP | quangthi90/Yesocl | /admin/model/company/company.php | UTF-8 | 10,909 | 2.625 | 3 | [] | no_license | <?php
use Document\Company\Company,
Document\Company\GroupMember;
use MongoRegex;
class ModelCompanyCompany extends Model {
public function addCompany( $aData = array(), $aLogo = array() ) {
// name is required & isn't exist
if ( empty($aData['name']) || $this->isExistName($aData['name']) ){
return false;
... | true |
fea8a21c67d889266126d2d8e1e0e8d247e9071c | PHP | khmakoto/GameBacklog | /model/itemModel.php | UTF-8 | 3,665 | 2.796875 | 3 | [] | no_license | <?php
# Connection to the database and errors
require_once __DIR__ . "/database.php";
require_once __DIR__ . "/errors.php";
# Query to retrieve game information.
function retrieveGameInfo($name) {
# Open and validate the Database connection.
$conn = connect();
if ($conn != null) {
... | true |
983ae7b3d5199d009184d6911aa5f8ef5721bd36 | PHP | DreadLabs/media-type-decoding | /tests/Unit/Domain/Subtype/PrefixedTest.php | UTF-8 | 984 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the `dreadlabs/media-type-decoding` package.
*
* (c) 2017,2018 Thomas Juhnke <dev@van-tomas.de>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace DreadLabs\Media... | true |
49181e2ceb7b8014af04447e3a69286ed16b0a44 | PHP | arbind212306/hhs_25_hrs_07122018 | /src/Controller/ShiftMasterController.php | UTF-8 | 3,191 | 2.515625 | 3 | [] | no_license | <?php
// src/Controller/ShiftmasterController.php
namespace App\Controller;
class ShiftMasterController extends AppController
{
public function index()
{
$this->loadComponent('Paginator');
$company_id = $this->request->session()->read('company_id');
/*$shifts = $this->Paginator->... | true |
e3b0c136c3c9f04af3e15de1498504be9e676849 | PHP | goetas-webservices/wsdl-reader | /src/Events/Binding/MessageEvent.php | UTF-8 | 908 | 2.6875 | 3 | [] | no_license | <?php
namespace GoetasWebservices\XML\WSDLReader\Events\Binding;
use GoetasWebservices\XML\WSDLReader\Events\WsdlEvent;
use GoetasWebservices\XML\WSDLReader\Wsdl\Binding\OperationMessage;
class MessageEvent extends WsdlEvent
{
protected $type;
protected $message;
/**
* MessageEvent constructor.
... | true |
056806368fc508733d5ecdd60350848a3cbce311 | PHP | porfirioperez/chart | /src/views/IndexView.php | UTF-8 | 728 | 2.59375 | 3 | [] | no_license | <?php
namespace studs\hw4\views;
error_reporting(-1);
ini_set("display_errors", "on");
require_once("View.php");
class IndexView extends View {
public function render($data) {
?>
<head>
<meta charset="UTF-8">
<title>PasteChart</title>
</head>
<body>
<h1>PasteChart</h1>
<p>Share ... | true |
37456f352bfe6d1d031eca38f8d8780c43de2318 | PHP | LadlenDUImap/livemaster | /app/core/db/Pdo.php | UTF-8 | 6,053 | 2.984375 | 3 | [] | no_license | <?php
namespace app\core\db;
use app\base\IDatabase;
use app\core\Lm;
class Pdo extends \app\base\Component implements IDatabase
{
/** @var string */
public $dsn;
/** @var string */
public $username;
/** @var string */
public $password;
/** @var \PDO */
protected $DBH;
p... | true |
cbb04fc162df1c293882528a7f3d4420f9f036bf | PHP | ruansheng/im | /Core/Server.class.php | UTF-8 | 874 | 3.046875 | 3 | [] | no_license | <?php
/**
* Server Class
* @author ruansheng
*/
class Server{
/**
* $handler
* @var mixed
*/
private static $handler;
/**
* Welcome UI
*/
public function welcome(){
echo '-------------------------------'.PHP_EOL;
echo '| Welcome to IM |'.PHP_EOL;
echo '| The server is running ... | true |
5a42ec5bd416ab425105b86cb81a727ac50fe495 | PHP | rguineo/Taller-Ecommerce | /backend/models/slider.modelo.php | UTF-8 | 2,449 | 3.078125 | 3 | [] | no_license | <?php
require_once "conexion.php";
Class ModeloSlider {
static public function listarSliderMdl($tabla) {
$sql = Conexion::conectar()->prepare("SELECT * FROM $tabla");
$sql -> execute();
return $sql -> fetchAll();
}
static public function mdlCrearSlider($tabla, $datos, $rutaImagen) {
$sql = Conexion::... | true |
6a5fd96fe3c95f53f6d44d218445907f1cb0f78d | PHP | diegorafaelvieira/Programacao-3 | /Aula 12/Exercicios/Aula-12-Exemplos/exemplo_slide_07.php | UTF-8 | 196 | 3.4375 | 3 | [
"MIT"
] | permissive | <html>
<body>
<?php
function escreve($frase) {
echo $frase;
// Essa funcao NAO tem return
}
$retorno = escreve("Nada a declarar");
echo "<br>";
var_dump($retorno);
?>
</body>
</html> | true |
3deebd89b8e6a18381d18ec5fe32ad365504b739 | PHP | ryandominick/c15WebLearn | /app/Models/QuizTimer.php | UTF-8 | 1,305 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
class QuizTimer extends Model
{
protected $table = 'QuizTimer';
public static function assertStartedAndTimely($quizID, $studentID){
$result = DB::select("S... | true |
c0ebe19c1c510966406375132c4f1a67f790a1b9 | PHP | ntnshpig/Web-Learning | /Sprint07/t07/index.php | UTF-8 | 1,667 | 3.09375 | 3 | [] | no_license | <?php
session_start();
function autoload($pClassName) {
include(__DIR__. '/' . $pClassName. '.php');
}
spl_autoload_register("autoload");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Data to XML</title>
</head>
<body>
<h1>Avenger Quote to XML</h1>
<?ph... | true |
32a7e71e808b829c00dd30ec6786b218b5bf2ff5 | PHP | FrederickPullen/Sfera-Dev-RC | /protected/modules/systemSummary/components/ConfigHandlerBehaviour.php | UTF-8 | 1,841 | 3.078125 | 3 | [] | no_license | <?php
/**
* The behavior helps to use config file mroe effectivly
*
* @author Roman M.Kos <roman.k@scopicsoftware.com>
* @version 1.0
*/
class ConfigHandlerBehaviour extends CBehavior {
/**
* Gets the config properly. Uses nested private funcions
*
* Ex. getConfig('p1', 'p2', 'p3')
* @re... | true |