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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
316894abb73fac44ff4c436a547a8c8d7c9cd25b | PHP | StrawMan/AIRSafecast-public | /web/class/jsonhandler.class.php | UTF-8 | 2,156 | 2.875 | 3 | [] | no_license | <?php
////////////////////////////
//Output/internal encoding.
////////////////////////////
mb_internal_encoding ('UTF-8');
mb_http_output ('UTF-8');
////////////////////////////
////////////////////////////
//JSON data handler.
////////////////////////////
//Class name.
class jsonhandler extends dbconnect {
//V... | true |
b9711979e22a3c0e87728b148ac132c2b8ffc33b | PHP | NVerine/old | /src/entity/EstoqueETT.php | UTF-8 | 903 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Cleiton
* Date: 24/01/2019
* Time: 15:50
*/
namespace src\entity;
use src\services\Transact\ExtPDO as PDO;
class EstoqueETT extends ObjectETT
{
public static function getEndereco(){
global $conexao;
$where = "WHERE ".filtraFilial("A.... | true |
09aca560524d2da4f9cf61dd32f919d7e6c17c02 | PHP | cd660437/SeniorProject | /html/index.php | UTF-8 | 731 | 2.671875 | 3 | [] | no_license | <?php
// Initialize shopping cart class
include_once 'Cart.class.php';
$cart = new Cart;
// Include the database config file
require_once 'dbConfig.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP Shopping Cart</title>
<meta charset="utf-8">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min... | true |
b8701dc85c81aad0d6dd5e23caa4531c18f61f27 | PHP | theodend/multisite4 | /src/ZPB/AdminBundle/Entity/AnimalCategory.php | UTF-8 | 2,404 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace ZPB\AdminBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* AnimalCategory
*
* @ORM\Table(name="zpb_animal_categories")
* @ORM\Entity(repositoryClass="ZPB\AdminBundle\Entity\AnimalCategoryRepository")
*/
c... | true |
91e28d96c596d4086e2efcf3fc3534c5e8ec2c71 | PHP | apache/zetacomponents | /Reflection/tests/test_helper.php | UTF-8 | 2,694 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "Licen... | true |
1eb739bf2fb82a2dd67e0a7dc7f9844890dd97ea | PHP | phuongnguyenpnv/phpProject_Website_Trangsuc | /search.php | UTF-8 | 733 | 2.53125 | 3 | [] | no_license | <?php
$conn = new mysqli('localhost', 'root', '', 'DatabaseTrangSucCuoi');
// Kiểm tra kết nối
if ($conn->connect_error) {
die("Kết nối thất bại: " . $conn->connect_error);
}
if (isset( $_GET['ok']) && $_GET["search"] != '') {
$search = $_GET['search'];
$query = "SELECT * FROM ... | true |
d4031af1a5643c4b038ec8529725cdbf8e167c92 | PHP | ansata-biz/s1-form-widgets | /widgets/awgWidgetFormPropelJqueryAutocompleter.php | UTF-8 | 1,118 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by AWG, Alex <alex@ansata.biz>
* Date: 24.04.12
* Time: 21:52
*/
class awgWidgetFormPropelJQueryAutocompleter extends sfWidgetFormPropelJQueryAutocompleter
{
protected function configure($options = array(), $attributes = array())
{
$this->addOption('query_methods', array());
parent... | true |
dd1ecef130ad9f3c471bdda8515b56f6282b51f7 | PHP | vicky92727/Billie | /src/app/Repository/Eloquent/InvoiceRepository.php | UTF-8 | 2,386 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository\Eloquent;
use App\Models\Invoice;
use App\Repository\InvoiceRepositoryInterface;
class InvoiceRepository extends BaseRepository implements InvoiceRepositoryInterface
{
/**
* @var Model
*/
protected $model;
/**
* BaseRepository constructor.
*
* @par... | true |
365637a72dc41442ccbca97a8090265f322410e5 | PHP | delorey-betsey/cs313-php | /web/07prove/modules/inventory.php | UTF-8 | 4,476 | 2.65625 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['items']))
{
$items = $_POST['items'];
}
?>
<!-- inventory -->
<?php
echo("All proceeds benefit Dane County Humane Society.");
echo "<br>";
if(!empty($items))
{
$N = count($items);
echo "<br />";
echo("$N item(s) a... | true |
a6bebf0522bc671c317dca669649d2a71ee5356c | PHP | nguyenthithuuyen/maximum_php | /index.php | UTF-8 | 349 | 3.203125 | 3 | [] | no_license | <?php
$convert = [[1,2,3,4,5],[7,8] ];
function convertMax($convert) {
$max = $convert[0][0];
for($i = 0; $i < count($convert); $i++) {
for($j=1;$j<count($convert);$j++){
if ($convert[$i][$j] > $max) {
$max = $convert[$i][$j];
}
}
}
return $max;
}... | true |
d6ad240c4d4777f2dd6a623881fbe929c07b1408 | PHP | ProAdmin007/UMI_Project2.2 | /weerapplicatie/datfile.php | UTF-8 | 262 | 2.578125 | 3 | [] | no_license | <?php
$files = scandir('data', SCANDIR_SORT_DESCENDING);
$newest_file = $files[0];
$file = fopen("./data/station_country_data.dat", "r");
$var = array();
while($x = fgets($file)){
$print = str_replace('"', "", $x);
print($print . "<br>");
}
| true |
ca3a0038040e29e70385269c4d9ab87a3d819b3e | PHP | HolieEm/exos-CWF | /PHP/php08getExo.php | UTF-8 | 3,275 | 2.765625 | 3 | [] | no_license | <?php
/*
-1- Utiliser un paramètre GET dans l'url : php08getExo.php?num=20
Récupérer ce paramètre 'num' avec la variable globale $_GET
Tester si la variable est définie, sinon donner la valeur 0.
Dans le body, créer $num balises div avec une boucle.
=> en changeant la valeur de 'num' dans l'url vous devriez voir ... | true |
726407082aa0975f7531f72e34a72a6932700130 | PHP | skillexchange/hackathon | /ideapocket/fuel/app/migrations/003_create_likes.php | UTF-8 | 700 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Fuel\Migrations;
class Create_likes
{
public function up()
{
\DBUtil::create_table('likes', array(
'id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true),
'issue_id' => array('type' => 'int', 'constraint' => 11, 'null' => true),
'solution_id' => arr... | true |
24e30c9bdd1e6f859b6a86b7f8855fa3adab6c33 | PHP | AlekseiiShevchuk/laravel-job-queue | /app/Listeners/SendEmailNotificationsAboutNewBook.php | UTF-8 | 762 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Listeners;
use App\Events\BookWasCreated;
use App\Jobs\InformUserAboutNewBook;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\User;
use App\Book;
use Illuminate\Support\Facades\Queue;
class SendEmailNotificationsAboutNewBook
{
/**
* Create t... | true |
39f53a990f018e9ac260aab7282b9454b7770091 | PHP | Artem007/phpTest | /index.php | UTF-8 | 850 | 3.109375 | 3 | [] | no_license | <?php
// $emailTo="melnykartem10@gmail.com";
// $subject="Test";
// $body="Testing mail php function";
// $headers="From:example@example.com";
//
// if(mail($emailTo,$subject,$body,$headers)){
// echo "Emal has been sent";
// }else{
// echo "Not sent";
// }
$to = 'melnykartem10@gmail.com';
$subject = 'the su... | true |
46ff73c69814867ca39a854019a1ec8b1d0d6a8f | PHP | lotusbase/lotus.au.dk | /src/templates/lib/classes/blast/query.php | UTF-8 | 3,645 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace LotusBase\BLAST;
/* BLAST\Query */
class Query {
// Vars
private $_vars = array(
'strand' => 'auto', # Default: Use intelligent strand detection
'from' => 0, # Default: Use position 0 (will return whole sequence)
'to' => 0, # Default: Use position 0 (will return whole sequence)... | true |
88ec8182c55728351df32514226f2996c8e8aa3e | PHP | rsinta/eccomerce | /user/keranjang.php | UTF-8 | 1,041 | 2.625 | 3 | [] | no_license | <?php
session_start();
$sid = $_SESSION['id_anggota'];
$total = 0;
include "../koneksi.php";
echo"<h1>Keranjang Belanja</h1>
<table border=1>
<tr>
<th>Nama Produk</th>
<th>Qty</th>
<th>Harga</th>
<th>Sub Total</th>
... | true |
d78a994bfe7519b18daa09ca27e555138a34b94f | PHP | webtree22/simrikphp | /wt-admin/users/changepassword.php | UTF-8 | 1,719 | 2.546875 | 3 | [] | no_license | <?php include "../base.php";
if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']))
{
$sn=$_POST['sn'];
$pageid=$_GET['pageid'];
if(isset($_POST['pass'])) $pass=$_POST['pass'];
if(isset($_POST['conpass'])) $conpass=$_POST['conpass'];
//$user_level=$_POST['user_level'];
//if... | true |
364434b86f5f02a8588870c04e67cc10bc2d953f | PHP | mstaples/laravel-comments | /src/migrations/2015_10_31_172600_create_comments_table.php | UTF-8 | 1,090 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCommentsTable extends Migration {
public function __construct() {
$this->tablename = config('comments.table');
}
/**
* Run the migrations.
*
* @return void
*/
public ... | true |
f3de4cbb7c2d01783e33264a57abab9c05925501 | PHP | hercules261188/hps-gems | /server/api/get-user.php | UTF-8 | 1,292 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
header("Content-Type: application/json");
header("Accept: application/json");
include_once("../config/Database.php");
include_once("../models/Auth.php");
include_once("../models/User.php");
$database = new Database();
$db = $database->connect();
$auth = new Auth($db);
$user = new User($db);
$errors... | true |
f66e2dda835b138e712d3f9fb83efd28c252c1b0 | PHP | phi-cor/tp-movie-land | /src/controller/Ajout.php | UTF-8 | 3,914 | 2.703125 | 3 | [] | no_license | <?php
class Ajout
{ private $title;
private $model;
private $errorMsg;
private $infoMsg;
private $API;
public function __construct()
{
$this->title = 'Ajout de film';
$this->model = new Model();
$this->errorMsg = '';
$this->infoMsg = '';
... | true |
7e4c203484e3938ea3049b06887f315bb57029cc | PHP | kcgebologlu/Predicting-Diseases-From-Symptoms | /geogram.php | UTF-8 | 3,341 | 3.078125 | 3 | [] | no_license | <?php
echo "<h2>PHP is API setup!</h2>";
// $location_val = $_GET['location'];
// echo $location_val;
// $abc="hehe";
$myjson = "http://localhost:8001/full/";
$maps_json = file_get_contents($myjson);
echo $maps_json;
//i hope this curl approach works
// THIS SNIPPET to se will send your data t... | true |
ce12096bbda1c60c1b5ba8177b3d5f182a6967f4 | PHP | Erandamweerasinghe/Bus-Mart | /comman/getlocation.php | UTF-8 | 876 | 2.6875 | 3 | [] | no_license | <?php
include('connection.php');
include('functions.php');
date_default_timezone_set("Asia/Colombo");
if (isset($_GET["regno"]))
{
header("Content-Type: application/json; charset=UTF-8");
$stmt = $conn->prepare("SELECT * FROM bus WHERE RegNo ='".
$_GET["regno"]."' LIMIT 1");
//$stmt->bind_para... | true |
7eb54ff099ed562b4edb0433b9b303c06afbb0f7 | PHP | Shaion7/CMPE133-Project-socialmedia | /helpers/register_helper.php | UTF-8 | 2,623 | 2.65625 | 3 | [] | no_license | <?php
$first_name = "";
$last_name = "";
$email = "";
$confirm_email = "";
$password = "";
$confirm_password = "";
$date = "";
$error_messages = array();
if(isset($_POST['register_button'])){
$first_name = strip_tags($_POST['reg_firstname']);
$last_name = strip_tags($_POST['reg_lastname']);
$email = strip_... | true |
78037fe0d04d9ef51c63f6e447c341ee07bd0a8b | PHP | bryakwork/rollun-datastore | /src/Uploader/src/Iterator/DataStorePack.php | UTF-8 | 4,003 | 2.84375 | 3 | [] | no_license | <?php
namespace rollun\uploader\Iterator;
use rollun\datastore\DataStore\Interfaces\DataStoresInterface;
use rollun\dic\InsideConstruct;
use rollun\uploader\SeekableIterator;
use Traversable;
use Xiag\Rql\Parser\Node\LimitNode;
use Xiag\Rql\Parser\Node\Query\ScalarOperator\GeNode;
use Xiag\Rql\Parser\Node\Query\Scala... | true |
4f2cbdacb344fb74342f471e42c3a2af96f62888 | PHP | SW-Project/ClinicSystem | /App/Model/Model.php | UTF-8 | 313 | 2.703125 | 3 | [] | no_license | <?php
require_once("/Applications/XAMPP/xamppfiles/htdocs/SW/App/Database/Db.php");
abstract class Model
{
protected $db;
protected $conn;
public function connect()
{
if(null === $this->conn )
{
$this->db = new Db();
}
return $this->db;
}
}
?>
| true |
bce6ce58d3a8012c632e587cdd2d40d5902ce018 | PHP | devchuksemeka/turing-backend-challenge | /app/Repositories/Customers/CustomerInterface.php | UTF-8 | 463 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repositories\Customers;
interface CustomerInterface
{
public function getAll();
public function getSingle(int $id);
public function create(array $attributes);
public function updateProfile($customer_id,array $attributes);
public function updateAddress($customer_id,array $at... | true |
bbf5236fb029b9983479573da1db018a365da30a | PHP | Ashofiq/rongobuy-auth | /app/Repositories/User/UserRepository.php | UTF-8 | 913 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\User;
use App\Repositories\User\UserInterface as UserInterface;
use App\Models\User;
class UserRepository implements UserInterface
{
public $user;
function __construct(User $user) {
$this->user = $user;
}
public function reg($data){
return $this->user-... | true |
af6268c9278a94313e512c8da68475913688163d | PHP | matth2020/reports-api | /app/Http/Middleware/PrivilegeCheck.php | UTF-8 | 1,000 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
class PrivilegeCheck
{
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string $role
* @return mixed
*/
public function handle($request, Closure $next, $r... | true |
4feaf8839f622701d9bcd2dc4965db726e83ff43 | PHP | P79N6A/sosoframework | /superphp/SOSO/Base/Data/DataField.php | WINDOWS-1252 | 755 | 2.8125 | 3 | [] | no_license | <?php
/**
* @author moonzhang
* @version 1.0
* @created 01--2009 17:43:07
*/
class SOSO_Base_Data_DataField {
public $dateFormat;
public $defaultValue = '';
public $mapping;
public $type='auto'; //string int date?
function __construct($config){
if (is_string($config)){
$config = array("nam... | true |
f1200c03369acc69ab16a8abc37f06561a219712 | PHP | Quadrosh/NSY | /common/models/QuotepadImg.php | UTF-8 | 1,078 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "quotepad_img".
*
* @property integer $id
* @property string $name
* @property string $alt
* @property integer $order_weight
* @property string $style_key
* @property integer $quotepad_id
*/
class QuotepadImg extends \yii\db\Act... | true |
d64c8072bd6de90a5d20d4457527d62e008785fd | PHP | cryptoyacine/cinema | /backend/process/afficherfilm.php | UTF-8 | 557 | 2.609375 | 3 | [] | no_license | <?php
require_once '../model/utilisateur.php';
require_once '../model/bdd.php';
require_once '../manager/manager.php';
try {
$user = new utilisateur([
"filmnom" => $_POST["FilmNom"], //RENTRER LES VALEURS DANS LES SETTERS
]);
$man = new manager();
$_SESSION['stop']=4;
$man->afficher... | true |
e74b217ff11130808cce7bdf141645a2e052ab89 | PHP | Magein/thinkphp-logic | /src/system/system_user_role/SystemUserRoleValidate.php | UTF-8 | 655 | 2.578125 | 3 | [] | no_license | <?php
namespace magein\thinkphp_logic\system\system_user_role;
use think\Validate;
class SystemUserRoleValidate extends Validate
{
protected $rule = [
'title' => 'require|length:1,30',
'desc' => 'require|length:1,255',
'auth' => 'length:1,1500',
];
protected $message = [
... | true |
2e5b7d3d410b617b960f5a036ff9b796b029eb99 | PHP | ishunko/hubzero-cms | /core/plugins/wiki/parserdefault/macros/video.php | UTF-8 | 13,535 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package hubzero-cms
* @copyright Copyright 2005-2019 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access
defined('_HZEXEC_') or die();
/**
* Wiki macro class for displaying a youtube video
*/
class VideoMacro extends WikiMacro
{
/**
* Containe... | true |
846b9cf3cc1c8aa62d403d443b2a3da8765f187e | PHP | kangkkaa/2020_etc | /hwauin/m/syndi/libs/SyndicationStatus.class.php | UTF-8 | 1,683 | 2.796875 | 3 | [] | no_license | <?php
/**
* @class SyndicationStatus
* @author sol (ngleader@gmail.com)
* @brief Syndication 상태 정보 클래스
**/
class SyndicationStatus
{
// Status Server
var $status_host = 'syndication.openapi.naver.com';
var $site;
function setSite($site)
{
$this->site = $site;
}
function request()
{
if(!$this->site)... | true |
e6a26af18944a5f28ad9b820dfffa6731da6f638 | PHP | asvspb/volvo-gatchina | /mail.php | UTF-8 | 1,173 | 2.59375 | 3 | [] | no_license | <?php
$method = $_SERVER['REQUEST_METHOD'];
$project_name = 'Volvo-Gatchina';
$admin_email = 'd@cidious.com';
$form_subject = 'Request for Callback';
//Script Foreach
$c = true;
$message = '';
if ($method === 'POST') {
$username = htmlspecialchars(trim($_POST['user-name']));
$userphone = htmlspecialchars(tri... | true |
e56b74b7d3a0fe7963234ac9e38fd81afdda6c89 | PHP | richardndayi/crdl | /app/Http/Controllers/SallesController.php | UTF-8 | 1,211 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
Namespace App\Http\Controllers;
use App\Salle;
use Illuminate\Http\Request;
class SallesController extends Controller{
public function index()
{
# code...
$salles = Salle::all();
return view('salles/index',['salles'=>$salles]);
}
public function create()
{
# code...
return view('salles/... | true |
c70f65ea2c353cb64f8112948239033a537e1f7d | PHP | aabcehmt/fe | /app/Http/Controllers/Controller.php | UTF-8 | 1,717 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
abstract class Controller extends BaseController
{
use Authoriz... | true |
20849290a49c97a346474c0aeeb2587a926d62b3 | PHP | david2701/my-mantis | /plugins/CustomReports/pages/html_api.php | UTF-8 | 1,496 | 2.546875 | 3 | [] | no_license | <?php
/**
* Prints an option list containing all stored custom reports.
* @param $p_selected_report optionally specify the id of the report that should be selected.
*/
function print_custom_report_option_list( $p_selected_report = null, $p_all_custom_reports = null ) {
$t_custom_reports = $p_all_custom_reports;
if... | true |
11e3fd7caacff06567bec2c39322dc1bd5b21785 | PHP | christophemaymard/php-xml-schema | /src/PhpXmlSchema/Dom/ComplexContentElement.php | UTF-8 | 2,560 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the PhpXmlSchema library.
*
* @copyright 2018-2020, Christophe Maymard <christophe.maymard@hotmail.com>
* @license http://opensource.org/licenses/MIT MIT
*/
namespace PhpXmlSchema\Dom;
/**
* Represents the XML schema "complexContent" element.
*
* Attributes (version 1.... | true |
fe99d8e96f3ac1a057aa36d97fcaecb0b87105b9 | PHP | nytheme/reviewer | /html/today.php | UTF-8 | 2,178 | 2.5625 | 3 | [] | no_license | <?php
require_once(__DIR__ . '/config/config.php');
$reviewer = new \Reviewer\Model();
$words = $reviewer->getToday();
?>
<?php include('./header.php'); ?>
<p id="incorrecr_today" class="word_disp-none" onclick="switchShowWords()">不正解のみ表示する</p>
<p id="correcr_today" onclick="switchShowWords()">全て表示する</p>
<table>
... | true |
26b4d86da0dac95a493b6e720350344a7796adc0 | PHP | sc-zahradnik/p4f_utilities | /src/traits/Arrays/Intersect/UKey.php | UTF-8 | 1,710 | 3.046875 | 3 | [] | no_license | <?php
namespace P4F\Components\Utilities\traits\Arrays\Intersect;
/**
* @url http://php.net/manual/en/function.array-intersect-ukey.php
*/
trait Ukey{
/**
* Computes the intersection of arrays using a callback function on the keys for comparison.
* @param array $array1 Initial a... | true |
50a5b971d231f202168b23ae5a95732a0b552699 | PHP | gilleh/reg_form | /private/reg_funct.php | UTF-8 | 3,381 | 2.703125 | 3 | [] | no_license | <?php
include_once('config.php');
require_once('../../lib/password.php');
class Reg extends PDO {
public function __construct(){
}
//Submit registration details to database
public function DB_reg_submit($data){
try {
parent::__construct(DB_DRIVER.':dbname='.DB_NAME.';host='.DB_HOST, DB_USER... | true |
479bc476eb7603b4d7bd07fe21ed456605469d22 | PHP | juco/imighty | /test/inclusion.php | UTF-8 | 1,414 | 2.578125 | 3 | [] | no_license | <?php
require_once('../lib/imagine/Imagine.php');
Imagine::configuration(array(
"input" => __DIR__."/images/",
"output" => __DIR__."/thumbs/"
));
$filter = Imagine::filter('grayscale')->
white('#ff0000')->
black('#000')->
color('#ff0000');
$include = Imagine... | true |
33eb179667fdc8420311f39b19bb422a510b360c | PHP | cgdsoftware/tasks | /src/Contracts/Taskable.php | UTF-8 | 446 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace LaravelEnso\Tasks\Contracts;
use Carbon\Carbon;
use LaravelEnso\Users\Models\User;
interface Taskable
{
public function name(): string;
public function description(): string;
public function allocatedTo(): ?User;
public function createdBy(): ?User;
public function updatedBy():... | true |
20b199a04578f2276f4750a88075796abfb55dc7 | PHP | StephHoel/Steph-Hoel | /testando/inc/libs/clearbricks/html.filter/class.html.filter.php | UTF-8 | 25,744 | 2.859375 | 3 | [] | no_license | <?php
# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Clearbricks.
#
# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE B... | true |
f3413bb2101b536be179dfa60cf1a47275ee1c43 | PHP | Nycto/Round-Eights | /src/functions/debug.php | UTF-8 | 3,010 | 2.921875 | 3 | [
"Artistic-2.0"
] | permissive | <?php
/**
* Debug related functions
*
* @license Artistic License 2.0
*
* This file is part of Round Eights.
*
* Round Eights is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License as published by
* the Open Source Initiative, either version 2.0 of the License, or
... | true |
1f7b1a787ea667dc5067f0326950fbd627e27764 | PHP | ErikLarsson9/ApplikationerForInternetSem3 | /Seminare3ModelViewController/Classes/Model/SessionFunctions.php | UTF-8 | 593 | 2.6875 | 3 | [] | no_license | <?php
namespace Model;
use\SecurityUtility;
Class SessionFunctions{
public function __construct()
{
session_start();
}
public function getPreviousPage(){
return $_SESSION['previousPage'];
}
public function setPreviousPage(){
if(!SecurityUtility\Validator::validateUR... | true |
481090799c181228d8facbd8bfa82dd50db020c5 | PHP | testkercode/projetBlog | /model/CommentManager.php | UTF-8 | 1,589 | 2.75 | 3 | [] | no_license | <?php
require_once("model/Manager.php");
class CommentManager extends Manager
{
public function getComments($id)
{
$db = $this->dbConnect();
$comments = $db->prepare('SELECT comment.id, content, creation_date, pseudo FROM comment INNER JOIN member ON id_member =member.id WHERE id_cha... | true |
0dd7b99879a390bbc957bb9421308bfeb4c63869 | PHP | zimosworld/SSLTools | /src/Services/DecodeService.php | UTF-8 | 1,483 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Zimosworld\SSLTools\Services;
use Zimosworld\SSLTools\Exception\CertificateRequestParseException;
use Zimosworld\SSLTools\Models\CertificateRequest;
/**
* Class DecodeService
* @package Zimosworld\SSLTools\Services
*/
class DecodeService extends BaseService implements DecodeInterface
{
/**
... | true |
17c09466a9bfcfc59668ebab2e2f06c0d6aaf3aa | PHP | madhusudhand/vave | /app/controllers/api/ProjectController.php | UTF-8 | 1,816 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class ProjectController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
try{
$projects = DB::table('projects as p')
->whereNull('p.deleted_at')
->select('p.proj_id as pro... | true |
4c6a9d26df9cd3240f637781b5f3a4fe65fc2639 | PHP | zilahir/onlinecourse | /functions.php | UTF-8 | 33,022 | 2.75 | 3 | [] | no_license | <?php
session_start();
include_once("MySQL.php");
MySQL::connect();
function getAllQuestions () {
$getAllProjectsSql = "SELECT * FROM `questions` ORDER BY `id` DESC ";
$rows = MySQL::getRows($getAllProjectsSql);
$count = 0;
foreach ($rows as $row ) {
$count++;
$id = $row->id;
$questi... | true |
390e46bce4ce06c211e714252cd5ae2971be8eae | PHP | cosnics/cosnics | /src/Chamilo/Core/Metadata/Storage/DataClass/RelationInstance.php | UTF-8 | 5,418 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Core\Metadata\Storage\DataClass;
use Chamilo\Core\Metadata\Storage\DataClass\Relation;
use Chamilo\Core\User\Storage\DataClass\User;
use Chamilo\Libraries\Storage\DataClass\DataClass;
use Chamilo\Libraries\Storage\DataManager\DataManager;
/**
*
* @package Chamilo\Core\Metadata\Relation\Insta... | true |
4147caf8733ccb5b5a2cfb9cc7e3b70c2bfe33b2 | PHP | xxgail/LeetCode-PHP | /HashTable/e-217-containsDuplicate.php | UTF-8 | 495 | 3.765625 | 4 | [] | no_license | <?php
/**
* @Time: 2019/9/14 22:04
* @DESC: 217. 存在重复元素
* 给定一个整数数组,判断是否存在重复元素。
* 如果任何值在数组中出现至少两次,函数返回 true。
* 如果数组中每个元素都不相同,则返回 false。
* @param $nums
* @return bool
*/
function containsDuplicate($nums) {
for ($i = 0; $i < count($nums); $i++){
if(array_search($nums[$i],$nums) != $i){
ret... | true |
96febd6ec560946b042d336d3fc5860fbcb0cd78 | PHP | Berylberry/CoalitionTest | /app/Http/Controllers/ProductController.php | UTF-8 | 1,865 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\View\View;
use Psy\Util\Json;
class ProductController extends Controller
{
/***
* Index method
*
* @return View
**/
public function index(){
re... | true |
073a6fe1bd6dce9db89eb5f1d3eb3b14ed9f0920 | PHP | tanzilkhawar/hello_new | /application/views/student_insert_view.php | UTF-8 | 1,635 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <html>
<head>
<title>CodeIgniter ajax post</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
// Ajax post
$(document).ready(function() {
$("#insert_product").submit(function(event) {
event.preventDefault();
var ... | true |
cc3a0fadffeceafa499f0b2e6cac805db08bd728 | PHP | vovarpd/laravel-anticaptcha | /src/Anticaptcha/FunCaptchaProxyless.php | UTF-8 | 1,053 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace LaravelAnticaptcha\Anticaptcha;
class FunCaptchaProxyless extends Anticaptcha implements AntiCaptchaTaskProtocol {
private $websiteUrl;
private $jsSubdomain;
private $websitePublicKey;
public function getPostData() {
return array(
"type" =>... | true |
a92ef3f0e1d8f23a9ee7d56dabe7da0104b8e803 | PHP | apdalah/ecommerce-lar7 | /app/Http/Controllers/Dashboard/LoginController.php | UTF-8 | 689 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use App\Http\Requests\Dashboard\LoginRequest;
class LoginController extends Controller
{
public function showLoginForm()
{
return view('auth.Dashboard.login');
}
public function login(LoginRequest $request)
... | true |
8cad74e78839b99139d05a6fc9787fbb78f26795 | PHP | markusmichel/fpp | /src/parse.php | UTF-8 | 28,008 | 2.6875 | 3 | [] | permissive | <?php
/**
* This file is part of prolic/fpp.
* (c) 2018-2019 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Fpp;
if (! \defined('T_OTHER')) {... | true |
05a236c2571da99a9d314755e8868624aae69b2d | PHP | SaraVaseei/counter | /app/Http/Controllers/CounterController.php | UTF-8 | 919 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redis;
class CounterController extends Controller
{
/**
* Load main template using cached value on Redis
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illumina... | true |
de8c2d0d4d94ab5af138ba62c5c6746ccbf6b12b | PHP | emikayelyan/quantum-php-core | /src/Libraries/Config/Config.php | UTF-8 | 3,946 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Quantum PHP Framework
*
* An open source software development framework for PHP
*
* @package Quantum
* @author Arman Ag. <arman.ag@softberg.org>
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
* @link http://quantum.softberg.org/
* @since 2.0.0
*/
namespace Quantum\Libraries\... | true |
bcd96305b13f6196b777bd425d5668313bc15db1 | PHP | jmKvcc17/A4 | /search.php | UTF-8 | 6,481 | 2.640625 | 3 | [] | no_license | <?php
/***
TO DO:
-FIX THE HIGHLIGHT
-SANITIZE INPUTS
*/
session_start();
require_once('config.php');
require_once('searchClass.php');
require_once('loginClass.php');
$loginObj = new loginClass();
$loginObj->checkSession();
$searchObj = new searchClass();
$searchResObj[] = null;
... | true |
fabce44d4134d64c4c276d098a83cf31fdc27e5a | PHP | yordan-kovachev/BoxGifts | /customer/customer_login.php | UTF-8 | 2,528 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by
* author name: Yordan Kovachev
* author id: abdt361
* date created: 04/2012
*/
session_start();
if(isset($_SESSION["customer"])){
header("location: c_home.php");
exit();
}
//this will check if the form is filled and the button is pressed to submit the login details
if(isset($_POST["username"]) ... | true |
8cd7d695574d7db45b471fa40afbb4ed2f835ecb | PHP | Deluxcode-paul/Laravel-5-Sample-Code | /app/Models/ArticleViews.php | UTF-8 | 735 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
/**
* Class ArticleHasTag
*
* @package App\Models
* @property integer $id
* @property integer $article_id
* @property integer $views
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @mixin \Eloquent
*/
class ArticleViews extends AppModel
{
/**
... | true |
ea65b4271b7377909b09c4238c3a637076ca06b3 | PHP | yashpokar/burger | /framework/database/Model.php | UTF-8 | 365 | 2.875 | 3 | [] | no_license | <?php
namespace Burger\Database;
use Exception;
use Burger\Database\DB;
abstract class Model
{
public static function __callStatic($methodName, $args)
{
$model = get_called_class();
if (! isset($model::$table)) {
throw new Exception("Table name is required in model class.");
}
return DB::table(
$mo... | true |
6ada61cf8de6656e1a0bb74f556452d9540a1661 | PHP | acutesoftware/links | /links.php | UTF-8 | 1,759 | 3.109375 | 3 | [] | no_license | <?php
// $testing = True ;
$testing = False ;
op( "entering links.php <BR>", $testing) ;
function op($txt, $lTesting) {
if ( $lTesting == True )
{
echo $txt."<BR>" ;
}
return True;
}
function f_parse_csv($file, $longest, $delimiter) {
// from php.net - http://php.net/manual/en/function.str-ge... | true |
610285772e701f08b4723ab7b54488f96e5bceba | PHP | andriy-sa/rivne-estate | /application/models/Comment_model.php | UTF-8 | 867 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Comment_model extends MY_Model
{
public $table = "comments";
public function __construct()
{
parent::__construct();
}
public function rules(){
$rules = array(
array(
'field' ... | true |
f50d6a752f268350869bc89da860b48745ded3a9 | PHP | itischarles/clientsite_version2.2 | /application/models/Investment_model.php | UTF-8 | 3,454 | 2.53125 | 3 | [] | no_license |
<?php
//if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Description of user_model
*
* @author trblap
*/
class Investment_model extends CI_Model {
private $investmentTable = "investment_intructions";
private $investmentTypeTable = "investment_type";
function __constr... | true |
af2a51f64aeccf585f5e2c220ed4adf9fd3edf2d | PHP | quoclan/Shape2 | /Shape/Cylinder.php | UTF-8 | 633 | 3.40625 | 3 | [] | no_license | <?php
include_once("Circle.php");
class Cylinder extends Circle {
public $height;
public function __construct($name,$radius,$height)
{
parent::__construct($name,$radius);
$this->height=$height;
}
public function setHeight($height){
$this->height=$height;
}... | true |
30c1db2803d9ff08ef32ff449dc7e3b147266b70 | PHP | simplyniceweb/chmsc-dorm | /src/models/Student.php | UTF-8 | 4,805 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace models;
/**
* @Entity @Table(name="student")
**/
class Student
{
/** @Id @Column(type="integer") @GeneratedValue **/
public $id;
/** @Column(type="string") **/
public $student_id;
/** @Column(type="string", nullable=true) **/
public $first_name;
/** @Column... | true |
81cabc90a477ae1be0e6a0e93acb3bcc644b5946 | PHP | zcmyworld/DesignPattern | /Abstract_Factory_Pattern/CarFactory.php | UTF-8 | 301 | 2.859375 | 3 | [] | no_license | <?php
require_once "./ITrafficTool.php";
require_once "./Car.php";
require_once "./CarWheel.php";
class CarFactory implements ITrafficTool
{
public function createTrafficTool()
{
return new Car();
}
public function createWheel()
{
return new CarWheel();
}
}
| true |
4243a5969f28eac0a9ec357d15fb923374640236 | PHP | msvrtan/j2c | /spec/NullDevelopment/Skeleton/PhpSpec/MethodGenerator/SpecDateTimeSerializeMethodGeneratorSpec.php | UTF-8 | 1,332 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace spec\NullDevelopment\Skeleton\PhpSpec\MethodGenerator;
use NullDevelopment\PhpStructure\DataType\Visibility;
use NullDevelopment\Skeleton\PhpSpec\Method\SpecDateTimeSerializeMethod;
use NullDevelopment\Skeleton\PhpSpec\MethodGenerator\SpecDateTimeSerializeMethodGenerator;
use... | true |
50d9d66780d67d60b860f6a93dc86fab69b86ded | PHP | Mampei/sample_ecsite | /sample/app/Sample_ItemSearch.php | UTF-8 | 2,001 | 2.8125 | 3 | [] | no_license | <?php
require_once 'Sample_RemoveTopColumn.php';
class Sample_ItemSearch
{
/* 商品名で検索
*
* @return 各商品の情報の多次元配列
*/
public function searchItem($db, $item_name, $detail_flag)
{
$rtc = new Sample_RemoveTopColumn();
if ($detail_flag == 0){
// itemのひらがな/カタカナそれぞれのフリガナも用意
... | true |
dc41d4b3fb1507e69cbfd1e36edf4274f3d340fb | PHP | armandolazarte/GN | /app/Http/Controllers/MaterialesController.php | UTF-8 | 4,218 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Material;
use Carbon\Carbon;
use Laracasts\Flash\Flash;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Http\Requests\MaterialRequestCreate;
use App\Http\Requests\MaterialRequestEdit;
use App\Auditoria;
use Illuminate\Suppo... | true |
27d3cbd702f21ab0d243db960e1d744044751d5f | PHP | matthew-halligan/HalliganWebDevelopment | /admin/page.php | UTF-8 | 6,984 | 2.59375 | 3 | [] | no_license | <!--
THIS IS WHERE I PUT THE PASSWORD ENTRY TO GET ACCESS TO ADMIN DASHBOARD
IF YOU ENTER THE PASSWORD CORRECTLY INTO THE FORM, IT WILL DISPLAY THE ADMIN DASHBOARD
THE PASSWORD IS ON LINE 46 AND YOU CAN CHANGE IT TO BE WHATEVER YOU WANT -->
<!-- <h1>Enter in the Admin Password</h1>
<form method="post" action="">
<inpu... | true |
c49494fda379e8c3ec9ab86dcacf51f31a90907e | PHP | hsegnitz/adventofcode | /php/2017/21/1.php | UTF-8 | 4,145 | 3.234375 | 3 | [] | no_license | <?php
$startTime = microtime(true);
#$input = file('./demo.txt', FILE_IGNORE_NEW_LINES);
$input = file('./in.txt', FILE_IGNORE_NEW_LINES);
$lines = [
'.#.',
'..#',
'###',
];
class PatternMatcher {
private array $patterns = [];
public function __construct(array $input)
{
foreach ($i... | true |
7a0b30ef616d0a61d95193f75dea3c9ab05999ce | PHP | alexfioto/survey | /index.php | UTF-8 | 3,467 | 3.3125 | 3 | [] | no_license | <?php
// echo 'PHP version: ' . phpversion();
include 'credentials.php';
$name_error = "";
$email_error = "";
$lucky_number_error = "";
$message = "";
$lucky_options = array(
"options" => ["min_range" =>1, "max_range" =>1000]
);
// TEST PDO CONNECTION
// try {
// $conn = new PDO("mysql:host=$servername;dbname=... | true |
001e25aedd6d12583e1f7887a4aac4cd66f41675 | PHP | radidat/rdk_financial | /model/ClientsModel.php | UTF-8 | 1,249 | 2.78125 | 3 | [] | no_license | <?php
require_once './model//DataBase.php';
class ClientsModel extends DataBase{
public function __construct()
{
}
public function setNewClient( array $data)
{
$db = $this->dbConnect();
if(!empty($data)){
$req = "INSERT INTO client (nom, prenom, email,... | true |
61c39d562fa04d2d6d158e71e153ff3349148c7c | PHP | adnanmuller/Singel_page | /Singel_page/whats_my_ip_final.php | UTF-8 | 1,705 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>What is my ip?</title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/normalize.css" rel="stylesheet">
<link href="css/style.css" rel="st... | true |
a48d60480219a1d4634cbbff67e43860a95af1b9 | PHP | peaBerberian/directory-list.php | /directory-list/index.php | UTF-8 | 1,957 | 2.90625 | 3 | [] | no_license | <html>
<head>
<title>Directory listing</title>
<style>
body {
background-color: #efefef;
}
.ico {
height: 24px;
width: 24px;
}
.fmod {
font-style: italic;
}
.list {
padding: 0px;
list-style: none;
}
.list... | true |
9eadcede4f9af50251af98b44b8b1c65a92ebce0 | PHP | vuylov/game | /protected/extensions/Levels/GameLevel.php | UTF-8 | 3,729 | 2.765625 | 3 | [] | no_license | <?php
/*
* Check value of level. Compare with prestige table
* Increase level
*/
class GameLevel extends CWidget {
public $step;
public function run(){
define("VIDEO_NAME", 2); // 2 index in params array in levels
$step = $this->step;
$levels = Yii::app()->params['levels'];
... | true |
f74191b3372fd15217901d4c878579754083ee6a | PHP | bflorestal/randomizer | /back/verifLogin.inc.php | UTF-8 | 347 | 2.59375 | 3 | [] | no_license | <?php
session_start();
/*
si la variable de session login n'existe pas cela signifie que le visiteur
n'a pas de session ouverte, il n'est donc pas logué ni autorisé à
accéder à l'espace membres
*/
if(!isset($_SESSION['login'])) :
header("location:index.php?e=1");
e... | true |
73eea12c8b6ea64bba3427b71f04216180a78c24 | PHP | mrclay/Elgg-mrclay_aalborg | /classes/UFCOE/Elgg/MenuList.php | UTF-8 | 6,580 | 3.09375 | 3 | [] | no_license | <?php
namespace UFCOE\Elgg;
/**
* Manage lists of Elgg menu items (during prepare hook) without losing sanity
*/
class MenuList
{
protected $items = array();
protected $names = array();
/**
* @param MenuList|array $items
*/
public function __construct($items = array())
{
if (!$items instanceof MenuList)... | true |
a479ad8bace6cfb4cfc38818197ba70e0ab8a10d | PHP | IsraelCustodio/cursophp7-htdocs | /criptografia/exemplo-02.php | UTF-8 | 437 | 2.84375 | 3 | [] | no_license | <?php
//Criptografia para código a partir do PHP 5.3.0
define("SECRET_IV", pack("a16", "senha"));
define("SECRET", pack("a16", "senha"));
$data = [
"nome" => "Hcode"
];
$openssl = openssl_encrypt(
json_encode($data),
'AES-128-CBC',
SECRET,
0,
SECRET_IV
);
echo base64_encode($openssl);
$str... | true |
36baace7c360719b2f5e27aaec6ec5f3f3bcc848 | PHP | nesiasoft/core | /src/Documents/Models/Document.php | UTF-8 | 673 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Nesiasoft\Core\Documents\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Nesiasoft\Core\Documents\Traits\HasDocuments;
class Document extends Model
{
use HasDocuments;
protected $fillable = [
'number',
];
/*************... | true |
ad0871018bc38c08893316655e91a0819e09d6ea | PHP | pesektomas/cache-example | /cache-example/src/App/Drivers/FakeDataSource.php | UTF-8 | 568 | 2.859375 | 3 | [] | no_license | <?php declare (strict_types = 1);
namespace App\Drivers;
use App\Entity\Product;
class FakeDataSource implements IElasticSearchDriver, IMySQLDriver
{
public const DS_MYSQL = 'MySQL';
public const DS_ELASTIC = 'Elastic';
public function findById(int $id): Product
{
return $this->getFakeData($id);
}
public... | true |
c1b966715ff0a14c7760b544e34b39d734fd2ddb | PHP | wenhuahetao/baocms | /Baocms/Lib/Model/ArticleModel.class.php | UTF-8 | 520 | 2.71875 | 3 | [] | no_license | <?php
class ArticleModel extends CommonModel{
protected $pk = 'article_id';
protected $tableName = 'article';
public function rands(){
$news = $this->order(array('article_id' => 'desc'))->limit(0, 45)->select();
shuffle($news);
if (empty($news)) {
return array();
}
$num = (3 < count($n... | true |
d227bd5d93903334186ec42403b0c2b15bfcf787 | PHP | pkthanh191/knowledge | /tests/traits/MakeCategoryCourseTrait.php | UTF-8 | 1,568 | 2.609375 | 3 | [] | no_license | <?php
use Faker\Factory as Faker;
use App\Models\CategoryCourse;
use App\Repositories\CategoryCourseRepository;
trait MakeCategoryCourseTrait
{
/**
* Create fake instance of CategoryCourse and save it in database
*
* @param array $categoryCourseFields
* @return CategoryCourse
*/
publi... | true |
260b2c87508215cde7e39e731847cb586b7a41dd | PHP | CoolMafia111/LojaVirtual | /admin/vendor/landim32/emagine-produto/src/BLL/CategoriaBLL.php | UTF-8 | 10,807 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by EmagineCRUD Creator.
* User: Rodrigo Landim
* Date: 09/11/2017
* Time: 22:46
* Tablename: produto_categoria
*/
namespace Emagine\Produto\BLL;
use Emagine\Produto\Ex\CategoriaException;
use Emagine\Produto\Model\LojaInfo;
use Exception;
use Landim32\EasyDB\DB;
use Emagine\Produto\DAL\Categ... | true |
ba29207ee26607e8285d47e023c1189fd2f1018d | PHP | Moro4125/indexer-common | /sources/View/Manager/ViewManager.php | UTF-8 | 2,753 | 2.6875 | 3 | [] | no_license | <?php
namespace Moro\Indexer\Common\View\Manager;
use Moro\Indexer\Common\Source\EntityInterface;
use Moro\Indexer\Common\View\Exception\DuplicateTypeException;
use Moro\Indexer\Common\View\Exception\UnknownTypeException;
use Moro\Indexer\Common\View\ManagerInterface;
use Moro\Indexer\Common\View\StorageInterface;
us... | true |
bfc82d2089b19b20ebea20a88c0ffa1f95b6a7c1 | PHP | OxfordInfoLabs/kinikit-mvc | /src/Session/PHPSession.php | UTF-8 | 6,014 | 2.90625 | 3 | [] | no_license | <?php
namespace Kinikit\MVC\Session;
use Kinikit\Core\Configuration\Configuration;
/**
* Convenient static class for accessing the http session. Adds built in methods for the core stuff like getting
* logged in user as well as a generic get / set property for user use.
*
* @noProxy
*/
class PHPSession impleme... | true |
c11cbc5bcf30ce486ec98c7e3cbfb3aeef08415a | PHP | warihanagumah1/developer-test | /app/Listeners/GetAchievemnetsUnlocked.php | UTF-8 | 2,830 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use App\Models\Comment;
use App\Events\BadgeUnlocked;
use App\Events\AchievementUnlocked;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\DB;
class GetAchievemnetsUnlocked
{
/**
* Create the event listener.
... | true |
143c79f9fc342f6d4552281131eee32f34ef4ef9 | PHP | moxley/modern-merchant | /plugins/media/MediaDAO.php | UTF-8 | 11,098 | 2.703125 | 3 | [] | no_license | <?php
/**
* @package media
* @copyright (C) 2004 - 2005 Moxley Data Systems
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Modern Merchant is Free Software
*/
/**
* Media Data Access Object
* @package media
*/
class media_MediaDAO extends mvc_DataAccess
{
private static $by_id_cache = array(... | true |
ac631d799b14c57232638f563ade72bdd5d08dde | PHP | BGCX261/zibo-svn-to-git | /trunk/zibo_modules/zibo.database.admin/src/zibo/database/admin/table/decorator/StatusDecorator.php | UTF-8 | 2,852 | 3.046875 | 3 | [] | no_license | <?php
namespace zibo\database\admin\table\decorator;
use zibo\library\i18n\I18n;
use zibo\library\html\table\decorator\Decorator;
use zibo\library\html\table\Cell;
use zibo\library\html\table\Row;
use \Exception;
/**
* Decorator for the status of a connection
*/
class StatusDecorator implements Decorator {
/... | true |
8ab01f6f7d7b2d00ed4d78797ef7f4749ffc6ab9 | PHP | iamfaty/web12 | /user.php | UTF-8 | 2,860 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/* 引入檔頭,每支程都會引入 */
require_once 'head.php';
/* 過濾變數,設定預設值 */
$op = system_CleanVars($_REQUEST, 'op', 'login_form', 'string');
$sn = system_CleanVars($_REQUEST, 'sn', '', 'int');
// echo $op;die();
/* 程式流程 */
switch ($op){
case "reg_form" :
$msg = reg_form();
break;
case "reg" :
$msg... | true |
a9f9b039a903420de7b00cb24124fc006522e563 | PHP | georgenicholas/fingerprintjs2_pipedrive_wordpress_plugin | /data_processing.php | UTF-8 | 1,749 | 3.375 | 3 | [] | no_license | <?php
class Processing {
// accepts an array of fingerprints
// returns a string
public static function clean_user_fingerprints($user_fingerprints) {
write_log('clean users fingerprints');
//remove excess spaces and duplicates
$user_fingerprints = array_unique(array_filter(str_replace(' ', '', $user_... | true |
49a6fb4d74e8bb233a637bb23703340844e2930b | PHP | thmiyathmary/kensyu_php_kadai | /Cookie.php | UTF-8 | 837 | 3.09375 | 3 | [] | no_license | <?php
class Cookie{
const EXPIRE_DEFAULT = "7";
const EXPIRE_BROWSER = "0";
const COOKIE_NAME = "ka5";
private $exp = 0;
public function __construct($expire = Cookie::EXPIRE_DEFAULT){
if($expire === self::EXPIRE_BROWSER){
$this->exp = 0;
... | true |
4a32cf670abf469c8ecf2b29caa9c340e4bc76b1 | PHP | pawan15943/demo | /wp-includes/blocks/calendar.php | UTF-8 | 6,178 | 2.671875 | 3 | [
"MIT",
"GPL-2.0-only",
"GPL-1.0-or-later",
"GPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Server-side rendering of the `core/calendar` block.
*
* @package WordPress
*/
/**
* Renders the `core/calendar` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the block content.
*/
function render_block_core_calendar( $attributes ) {
global $monthn... | true |
a08c9e661c228f00e676f4cd8617187462daf73b | PHP | TAGHREEDAA/Console-Crypto | /src/Encrypter/Encrypter.php | UTF-8 | 134 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Crypto\Encrypter;
interface Encrypter
{
public function encrypt($word);
public function decrypt($word);
} | true |
4f00ad8c707c4a713dea377643c96ee87c6dd16a | PHP | shrsujan/leapfrog | /Day 8/advanced/system/models/teacher.class.php | UTF-8 | 1,015 | 3.03125 | 3 | [] | no_license | <?php
class Teacher{
private $id;
private $first_name;
private $last_name;
private $contact;
private $salary;
private $department_id;
public function __construct(){
}
public function get_id(){
return $this->id;
}
public function set_id($id){
$this->id = $id;
}
public function get_first_name(){
... | true |