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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0d336a02d595ceadbcf4bb4bd4e3ba412dd37686 | PHP | rashmilengade/UniversityAcademicDatabaseProject | /mainStaff.php | UTF-8 | 615 | 2.609375 | 3 | [] | no_license |
<?php
session_start();
/* Step #1: Open connection to the MySQL database */
$link = mysql_connect('localhost', 'root', 'lakers') or die("Connection Failed");
mysql_select_db("database_project") or die("Database not selected");
?>
<html>
<head></head>
<body>
<?php
$SSN = $_SESSION["SSN"];
$fname = $_S... | true |
c19f0125315662988085e1d4a54cb8eb704a0c80 | PHP | monsterxcn/Typecho-Plugin-VOID | /libs/PandaBangumi.php | UTF-8 | 10,357 | 2.734375 | 3 | [] | no_license | <?php
/**
* PandaBangumi Action.php
*
* API 获取、更新数据,处理前端 AJAX 请求
*
* @author 熊猫小A
*/
if (!defined('__TYPECHO_ROOT_DIR__')) {
exit;
}
require_once 'simple_html_dom.php';
class BangumiAPI
{
/**
* 使用 curl 代替 file_get_contents()
*
* @access public
*/
public static function curlFileGe... | true |
53e868b8c6629766267b5f39512d6715bfbe2da0 | PHP | fabian/homebase | /src/Homebase/Service/RedirectUri.php | UTF-8 | 493 | 2.984375 | 3 | [] | no_license | <?php
namespace Homebase\Service;
class RedirectUri
{
/**
* @param string $uri
* @param array $params
* @param string $delimeter
* @return string
*/
public static function create($uri, $params = array(), $delimeter = '?')
{
if (strstr($uri, $delimeter) === false) {
... | true |
2de3d302fa9ed0c8c5a0abea8c282f82169e6550 | PHP | limozaza/sahel_bzaf | /src/Domain/DTO/NewArticleDTO.php | UTF-8 | 326 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: zakaria
* Date: 12/05/18
* Time: 21:48
*/
namespace App\Domain\DTO;
class NewArticleDTO
{
public $content;
/**
* NewArticleDTO constructor.
* @param $content
*/
public function __construct($content)
{
$this->content = $content;
... | true |
5373d1eafae3e15c603fb0c162147d470fa63053 | PHP | azjezz/psl | /tests/unit/Type/F32TypeTest.php | UTF-8 | 1,823 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Psl\Tests\Unit\Type;
use Psl\Math;
use Psl\Type;
final class F32TypeTest extends TypeTest
{
public function getType(): Type\TypeInterface
{
return Type\f32();
}
public function getValidCoercions(): iterable
{
yield [123, 123.0];
y... | true |
adc50af9154f5bc6939f98d06271a82941bd3da4 | PHP | lirik0910/online-store | /app/Model/Shop/ProductOption.php | UTF-8 | 353 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model\Shop;
use Illuminate\Database\Eloquent\Model;
class ProductOption extends Model
{
protected $guarded = [];
/**
* Bind with product
* @return boolean
*/
public function product()
{
return $this->belongsTo(Product::class);
}
public function type()
{
return $this->belongsTo... | true |
824e3296035fc6f926cd820e9f8beb0b611597a4 | PHP | mafof/blogForPeople | /App/Core/BaseModel.php | UTF-8 | 440 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core;
use App\Core\DB\UserDB;
class BaseModel {
public function get_data() {}
public function isAuth() {
return !empty($_SESSION['id']);
}
public function getDataUser() {
if($this->isAuth()) {
$db = new UserDB(true);
$dataUser = $db->getUs... | true |
7145dc59ce0d8b9d3af360eb60def11dcbefc8d0 | PHP | QuentinDebay/iAdvizeVdm | /src/IAdvize/VdmBundle/Entity/VdmRepository.php | UTF-8 | 1,244 | 2.625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace IAdvize\VdmBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* VdmRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class VdmRepository extends EntityRepository
{
/**
* Enregistre la VDM
*
* @param VDM $newVdm
... | true |
098db96902451f8205cff8efff749fe591c8937e | PHP | salimrahal/MyWorkPublic | /Php/PhpFundamentals/MyLibraries/functions/functiontricks.php | UTF-8 | 1,749 | 3.75 | 4 | [] | no_license | <!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
#Which of the following sequence will run successfull... | true |
8bbd8e0c57e9e37efad409c85809cb6fb2c1038d | PHP | MargoJoy/php2 | /PSR/App/Controllers/Exception.php | UTF-8 | 1,053 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Controller;
class Exception extends Controller
{
public $exception;
public $code;
public function action()
{
if ($this->code == 42) {
$transport = (new \Swift_SmtpTransport('smtp.gmail.com', '465', 'SSL'))
->setUsername('x... | true |
5fd99f42642759ace13f4d8dcf57476e33719a7b | PHP | ElGenKa/FW | /src/app/game_data/httpConnector.php | UTF-8 | 420 | 2.5625 | 3 | [] | no_license | <?php
namespace app\game_data;
use bundle\http\HttpClient;
class httpConnector
{
/** @var HttpClient */
private $httpClient;
private $baseUrl;
public function __contruct( HttpClient $httpClient){
$this->httpClient = $httpClient;
$this->baseUrl = 'http://185.244.42.28/';
}
... | true |
85b6bccd263df7c9abe225ee7b41144c6f217e09 | PHP | ndunks/php-simple-protobuf | /test/MessageTest.php | UTF-8 | 10,466 | 2.671875 | 3 | [] | no_license | <?php
/**
* @group msg
*/
use kc\proto\serializer\native\Reader;
class MessageTest extends PHPUnit\Framework\TestCase
{
function testCallable()
{
include_once 'out/autoload.php';
/**
*
*/
$obj = new MyTestMessage();
$obj->addAge(10);
$this->assertEquals(10, $obj->getAge());
$ob... | true |
8c737a4726a1acc389d83f2bf02bb7577736eb13 | PHP | philipwhiuk/mCMS | /database/mysqli.php | UTF-8 | 1,724 | 2.71875 | 3 | [] | no_license | <?php
MCMS::Get_Instance()->files('database/mysqli/exception','database/mysqli/query','database/mysqli/select_base','database/mysqli/select','database/mysqli/count', 'database/mysqli/update', 'database/mysqli/insert');
class Database_MySQLi extends MySQLi implements Database_Provider {
public function __construct($con... | true |
21ff984f069c36aaf302916eaabbe7ff8f287fd2 | PHP | ruslanix/code-samples | /5_RestApiComponents/RequestParametersFetcher/src/Parameter/FilterDefinition.php | UTF-8 | 6,931 | 2.84375 | 3 | [] | no_license | <?php
namespace App\RestApiComponent\Request\Parameter;
use App\RestApiComponent\Response\Exception\RestRequestInvalidParameterException;
class FilterDefinition extends AbstractParameterDefinition
{
/**
* Example: ['state' => ['eq', 'like']]
*
* @var array
*/
protected $allowedFilterCondi... | true |
ceccc8bb46ce752758592e3e04e234e2c3c58406 | PHP | EmilienLetestu/byob-v2 | /tests/Action/Security/LoginActionTest.php | UTF-8 | 1,556 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: emilien
* Date: 30/07/2018
* Time: 12:56
*/
namespace App\Tests\Action\Security;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* Class LoginActionTest
* @package App\Tests\Action\Security
*/
class LoginActionTest extends WebTestCase
{
/**
* @var
... | true |
25f34046fb803fb4e5571b406e8bf13de25744c2 | PHP | TeissierYannis/SDS-CLEAN | /domain/src/Shop/Response/Product/RemoveResponse.php | UTF-8 | 605 | 2.796875 | 3 | [] | no_license | <?php
namespace TYannis\SDS\Domain\Shop\Response\Product;
use TYannis\SDS\Domain\Shop\Entity\Product;
/**
* Class RemoveResponse
* @package TYannis\SDS\Domain\Shop\Response\Product
*/
class RemoveResponse
{
/**
* @var Product|null
*/
private ?Product $product;
/**
* RemoveResponse cons... | true |
1668ca185d1ad702a25115008de632cd59b3f07c | PHP | thabelo/contacts-manager | /application/Views/ContactsTypes/delete.php | UTF-8 | 935 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once '../../Controller/contacts_types_controller.php';
$contactsTypes = new ContactsTypesController();
if (isset($_GET['id'])) {
$contactsTypesData = $contactsTypes->findById($_GET['id']);
} else {
echo "Delete data id is not defined";
exit;
}
?>
<!doctype html>
<html lang="en">
<head>
<?php includ... | true |
fb6f4a25bdd54d9e5ad45dd6a9b232df28be5301 | PHP | Mercyware/ArticlesAPI | /app/Repository/ArticleRepository.php | UTF-8 | 1,828 | 2.953125 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Interfaces\IArticleRepository;
use App\Models\Article;
use App\Models\Rate;
class ArticleRepository implements IArticleRepository
{
/**
* @var Article
*/
private $article;
/**
* @var Rate
*/
private $rate;
/**
* ArticleRepositor... | true |
006de216cbf8de89c97a4814f21a043e7c4e054f | PHP | PelucaSalas/exercise | /exercise/tests/Domain/Entity/exampleTest.php | UTF-8 | 666 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Tests\Domain\Entity;
use App\Domain\Entity\example;
use PHPUnit\Framework\TestCase;
class exampleTest extends TestCase
{
public function testExample()
{
$a = new example();
$this->assertEquals('a', $a->exampleMethod());
}
/**
* @dataProvider exampleProvider
... | true |
34305e278273702bdcb6d3d949a6129dcb22a584 | PHP | elkeburgers/testes | /index.php | UTF-8 | 1,085 | 2.984375 | 3 | [] | no_license | <?php
// var_dump($_GET);
// var_dump($_POST);
var_dump($_REQUEST);
// echo "Seja bem vindo ".$_GET["nome"]." ".$_GET["sobrenome"];
// if($_GET["nome"] != "elke"){
// if($_GET["nome"] != "vinicius"){
// echo "Não é a Elke!";
// }else{
// echo "Eai Elke?";
// }
?>
<!DOCTYPE html... | true |
7a55dce3d562aba4aaefae23b2e132bd88ab0d3d | PHP | the16thpythonist/wp-cpt-lib | /src/the16thpythonist/Wordpress/Base/PostRegistration.php | UTF-8 | 1,288 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jonas
* Date: 04.10.18
* Time: 15:47
*/
namespace the16thpythonist\Wordpress\Base;
/**
* Interface PostRegistration
*
* A PostRegistration object is supposed to be a object, which is being used for registering a new post type in
* wordpress. This means the process of ... | true |
84402455604557540fc6042c7c0dd13f33906ee1 | PHP | antoniocarlosmjr/pagamento-simplificado | /src/app/Constantes/TiposUsuariosConstante.php | UTF-8 | 1,166 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Constantes;
/**
* Class TiposUsuarios
* @package App\Constantes
* @author Antonio Martins
*/
class TiposUsuariosConstante implements ConstanteInterface
{
const USUARIO_COMUM = 'comum';
const USUARIO_LOJISTA = 'lojista';
/**
* Retorna as constantes definidas para os tipos de u... | true |
8f7c23950308c5e543cd92f792b7a8618b0b08ce | PHP | stalingit/phpcookbook_3rd_edition | /01_strings/csvprog1.php | UTF-8 | 979 | 2.84375 | 3 | [] | no_license | <?php
//$db = new PDO('sqlite:/usr/local/data/sales.db');
$user = "root";
$password ="";
$db = new PDO('mysql:host=localhost;dbname=customer_db', $user,$password);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$query = $db->query('SELECT sign, symbol,planet,element FROM zodiac');
$sales_data = $que... | true |
38b89642f160659b1e10b7b25c59e443bd7c8ddc | PHP | dom-ci-certs/domlist | /inc/ice/icIceUtil.inc.php | ISO-8859-1 | 6,888 | 2.765625 | 3 | [] | no_license | <?
/**
* diverse hilfsfunktionen
*
* @author Joachim Klinkhammer <j.klinkhammer@intercoaster.de>
* @version 0.43, 28.02.2002
* @copyright (c) 2001, 2002 intercoaster.de, www.intercoaster.de
* @access public
* @package ICE
* @history 28.02.02, jkl added function str_chop()
* @history 19.04.02, jkl added functi... | true |
465244a4ba9c438cbcb35776b9dfb9be3ac9bf2d | PHP | 798256478/wings-vip | /app/Http/Controllers/Wechat/health/ReservationController.php | UTF-8 | 3,210 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Wechat\Health;
use App\Http\Controllers\Wechat\Controller;
use App\Services\Health\ReservationService;
use App\Services\Health\CustomerService;
use App\Services\Health\ProgressService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ReservationContro... | true |
68fcad402f53c6485e755de1f7c4bac385859cb7 | PHP | oloojohn87/Health2Me-Web-App | /getFacilityRooms.php | UTF-8 | 8,247 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require("environment_detail.php");
$dbhost = $env_var_db['dbhost'];
$dbname = $env_var_db['dbname'];
$dbuser = $env_var_db['dbuser'];
$dbpass = $env_var_db['dbpass'];
$con = new PDO('mysql:host='.$dbhost.';dbname='.$dbname.';charset=utf8', ''.$dbuser.'', ''.$dbpass.'',
array(PDO... | true |
92046069153f5621e97ae3d89ccc55b5a8591d95 | PHP | Muskan-08/Terribly-Tiny-Tales | /count.php | UTF-8 | 1,218 | 2.6875 | 3 | [] | no_license | <?php
session_start();
$regValue = $_GET['n'];
?>
<!DOCTYPE html>
<html>
<style>
body {
background-image: url(img\mobile-magic_chanpipatshutterstock.0.1509812513.0.jpg);
color: white;
}
</style>
<body>
<?php
$stop_words = file('$_GET['test.txt'];', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$this... | true |
2d06f0190ece648faeb3fae670bca2cd7beeb98f | PHP | NilsLangner/blog160 | /src/lib/Mvc160/View/Json.php | UTF-8 | 1,509 | 3.359375 | 3 | [] | no_license | <?php
namespace Mvc160\View;
/**
* This view is used to answer ajax requests. It returns a json object that consists of
* two parts. The status (failed|success) and the html content. It is decorating a Html view.
*
* @author Nils Langner
*
*/
class Json implements View
{
/**
* The decorated HtmlView
*... | true |
21963dcd6a6d5842cefbc097ea764a1c8d4becb7 | PHP | dolfbrown/g2gofficial | /app/Common/HasVariant.php | UTF-8 | 8,645 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Common;
use App\Product;
use App\ProductVariant;
use App\AttributeValue;
use Illuminate\Http\Request;
// use Illuminate\Support\Facades\Storage;
use App\Http\Requests\Validations\CreateProductVariantRequest;
/**
* Attach this Trait to a User (or other model) for easier read/writes on Addresses... | true |
9954fd4094598cc699a35ba36cb6dea5e7c75811 | PHP | imanbayevvv/uni | /change-password.php | UTF-8 | 923 | 2.625 | 3 | [] | no_license | <?php
abstract class DB{
public function Conn(){
return mysqli_connect('localhost' , 'nurd' , '171119' , 'uniledge_uni');
}
public function mysql(){
return new mysqli('localhost' , 'nurd' , '171119' , 'uniledge_uni');
}
}
$a = new A();
$a->show();
class A extends DB{
... | true |
43d54a3ee62ef503ea4ac600d110277ed3c6a44c | PHP | availabs/gtfsr2siri | /parsers/protobuf/common-transit.inc.php | UTF-8 | 14,191 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright 2010,2011 Alexander Sadleir
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 or agr... | true |
421ae9cb163ea448330f87b609f250734ee1b91b | PHP | okfn-brasil/site | /wp-content/themes/okbr/plugins/Mailchimp/Conversations.php | UTF-8 | 4,474 | 2.953125 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | <?php
class Mailchimp_Conversations {
public function __construct(Mailchimp $master) {
$this->master = $master;
}
/**
* Retrieve conversation metadata, includes message data for the most recent message in the conversation
* @param string $list_id
* @param string $leid
... | true |
7d4b60ced84f0a1ebf9a6cd1145ea5283d5f1acc | PHP | open-agroclimate/php-peanut-leaf-spot | /al.php | UTF-8 | 3,753 | 2.53125 | 3 | [] | no_license | <?php
include('conn.php');
$result_stations = mysql_query("SELECT * FROM stations1 where state='AL' order by name") or die (mysql_error());
while ($st_name = mysql_fetch_array($result_stations)) {
$stations[] = $st_name['name'].", AL";
$lat[] = $st_name['lat'];
$long[] = $st_name['long'];
}
$st... | true |
813a621e873f2c9bbaa6a2c918cc33c650248932 | PHP | ingeniouslv/unlokt | /app/Lib/Network/Email/PCMailTransport.php | UTF-8 | 1,405 | 2.734375 | 3 | [] | no_license | <?php
/*
* Created by Zach Jones <zach@peacefulcomputing.com>
* This custom email transport will save email object into database for sending via cron/daemon.
*/
App::uses('AbstractTransport', 'Network/Email');
class PCMailTransport extends AbstractTransport {
var $uses = array('Notification'); // Load dat model.... | true |
1807ebf7f5ba942183bed0d75608c64f246a1d5b | PHP | dolaposokoya/bloodbank | /controller/signup.controller.php | UTF-8 | 3,838 | 2.734375 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD'] == "POST") { //validate request method because its ajax
include('../connection/connection.php');
//dont check for table exist, it will confuse and slow ure code..just create table manually and run insertuser function
//error will come when u try to insert data inside ... | true |
ddfe92c91037fb955b2d496374ca137f42f9f3b8 | PHP | DetailFreak/Vital-Signs | /docs/php/mysqltest.php | UTF-8 | 1,457 | 2.6875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$sqlconn =new mysqli($servername,$username,$password);
echo '<p> Test ongoing... </p>';
if($sqlconn->connect_error){
echo '<p>Not Connected</p>';
}
else{
echo '<p>Connected</p>';
$sql = "CREATE database sensorDB;";
echo "<p>Creating Databas... | true |
220ee13748332bb869164d29e8781d52bd6484bd | PHP | mostafasavage/webs | /includs/config.php | UTF-8 | 202 | 2.578125 | 3 | [] | no_license | <?php
$dsn = "mysql:host=localhost;dbname=phps";
$username = "root";
$password ="";
try{
$con = new PDO($dsn , $username , $password);
}catch(PDOException $error){
echo $error->getMessage();
}
?> | true |
0427173bf0f144654462a7688012cf8a98d15b54 | PHP | clarkeash/converter | /src/Add.php | UTF-8 | 1,221 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Clarkeash\Converter;
use Clarkeash\Converter\Contracts\Metric;
use Clarkeash\Converter\Exceptions\BadMethodCallException;
class Add
{
/**
* @var \Clarkeash\Converter\Convert
*/
private $convert;
/**
* @var \Clarkeash\Converter\Contracts\Metric
*/
private $metric;
... | true |
3e7fe4299b8d961cddbe8a082891448dce8a89f1 | PHP | SandroMiguel/composer-autoload | /some-folder/some-file.php | UTF-8 | 300 | 3.171875 | 3 | [] | no_license | <?php
/**
* File inside a folder.
*/
require '../vendor/autoload.php';
use MyAwesomeNamespace\Core\Page;
try {
$page = new Page();
$text = $page->someMethod();
} catch(Exception $e) {
echo 'Ocorreu um erro: '.$e->getMessage();
}
echo '<p>File inside a folder.</p>';
echo '<p>'.$text.'</p>';
| true |
35361b0cff5b637906f9c3f6b917e47963afa205 | PHP | Dinhtuan1999/baitapphp1 | /bai tap 1.1.php | UTF-8 | 380 | 3.90625 | 4 | [] | no_license | <?php
$arr = array(2,1,3,5,4,7);
function sumArr ($number , $arr){
if ($number == 1){
$sum=0;
foreach ( $arr as $val){
$sum += $val;
}
return $sum;
}
if ($number == 2){
rsort($arr);
foreach ($arr as $val){
echo $val . "<bar>";
}... | true |
ba5091f64545fb97d15fa5140ac71d301b99701b | PHP | hewenhao2008/qidalunch | /controllers/UserController.php | UTF-8 | 4,531 | 2.609375 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\models\Order;
use Yii;
use yii\web\Controller;
use app\models\User;
use app\models\Menu;
use app\models\Ye;
use yii\web\Response;
class UserController extends Controller
{
private $countdown = 0;
public function init()
{
$this->countdown = Ye::getCountdown... | true |
d0462d286782dd6e4196eeee4834964a961f14f3 | PHP | Manish-Pandya/USC | /rsms/src/includes/modules/lab-inspection/dtos/message-context/LabInspectionReminderContext.php | UTF-8 | 729 | 3.15625 | 3 | [] | no_license | <?php
class LabInspectionReminderContext implements MessageContext {
public $inspection_id;
public $reminder_date;
public function __construct($id = null, $reminder_date = null){
$this->inspection_id = $id;
$this->reminder_date = $reminder_date;
}
/** Magic Setter to prevent setti... | true |
8951cde9fbf3dc318f74441a01a98313a4816706 | PHP | dwinurfajar/sim-rekomendasi | /database/migrations/2021_01_10_120138_create_tempats_table.php | UTF-8 | 1,129 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTempatsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tempats', funct... | true |
6bd5b1d4ec25c65bf2935cb4fee73bd6455f161e | PHP | niteshmishra22/demo | /delete_multi_checkbox_value.php | UTF-8 | 4,206 | 2.578125 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Delete multiple record with checkboxes in PHP Mysqli using Jquery AJAX</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstr... | true |
744efa4abfd8bad89cbe82fe3f6c17806cf9c84f | PHP | stanlee95/laravel.learn.com | /app/Helpers/Helpers.php | UTF-8 | 4,812 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use Illuminate\Support\Facades\Request;
use App\Models\Category;
class Helpers {
public static function recursion($sub_category, $parent_id){
if(empty($sub_category[$parent_id])) {
return;
}
echo '<ul class="submenu">';
foreach ($sub_cate... | true |
e97d10476438693865ad3ebe515f883eb9bca9f4 | PHP | cesarbruschetta/php-sites-docker | /html/Wood_Center/modules/filter/filter.admin.inc | UTF-8 | 14,062 | 2.546875 | 3 | [
"GPL-1.0-or-later",
"LicenseRef-scancode-other-permissive",
"GPL-2.0-only",
"LicenseRef-scancode-other-copyleft",
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-proprietary-license",
"BSD-2-Clause"
] | permissive | <?php
// $Id: filter.admin.inc,v 1.8.2.1 2008/02/12 14:25:34 goba Exp $
/**
* @file
* Admin page callbacks for the filter module.
*/
/**
* Menu callback; Displays a list of all input formats and which
* one is the default.
*
* @ingroup forms
* @see filter_admin_overview_submit()
*/
function filter_admin_over... | true |
bdf04b096b39d6c488e906ca94c3f3a6271492d6 | PHP | mvenkat777/parking | /Commanding/DefaultCommandBus.php | UTF-8 | 476 | 2.90625 | 3 | [] | no_license | <?php
require("CommandBus.php");
require("CommandTranslator.php");
class DefaultCommandBus implements CommandBus
{
//private $app;
protected $commandTranslator;
function __construct()
{
//$this->app = $app;
$this->commandTranslator = new CommandTranslator;
}
public function... | true |
1028af61e9cbaa1ebb11b84f3e3735227211faab | PHP | MrMime/spqrriskonline | /library/class.AbstractGenericManager.php | UTF-8 | 761 | 2.578125 | 3 | [] | no_license | <?php
Abstract class AbstractGenericManager
{
protected $_xml = null;
protected $_commonXml = null;
protected $_result = null;
protected $_db = null;
protected $_language = null;
public function __construct(){
global $db;
$this->_db = $db;
$this->_commonXml = simplexml_load_file('./db/com... | true |
2278bd26646d704be6f06ccec4442659f3a893f5 | PHP | coyote91/Formularios-multi-steps | /demo6-ejercicio-con-variables-de-sesion/form_process.php | UTF-8 | 1,000 | 2.6875 | 3 | [] | no_license | <?php
//let's start our session, so we have access to stored data
session_start();
echo "Los datos ingresados son los siguientes: <br />";
echo $_SESSION['name']."<br />";
echo $_SESSION['email_address']."<br />";
echo $_SESSION['membership_type']."<br />";
//echo $_SESSION['terms_and_conditions']."<br />";
echo ... | true |
971037e4b8b4537d6d886d1c6492f19b2cce5d6a | PHP | starweb/shop-api-sdk-php | /src/Api/Generated/Endpoint/PatchOrderStatus.php | UTF-8 | 3,146 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Starweb\Api\Generated\Endpoint;
class PatchOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint
{
protected $orderStatusId;
/**
* Updates an order status. Retrieves the updated `Orderstatus` object.
NB! You... | true |
30b0729b13a67d81b7395749e5605022a31a4fa4 | PHP | DemureTitan9970/Bank | /src/dktapps/pmforms/element/CustomFormElement.php | UTF-8 | 2,537 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \_... | true |
82fa264e34aa071f99a69887b76dee7288b3f058 | PHP | solariumphp/solarium | /src/QueryType/Luke/Result/Schema/Field/WildcardField.php | UTF-8 | 1,573 | 2.75 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
/*
* This file is part of the Solarium package.
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code.
*/
namespace Solarium\QueryType\Luke\Result\Schema\Field;
/**
* Wildcard field used as a copy source.
*
* This is used when a co... | true |
56c418ace08bb77c8cfa385b0ea9398419593eca | PHP | drunomics/phapp-cli | /src/Exception/PhappEnvironmentUndefinedException.php | UTF-8 | 450 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace drunomics\Phapp\Exception;
/**
* Exception thrown when the phapp environment could not be determined.
*/
class PhappEnvironmentUndefinedException extends \Exception {
/**
* {@inheritdoc}
*/
public function __construct($message = 'The phapp environment is undefined. Run "phapp setup $ENVIR... | true |
c2f91fe6ffd2b39f7d11baa6b5cfbc5734b9bc50 | PHP | Lucciniolo/King-of-Fighters | /vie-de-classe/exercices/exoConnexion.php | UTF-8 | 1,343 | 3.140625 | 3 | [] | no_license | <?php include("header.php");
echo "<br><br><br><br><br>";
if( isset($_POST['pseudo']) AND
isset($_POST['motDePasse'])){
// echo "DEBUG : L'utilisateur : ". $_POST['pseudo'] . " a essayé de se connecter avec le mot de passe ". $_POST['motDePasse'];
// On récupère pour un utilisateur donné, dans la base de données... | true |
feb1b7dff56df5be064736b197cf6521af9ad4dd | PHP | burningshed/AdventOfCodeSharedGitHub | /Craige/2020/05/05-binary-boarding.php | UTF-8 | 768 | 3.1875 | 3 | [] | no_license | <?php
require __DIR__ . '/../vendor/autoload.php';
$lines = array_map('trim', explode("\n", file_get_contents(__DIR__.'/input.txt')));
$maxId = 0;
$minId = 1000;
$seatSum = 0;
foreach ($lines as $line) {
$rowString = str_replace(['F', 'B'], ['0', '1'], substr($line, 0, 7));
$columnString = str_replace(['L', ... | true |
0c6882a77827428b31061de28a2ee6d89ce8ba2f | PHP | Bcdo/project | /vendor/craftcms/cms/src/base/PreviewableFieldInterface.php | UTF-8 | 831 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\base;
/**
* PreviewableFieldInterface defines the common interface to be implemented by field classes
* that wish to be previewable on element indexes in the c... | true |
06cbc9fe762585b8bc89203ffc9047edc0545d8c | PHP | OAuth2-Framework/oauth2-framework | /src/Component/ClientRule/ContactsParametersRule.php | UTF-8 | 1,245 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace OAuth2Framework\Component\ClientRule;
use const FILTER_VALIDATE_EMAIL;
use InvalidArgumentException;
use function is_array;
use OAuth2Framework\Component\Core\Client\ClientId;
use OAuth2Framework\Component\Core\DataBag\DataBag;
final class ContactsParametersRule implements R... | true |
4ac21ba3a58946f79d1fc18213ca4effc96c69b7 | PHP | DrCarpen/builder | /src/Parsers/ConstructService.php | UTF-8 | 3,313 | 2.546875 | 3 | [] | no_license | <?php
/**
* @author liyang <liyang@uniondrug.cn>
* @date 2019-05-06
*/
namespace Uniondrug\Builder\Parsers;
use Uniondrug\Builder\Parsers\Abstracts\Construct;
use App\Services\Abstracts\ServiceTrait;
class ConstructService extends Construct
{
protected $fileType = 'service';
public function __construct(... | true |
f79cd21deb089677a400a46cb1410bcb925f7050 | PHP | caomicc/Advanced-Web-Technologies-Class-Portfolio | /backup/labs/lab7/customer_action.php | UTF-8 | 2,463 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <html>
<head>
<title>Customer Update Action</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Student Status</h1>
<p> </p>
<?php
// this connects To database
$hostname = "omiccioli373.db.4076890.hostedresource.com";
$username = "omiccioli373";
$password = "Csci37... | true |
8eec31da3afa73b3be3b748f0ae3007810d6a2c0 | PHP | chanakaDe/LibrarySystemREST | /app/Http/Controllers/BookController.php | UTF-8 | 1,966 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: chanaka
* Date: 4/11/16
* Time: 2:20 PM
*/
namespace App\Http\Controllers;
use App\Book;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class BookController extends Controller
{
public function index()
{
$Books = Book::all();
... | true |
55a6e99dcd3fbc490a69ecd925cf1c6571b6f7d7 | PHP | Louzet/AppCertif | /application/controllers/Profil.php | UTF-8 | 1,417 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Profil extends CI_Controller
{
public function __construct(){
parent::__construct();
}
function index($id = NULL)
{
if(!empty($_GET['id'])){
/**
* Load function helper, pour retrouver l'utilisat... | true |
bde120e3fa4d21fe3dfc603ca283fc9391802c97 | PHP | nknhan01/Ecommerce | /platform/plugins/ecommerce/src/Services/Products/UpdateDefaultProductService.php | UTF-8 | 1,712 | 2.609375 | 3 | [] | no_license | <?php
namespace Platform\Ecommerce\Services\Products;
use Platform\Ecommerce\Models\Product;
use Platform\Ecommerce\Repositories\Eloquent\ProductRepository;
use Platform\Ecommerce\Repositories\Interfaces\ProductInterface;
class UpdateDefaultProductService
{
/**
* @var ProductRepository
*/
protected... | true |
adc3b0e5891b9b642c94d806ade3f65cb6bf1c16 | PHP | ryno888/westcoast_tyres | /application/libraries/database/Lib_db.php | UTF-8 | 11,139 | 2.5625 | 3 | [] | no_license | <?php
/**
* Description of lib
*
* @author Ryno
*/
class Lib_db{
//put your code here
private $table = false;
private $key = false;
private $display_field = false;
private $fields_arr = false;
public $id = false;
public $obj = false;
public $obj_arr = [];
pri... | true |
6e68036ac7039616b397bd8fe7c587eba117ce0f | PHP | MichalKatuscak/iDoklad | /LOV/DocumentTypeEnum.php | UTF-8 | 1,730 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Fousky\Component\iDoklad\LOV;
/**
* @author Lukáš Brzák <brzak@fousky.cz>
*/
class DocumentTypeEnum extends iDokladAbstractEnum
{
const ISSUED_INVOICE = 0;
const PROFORMA_INVOICE = 1;
const CASH_VOUCHER = 2;
const CREDIT_NOTE = 3;
const BANK_STATEMENT = 4;
const RECEIVED... | true |
4e783b7ce2c022a593b6b80cf72dba4cd782af71 | PHP | BookJapan/op-core | /Model/Blowfish.model.php | UTF-8 | 656 | 2.6875 | 3 | [] | no_license | <?php
/**
* Blowfish.model.php
*
* @author tomoaki.nagahara@gmail.com
*/
/**
* Model_Blowfish
*
* @author tomoaki.nagahara@gmail.com
*/
class Model_Blowfish extends OnePiece5
{
/**
* @var Blowfish
*/
private $_blowfish = null;
function Init()
{
parent::Init();
$this->_blowfish = new Blowfish();
... | true |
8e197738c2be3fd25031b2703d5006800cfa08e1 | PHP | johangrahn/cgeek | /index.php | UTF-8 | 3,154 | 3.09375 | 3 | [] | no_license | <?php
// Set error reporting for the site
// This should be set to 0 / off in production
error_reporting( E_ALL );
ini_set( "display_errors", "on");
// Automaticly loads each class that is needed by including
// the definition from a file
function __autoload( $class ) {
$fileName = "lib/" . $class . ".class.php";... | true |
7742439e48bf7f911160b2970d047866bbec7185 | PHP | dixonnixon/Contracts | /app/Client.php | UTF-8 | 518 | 3.109375 | 3 | [] | no_license | <?php
namespace Contracts;
class Client extends Entity
{
protected $surname;
protected $name;
protected $number;
protected $patronymic;
private $hid;
protected $age;
private $price;
function __construct($surname, $un, $patronymic)
{
$this->surname = $surname;
$this->name... | true |
edd802ab98d6b067e14803f0ea5183e0e4c905d2 | PHP | thohedul/project_inds | /CRUD/admin/classes/class.usergroup.php | UTF-8 | 4,619 | 2.890625 | 3 | [] | no_license | <?php
require_once('dbconfig.php');
class USERGROUP {
private $conn;
public function __construct() {
$database = new Database();
$db = $database->dbConnection();
$this->conn = $db;
}
public function runQuery($sql) {
$stmt = $this->conn->prepare($sql);
return ... | true |
9ff1ab0517b38ab2b6469d4cf9fb975ba100521a | PHP | linhnvl/BC-PHP-Ung-dung-Calculator | /Ung-dung-Calculator.php | UTF-8 | 1,214 | 3.28125 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
<form method="post">
<div>
<h2>Calculator</h2>
<input type="text" name="a" placeholder="a"/><br/>
<select name="operator">
<option>+</option>
<option>-</option>
... | true |
b638a0d72ae72a0e85841fc1743db85225dbf1a7 | PHP | Custerx/1DV610-L2 | /view/AccountView.php | UTF-8 | 4,098 | 2.796875 | 3 | [] | no_license | <?php
namespace View;
class AccountView {
private static $edit = 'AccountView::Edit';
private static $confirm = 'AccountView::Confirm';
private static $passwordRepeat = 'AccountView::PasswordRepeat';
private static $name = 'AccountView::UserName';
private static $password = 'AccountView::Password';
privat... | true |
08e8012cd7c735311b2d3184027e6aec920a7a73 | PHP | turchynbohdan/page_manager | /pageManager.php | UTF-8 | 2,142 | 2.765625 | 3 | [] | no_license | <?php
include 'conn.php';
include 'session.php';
if(isset($_POST['add'])){
$title = $_POST['title'];
$content = $_POST['content'];
$meta = $_POST['meta'];
$infoID = $_GET['infoID'];
$insert = "insert into info_tbl (title,content,meta) values ('$title','$content','$meta')";
if($conn->query($in... | true |
a66e17242937bff8140c9869f924de4e6b30537f | PHP | LasithEranga/bookish-PHP-palm-tree | /strlen.php | UTF-8 | 949 | 4.21875 | 4 | [] | no_license |
<?php
//strlen counts the number of characters in a string and returns the number of characters.
$string = "Hello World";
echo strlen($string);
//str_word_count returns the number of words in a sentence
$string = "Hello World Welcome to php";
echo str_word_c... | true |
0f28e882c6f8478126d14fe67d76ef7928aaf487 | PHP | botnyx/sfe-backend-core | /src/Core/Frontend/Acl/Acl.php | UTF-8 | 3,118 | 2.734375 | 3 | [] | no_license | <?php
namespace Botnyx\Sfe\Backend\Core\Frontend\Acl;
use Zend\Permissions\Acl\Acl as ZendAcl;
class Acl extends ZendAcl
{
const ROLE_EVERYONE = 'guest';
const ROLE_MR_X = 'MR_X';
protected $roles = [
'member',
/*'manager',
'owner',*/
'admin',
];
protected $re... | true |
899deee5ec9029c526da31c89bc6a002e9360e45 | PHP | aledebarba/gheama-wordpress-theme | /functions/utils.php | UTF-8 | 1,934 | 3 | 3 | [] | no_license | <?php
/**
* Simple helper to debug to the console
*
* @param $data object, array, string $data
* @param $context string Optional a description.
*
* @return string
*/
function jsconsole($data, $context = 'Debug in Console') {
// Buffering to solve problems frameworks, like header() in this and not a solid r... | true |
a31826290ff40e618b7b586c800b0335e1c2b02f | PHP | hotchocolate99/log_in_functions | /ユーザー認証機能/logout.php | UTF-8 | 864 | 2.6875 | 3 | [] | no_license | <?php
session_start();
//ログアウトする時は、セッションの内容をdestroyで消去する。その前にセッションに空の配列を入れている。
//var_dump($_SESSION);
$_SESSION = array();
// セッションクッキーを削除する。これはセッション削除とセットで覚える。このまま決まり文句として。
if (isset($_COOKIE["PHPSESSID"])) {
setcookie("PHPSESSID", '', time() - 1800, '/');
}
session_destroy();
//var_dump($_SESSION);
?>
<!DOC... | true |
f47863e429394fa2d69f1d31598816f5e2951fdb | PHP | JokerLLLL/study | /yii2/yii-源码分析/依赖注入/Container.php | UTF-8 | 1,969 | 2.890625 | 3 | [] | no_license | <?php
/** 依赖容器 IoC 控制反转容器
* Class Container
*/
//
class Container
{
private $_definitions;
// /** 设置控制容器
// * @param $class
// * @param $definition
// */
// public function set($class,$definition)
// {
// $this->_definitions[$class] = $definition;
// }
//
// public functi... | true |
38b4ee0d3265481b141058fcbd3f744923d614ce | PHP | RajkumarPadilam/PaidRides | /ServerCodePHP/db_connect.php | UTF-8 | 432 | 2.59375 | 3 | [] | no_license | <?php
class DB_CONNECT{
function __construct(){
//$this-> db_connect();
}
function __destruct(){
$this-> db_close();
}
function db_connect(){
//require_once 'config.php';
require_once __DIR__ . '/db_config.php';
$con=mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD)
or die(mysql_error());
$db=mysql_s... | true |
a6154b11b29139984d515a3b91d9815473817ea4 | PHP | DigitalAgencySimpleasy/OctoberPlugins | /plugins/simpleasy/blog/components/EntryForm.php | UTF-8 | 744 | 2.609375 | 3 | [] | no_license | <?php namespace Simpleasy\Blog\Components;
use Cms\Classes\ComponentBase;
class EntryForm extends ComponentBase
{
public function componentDetails()
{
return [
'name' => 'EntryForm Component',
'description' => 'Backend form used in the front-end'
];
}
public fun... | true |
1baadb4cd9776a8eefa0bcbec73b6fe3d7e62c5b | PHP | MouquetS/evaluationWF3 | /exercice4/Chat.php | UTF-8 | 2,028 | 3.765625 | 4 | [] | no_license | <?php
class Chat {
private $data = array();
private $prenom;
private $age;
private $couleur;
private $sexe;
private $race;
public function __construct($prenom,$age,$couleur,$sexe,$race) {
$this->prenom = $prenom;
$this->age = $age;
$this->couleur = $couleur;
$this->sexe = $sexe;
$th... | true |
617a4501f90f88aa9885d86920d9eafaecb9a426 | PHP | nurmanhabib/actor-manager | /src/Commands/DetachRole.php | UTF-8 | 635 | 2.59375 | 3 | [] | no_license | <?php
namespace Nurmanhabib\ActorManager\Commands;
use Nurmanhabib\ActorManager\ActorManager;
use Nurmanhabib\ActorManager\Contracts\ActorCommand;
use Nurmanhabib\ActorManager\Contracts\ActorModel;
use Nurmanhabib\ActorManager\Contracts\RoleModel;
class DetachRole implements ActorCommand
{
protected $role;
... | true |
64bda42e650a0a85d39ee07d4b7b0c710e80aac3 | PHP | k01yasik/driveit | /app/Repositories/Interfaces/SeoRepositoryInterface.php | UTF-8 | 527 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Repositories\Interfaces;
use \Illuminate\Database\Eloquent\Model;
use \Illuminate\Database\Eloquent\Collection;
interface SeoRepositoryInterface
{
public function getSeoData(string $name): array;
public function getAllData(): array;
public function getSeoById(int $id): array;
p... | true |
7393feb33a4412ab6ded26e33ab168cf68859eb0 | PHP | Didenkot34/kamediduet.yii2 | /models/Comments.php | UTF-8 | 3,007 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\db\Query;
define('NEW_COMMENTS', 0);
define('APPROVED_COMMENTS', 1);
/**
* This is the model class for table "comments".
*
* @property integer $id_comments
* @property integer $id_posts
* @property string $users_name
* @property string $users_last_name
* @property... | true |
68bb14fccc9f5578703ac7d272b73659c032bd77 | PHP | eosfrontier/orthanc | /includes/classes/Skillsv2.php | UTF-8 | 5,184 | 2.71875 | 3 | [] | no_license | <?php
class charSkillsv2 {
public function get_char_type_by_id( $id ) {
$stmt = Database::$conn->prepare( 'SELECT status FROM ecc_characters WHERE characterID = ? AND sheet_status != "deleted"' );
$res = $stmt->execute( [ $id ] );
$res = $stmt->fetchColumn();
return $res;
}
public function get_skills_a... | true |
b18f1969d0405bf03ec56a4d0a9d802152c70bee | PHP | emindedic/php-page-cms | /includes/navbar.php | UTF-8 | 474 | 2.578125 | 3 | [] | no_license | <div class="navbar">
<ul id="menu">
<li>
<a href='index.php'>Početna</a>
</li>
<?php
include "includes/database.php";
$get_cats = "SELECT*FROM categories";
$run_cats = mysqli_query($connect,$get_cats);
while ($cats_row = mysqli_fetch_array($run_cats)) {
$cat_id = $cats_row['cat_id']... | true |
e8ea40406dcb3e0e7eb6ae181c32cb28a3d9277f | PHP | CJayHe/WXBizMsgCrypt | /wxMsgCrypt/WXBizMsgCryptTool.php | UTF-8 | 4,190 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: juhaiweilan-liuyunxin
* Date: 2019/12/17
* Time: 2:44 PM
*/
namespace App\wxMsgCrypt;
class WXBizMsgCryptTool
{
private $token;
private $encodingAesKey;
private $appId;
/**
* 构造函数
* @param $token string 公众平台上,开发者设置的token
* @param $encoding... | true |
b6c3460293f924ab9c229b2a54294396a63d413f | PHP | habib85434/yaraku-inc | /src/app/Repositories/Interfaces/BookRepositoryInterface.php | UTF-8 | 570 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Repositories\Interfaces;
interface BookRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array $data
* @param int $record
* @param string $sortKey
* @param string $order
* @return mixed
*/
public function list(array $data, int $record, string... | true |
1e62217f74f21508a2f0334e6510651c489dd2c8 | PHP | ngaphan/github | /Dragon Slayer(marcheBien)/actions.php | UTF-8 | 2,980 | 2.828125 | 3 | [] | no_license | <?php
// partie control dragonManager
$dragonManager = new DragonManager($PDOConnectionObject);
if (isset($_POST['action']) && $_POST['action'] === 'addDragon')
{
$dragonsArray = $dragonManager->addDragon($_POST["dragonName"], $_POST["dragonLifeMax"],
... | true |
cdb57036ad02e798b46f1b7d0d3b01d9a2c39496 | PHP | dphoursa/php-examples | /src/PandigitalPrime.php | UTF-8 | 1,656 | 3.578125 | 4 | [] | no_license | <?php
class PandigitalPrime
{
public function compute()
{
$number = 123456789;
$prime = 0;
while (true) {
if(NthPrime::is_prime($number)) {
$prime = $number;
}
$numbers = str_split((string)$number);
$numbers =... | true |
7c4dd0a299ef9191869c9e36aa673c15c9109e2d | PHP | elgervb/imagemanipulation | /src/imagemanipulation/Args.php | UTF-8 | 3,535 | 3.546875 | 4 | [] | no_license | <?php
namespace imagemanipulation
{
class Args
{
public static function bool($val, $name = 'Arg'){
return new BooleanChecker($val, $name);
}
public static function float($val, $name = 'Arg'){
return new FloatChecker($val, $name);
}
... | true |
5923cf2b3ed5c72651498e7366f1c899ee8890d4 | PHP | pengfei2017/ypk | /app/common/models/Link.php | UTF-8 | 3,471 | 2.96875 | 3 | [] | no_license | <?php
namespace Ypk\Models;
class Link extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
* @Primary
* @Identity
* @Column(type="integer", length=10, nullable=false)
*/
protected $link_id;
/**
*
* @var string
* @Column(type="string", length=100, nullable=true)... | true |
bfe9cab2a25fe4df6f13e1c6b03e610679fc4ff8 | PHP | ecjia/ecjia-daojia | /vendor/royalcms/metable/Royalcms/Component/Metable/DataType/ArrayHandler.php | UTF-8 | 651 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Royalcms\Component\Metable\DataType;
/**
* Handle serialization of arrays.
*
*/
class ArrayHandler implements HandlerInterface
{
/**
* {@inheritdoc}
*/
public function getDataType()
{
return 'array';
}
/**
* {@inheritdoc}
*/
public function canHa... | true |
d9ab1e9b5eee61b9c894fc860420654ba075dcd5 | PHP | satuuntuksemuaaja/frugal_new | /vendor/vocalogic/laravel5/src/Html/PanelBuilder.php | UTF-8 | 6,174 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php namespace Vocalogic\Html;
class PanelBuilder {
use GenericBuilder;
protected $context = 'default';
protected $header = [];
protected $body = [];
protected $table = [];
protected $listGroup = [];
protected $footer = [];
/**
* Set the panel context. (default, primary, success, info, warning or da... | true |
efc0dcd162ca89b0cdffad56898d66d7b254d4b0 | PHP | rkislov/tickets | /app/UuidTrait.php | UTF-8 | 764 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: roman
* Date: 10.04.18
* Time: 11:41
*/
namespace App;
use Ramsey\Uuid\Uuid;
trait UuidTrait
{
/**
* The "booting" method of the model.
*/
protected static function boot()
{
parent::boot();
/**
* Attach to the 'creating' Mode... | true |
bd3f712081b29d0df5be2a8dd6edb6739bda3b83 | PHP | rfvdqu5i/PHP-MYSQL | /unit09/Ex02/employee_edit_process.php | UTF-8 | 2,053 | 2.859375 | 3 | [] | no_license | <?php
include_once('connection.php');
function file_upload($target_dir,$input_name,$max_size, $formats_allowed_array){
$target_file = $target_dir."/" . basename($_FILES[$input_name]["name"]);
$uploadOk = 1;
$imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
$error_arr =array();
... | true |
eb63868300f485557642d11af33cb3706225f724 | PHP | longyatmok/cuhk-software-engineering-project | /php/Library/SocialGateway/Auth/Active.php | UTF-8 | 879 | 2.71875 | 3 | [] | no_license | <?php
class SocialGateway_Auth_Active implements SocialGateway_Auth{
/**
*
* Use unique id as user_id
* @param SocialGateway_Account $account
* @return int User ID of your own account system
*/
public function getUserId(SocialGateway_Account $account){
return $account->unique;
}
/**
*
* REPLA... | true |
e693bfd51729cf2177b8b540daac06e00e1dc3b6 | PHP | i865898963/testlarvel | /app/Http/Middleware/CheckUserMiddleware.php | UTF-8 | 1,262 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Models\User\AdWxUser;
use Closure;
class CheckUserMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $nex... | true |
3f1eaf61bf0c28aeaff93af220496c031529051c | PHP | jeffsouln/OutdoorSerbia | /model/ActiveRecord.class.php | UTF-8 | 1,366 | 2.96875 | 3 | [] | no_license | <?php
abstract class ActiveRecord {
public static function getAll () {
$table = static::$table;
$res = array();
$db = DB::getInstance();
$st = $db->prepare("SELECT * FROM ".$table);
$st->setFetchMode(PDO::FETCH_CLASS, get_called_class());
$st->execute();
while ($rw = $st->fetch(PDO::FETCH_CLASS)) {
$... | true |
bbaf86a472f3e6855be891dc7761cc556c4807db | PHP | ahmedkhaeld/learn-MVC-pattern | /src/app/Services/EmailService.php | UTF-8 | 164 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Services;
class EmailService
{
public function send(array $to, string $template):bool
{
sleep(1);
return true;
}
} | true |
993a5820a08f6c31eddbcf5d43678339ebabba50 | PHP | mjc118/ISPTermProject | /Fetch.php | UTF-8 | 1,217 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
$servername = "localhost";
$username = "root";
$password = "";
$db = "test";
//server location, username, password, database
$mysqli = new mysqli($servername, $username, $password, $db)
or die("Connection Failed");
if(!$mysqli){
echo "<p>Connection Failed</p>";
}
if(isset($_POST['CheckID'])){
... | true |
58fd1f93d7b47f709077f095245083c8cce43ee2 | PHP | aedge/prediction-factory-2.0 | /app/Http/Controllers/LeagueController.php | UTF-8 | 2,784 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Repositories\LeagueRepository;
use App\Repositories\CompetitionRepository;
class LeagueController extends Controller
{
protected $leagues;
/**
* Create a new controller instance.
*
* @r... | true |