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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2da546811b990c580adce1669335b478d17c3124 | PHP | eric-hoppenworth/phpBamazon | /views/components/productForm.php | UTF-8 | 1,704 | 2.515625 | 3 | [] | no_license | <div class = "row">
<div class = "col">
<h1><?php if($isUpdate){echo "Update Product"; }else{echo "Create Product"; } ?></h1>
<hr>
<form method="post" action="/products">
<input name="_method" type="hidden" value=<?php if($isUpdate){echo "PUT"; }else{echo "POST"; } ?> />
<input name = "item_id" type="h... | true |
1e7763b629dceba7030f4c70a12eee96efdeb698 | PHP | septIO/Euler | /351-400/[357] - Prime generating integers/index.php | UTF-8 | 366 | 3.8125 | 4 | [] | no_license | <?php
/**
Consider the divisors of 30: 1,2,3,5,6,10,15,30.
It can be seen that for every divisor d of 30, d+30/d is prime.
Find the sum of all positive integers n not exceeding 100 000 000such that
for every divisor d of n, d+n/d is prime.
*/
$time_start = microtime(true);
// Code here...
echo "<p>" . (microt... | true |
5fc964e9b95aa66e7b38edc445f1fb50e0a59552 | PHP | atk14/IpMatcher | /src/ip.php | UTF-8 | 4,040 | 3.390625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Simple class for checking IP address suits IP mask.
*
* It can check both IPv4 and IPv6 addresses.
*
* @package Atk14\Ip
* @filesource
*/
/**
* Simple class for checking IP address suits IP mask.
*
* Compare two IPs. If the parameter $cidr is passed in the CIDR form, it takes it as a subnet or ra... | true |
6ae377ed788b6475514286f49fdee3b1ac1d6de2 | PHP | ace411/fp-php-book | /chap-03/functions.php | UTF-8 | 350 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive | <?php
function factorial(int $val): int
{
return $val < 2 ? 1 : factorial($val - 1) * $val;
}
function evenFilter(int $val): bool
{
return $val % 2 == 0;
}
function multipleOp(int $x, int $y, string $z): int
{
return is_numeric($z) ? ($x + $y) / $z : $x + $y;
}
$min = fn (int $start, int $value): int => $valu... | true |
3b1907d2af8435ded85d6e24a41a318bf92567d0 | PHP | 1630444/TAW-2019 | /Practica_7/views/modules/materias-grupo.php | UTF-8 | 5,641 | 2.640625 | 3 | [] | no_license | <!-- /////////////// MODULO DE CARGA DE GRUPOS ///////////////// -->
<!-- Recuadro -->
<?php
// Si el url tiene un id se guarda en u avariable
if (isset($_GET['id'])) {
$id = intval($_GET['id']);
} else {
// si no se regresa al index
header("location:index.php?action=grupo");
}
?>
<div class="col-xs-12">
... | true |
c5bcd96351cc2c8426188b4e8b9429354debe20e | PHP | samzoom/SCIL | /Scil/Services/Form/Wizard/Page/Content.php | UTF-8 | 2,327 | 3.25 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Abstract class for Scil_Services_Form_Wizard_Pages, including requirement
* for render() method, plus the serializable interface methods
*
* @package Services Wizard
* @category Scil
* @abstract
* @author Sam de Freyssinet
*/
class Scil_Services_Form_Wizard_Page_Content
extends Scil_Services_Form_W... | true |
32c2bf7d9caf8362ae4ece0258c1d01d466fd894 | PHP | archoncap/mqtt | /examples/b1-publishMessage.php | UTF-8 | 1,846 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This example will connect to the broker and send 10 messages to two different topics by both of them randomly.
*/
declare(strict_types = 1);
use unreal4u\MQTT\DataTypes\ClientId;
use unreal4u\MQTT\DataTypes\Message;
use unreal4u\MQTT\Client;
use unreal4u\MQTT\DataTypes\TopicName;
use unreal4u\MQTT\Proto... | true |
6060e129ddb2b84740b22287132a61bb31451451 | PHP | wilsalas/Prueba_PHP | /src/models/TeacherModel.php | UTF-8 | 1,050 | 3.046875 | 3 | [] | no_license | <?php
class TeacherModel
{
private $identificacion, $nombres, $apellidos, $genero;
public function __construct($identificacion, $nombres, $apellidos, $genero)
{
$this->identificacion = $identificacion;
$this->nombres = $nombres;
$this->apellidos = $apellidos;
$this->genero =... | true |
6c30c3b15e56f62cd22cffaef168845bbcf285d8 | PHP | olegmaster/repairsd | /plugins/meral/setup/components/Reviewform.php | UTF-8 | 827 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace Meral\Setup\Components;
use Cms\Classes\ComponentBase;
use Illuminate\Support\Facades\Input;
use vojtasvoboda\reviews\models\Review;
class Reviewform extends ComponentBase
{
public function componentDetails()
{
return [
'name' => 'reviewform Component',
'... | true |
4c86ee841603c06439d133e8bbee3e5ed5addaf3 | PHP | brainrepo/phpChallange01 | /src/EventDispatcher.php | UTF-8 | 593 | 2.59375 | 3 | [] | no_license | <?php
/**
* This file is part of the namshiApi package.
*
* (c) mauromurru
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Created: 18/03/15 18:51
*/
namespace brainrepo\namshiApp;
interface EventDispatcher
{
/**
* Di... | true |
97657f48b15e4433f9400c0d2111b40344573b0c | PHP | net-tools/google-api | /src/Services/Misc/MutableObject.php | UTF-8 | 1,381 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
/**
* MutableObject
*
* @author Pierre - dev@nettools.ovh
* @license MIT
*/
namespace Nettools\GoogleAPI\Services\Misc;
/**
* Abstract class for an object with strict access control to its properties (no write access for non-existant properties)
*/
abstract class MutableObject extends MiscObject
{
... | true |
8a96345bcb42020673fad42d9156b3e8dbe92a8e | PHP | yrkaus/cab | /cabinet/protected/components/views/languageSelector.php | WINDOWS-1251 | 1,544 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <div id="language-select">
<?php
if(sizeof($languages) < 4) { // -
//
foreach($languages as $key=>$lang) {
if($key != $currentLang) {
echo CHtml::link(
'<img src="/images/'.$key.'.gif" title="'.$lang.'" style="padding: 1px;" width=16 ... | true |
6aef4ffff954076a94410705e90875130054a797 | PHP | mjmconvento/lumen-api | /tests/CustomerFormatterTest.php | UTF-8 | 2,800 | 2.71875 | 3 | [] | no_license | <?php
use App\Models\Customer;
use App\Services\CustomerFormatterService;
class CustomerFormatterTest extends TestCase
{
/**
* @return void
*/
public function testFormatAllCustomerData(): void
{
$customer = new Customer();
$customer->setFirstName('MJ');
$customer->setLast... | true |
dfaa6f810574d2f657e96d7df73e5c6de7ab1a52 | PHP | ekrabismi/JS | /timer/1.html | UTF-8 | 776 | 2.890625 | 3 | [] | no_license | <label id="minutes">00</label>:<label id="seconds">00</label>
<script type="text/javascript">
var minutesLabel = document.getElementById("minutes");
var secondsLabel = document.getElementById("seconds");
var totalSeconds = 0;
setInterval(setTime, 1000);
function setTime()
... | true |
61cfd78bf01cd0e4b6af15805eca5dc4f6420127 | PHP | sakkeerhussain/common-contacts-android | /Contacts_server_in_php/update_contact.php | UTF-8 | 936 | 2.515625 | 3 | [] | no_license | <?php
include('database.php');
//connecting to database
$dbhandle = mysql_connect(hostname, username, password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db(db_name,$dbhandle)
or die("Could not select examples");
//reading values
$id = $_POST['id'];
$name = $_POST['name'];
$phone_no = $_PO... | true |
a582689f96c48c6172ecc4f6f5282e948b1bf7c4 | PHP | hjerichen/collections | /tests/Unit/Reflection/ReflectionMethodCollectionTest.php | UTF-8 | 4,992 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/** @noinspection PhpPossiblePolymorphicInvocationInspection */
declare(strict_types=1);
namespace HJerichen\Collections\Test\Unit\Reflection;
use HJerichen\Collections\Collection;
use HJerichen\Collections\Reflection\ReflectionMethodCollection;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
use Reflectio... | true |
ce06af688a55c60245457645f1c420fcd5347712 | PHP | var-dumper/apocalypse | /todo2.php | UTF-8 | 2,666 | 2.765625 | 3 | [] | no_license | <?php header("Content-type: text/html; charset=utf-8");
// 通信ヘッダは,文字を書き出す前に実行しなければならない
$prio=0;
if(isset($_POST['priority'])){
// post値は文字列型なので数値型に変更している,カラなら0になる
$prio=(int)$_POST['priority'];
}
require_once('connect.php');
require_once('mojifilter.php');
$dbh=dbconnect();
if(!... | true |
6ad19b9a4435d3b8d9aca1deee009081e4f47e6f | PHP | LucasMatosDS/PHP | /email version.1.0/valida_cadastro.php | UTF-8 | 646 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
include "connect.php";
//validacao deo cadastro no banco de dados.
//estou pegando o valor que vem pela URL
$valor = $_GET['v'];
if($valor == ""){
echo "<script>window.location.href='cadastro.php';</script>";
}else{
//pegar o codigo
$sql = mysqli_query($link,"select * from tb_cadastro where valida = '$... | true |
e820d7831fadc70637b60b424b2d42c64294805f | PHP | exrica/HellaEvents | /public_html/includes/sqlstatements.inc.php | UTF-8 | 19,688 | 2.765625 | 3 | [] | no_license | <?php
//new members
function addMember($username, $password, $email) {
global $dbc;
$query = "INSERT INTO `users`(`username`, `password`, `email`, `registerdate`, `userrank`) "
. "VALUES (?, ?, ?, NOW(), 1000)";
$stmt = mysqli_prepare($dbc, $query);
mysqli_stmt_bind_param($s... | true |
2ef1a9762c8744e985bf6df11251652ff472b44e | PHP | alexdeitos/cursoPhpUdemy | /operadores/exemplo-02.php | UTF-8 | 492 | 3.71875 | 4 | [] | no_license | <?php
// Mais operadores de atribuição
$valor = 0 ;
echo $valor . "<br>";
//Soma o valor 100 ao valor da variavel que até o momento é zero
$valor += 100 ;
echo $valor . "<br>";
//Soma mais 25 ao valor da variavel que no momento já é 100
$valor += 25;
echo $valor . "<br>";
//Diminui o valor de 25 da variável que... | true |
54ec95fa32b7649c86866f75f3e62c9f02fb0146 | PHP | CiprianOpreaPrestimedia/bumble | /Fields/ImageField.php | UTF-8 | 1,206 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace Monarkee\Bumble\Fields;
use Monarkee\Bumble\Fields\Field;
use Monarkee\Bumble\Interfaces\FileFieldInterface;
use Intervention\Image\ImageManager;
class ImageField extends FileField implements FileFieldInterface
{
/**
* The default public path to the image
*/
const DEFAULT_PUBLIC_PATH... | true |
a4ea004da260a7ebf7c263480386ba6a4a389495 | PHP | Umamaheswari18/Leventis | /client/src/js/components/contactform.php | UTF-8 | 2,392 | 2.625 | 3 | [] | no_license | <?php
include("includes/db.php");
if($_SERVER["REQUEST_METHOD"] == "POST"){
$sitename="Leventis Hotel";
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$feedback=$_POST['feedback'];
$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/';
if(!empty($_POST['nam... | true |
263cced61d5c2b95228ff7493eda77cb091d300c | PHP | borossandor27/AjaxosForm | /index.php | UTF-8 | 4,227 | 2.515625 | 3 | [] | no_license | <?php
require_once './dbConnect.php';
?>
<!DOCTYPE html>
<!--
Mi az AJAX?
AJAX = Asynchronous JavaScript And XML.
Az AJAX nem programozási nyelv.
Az AJAX csak a következők kombinációját használja:
- Böngészőbe épített XMLHttpRequest objektum (adatok kéréséhez egy webszervertől)
- JavaScript és HTML DOM (az adatok meg... | true |
9573fce68b8e22159800fbb4c63cc15dd947aa22 | PHP | lamine87/Exercices- | /strings.php | UTF-8 | 1,030 | 2.984375 | 3 | [] | no_license | <?php
require 'nombres.php';
$prenom = strlen("marie");
$nom = "de ubeda";
// Concaténation
//echo $prenom." ".$nom;
//echo "$prenom $nom";
//echo '$prenom $nom';
//echo "<h1>Bonjour $prenom</h1>";
$total = somme(10,4);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
... | true |
ea3e64d6fce40cd12f0dd51b22767f9a04030074 | PHP | s4r14k/framework | /lib/framework/gestion/manager.php | UTF-8 | 14,931 | 2.546875 | 3 | [] | no_license | <?php
namespace framework\gestion;
class Manager extends \framework\gestion\update {
static function get_number_max ($my_db) {
$id = $my_db->query('SELECT id As n_max FROM package ORDER BY id desc limit 1');
$values = $id->fetch();
return (int) $values['n_max'];
}
static function description ($courte, $lon... | true |
efe07cc6c0c8ad35f8f2749530b0e32566dd4c55 | PHP | webignition/web-resource | /tests/Sitemap/GetUrlsFromChildrenTest.php | UTF-8 | 1,461 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace webignition\Tests\WebResource\Sitemap;
use webignition\InternetMediaType\Parser\ParseException as InternetMediaTypeParseException;
use webignition\Tests\WebResource\Factory\SitemapHelper;
use webignition\Tests\WebResource\Factory\UriFactory;
class GetUrlsFromChildrenTest extends \PHPUnit_Framework_Te... | true |
d3399e76624eb2b31d2ea803eaa9933f83e03d9f | PHP | aleksvin8888/autoprice | /modules/php/basket/add_too_basket.php | UTF-8 | 2,705 | 2.84375 | 3 | [] | no_license | <?php
// подключим базу даных
include $_SERVER['DOCUMENT_ROOT'] . '/configs/db.php';
if (isset($_POST['id_prod']) and $_SERVER["REQUEST_METHOD"]=="POST" ) {
// запрос в базу для получения выбраного продукта
$sql_prod = "SELECT * FROM product WHERE id=" . $_POST['id_prod'];
$res_prod = $conn->query($sql_pro... | true |
220359f716de3e245b2a0936b5ce86dac5a5e117 | PHP | eonx-com/easy-monorepo | /packages/EasyTemplatingBlock/src/Blocks/TextBlock.php | UTF-8 | 628 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace EonX\EasyTemplatingBlock\Blocks;
use EonX\EasyTemplatingBlock\Interfaces\TextBlockInterface;
final class TextBlock extends AbstractTemplatingBlock implements TextBlockInterface
{
private string $contents;
public static function create(string $name, string $contents):... | true |
4bb90eb39f41ff1949498a78ae6480cf9e6ec366 | PHP | mlk9/hive | /hive/globals.php | UTF-8 | 1,236 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
//just moment
use Hive\Language\Language;
use Hive\View;
function abort($code=403, $detail='')
{
echo View::render('@hive/error.html', ['errorCode'=>$code,'errorDetail'=>$detail]);
return null;
}
function env($key)
{
return $_ENV[$key];
}
function session($key)
{
return $_SESSION[$key];
}
fu... | true |
cf95a5aea2187dd5ba6805b4dd590a58aeb1da62 | PHP | nikola796/myfw | /core/bootstrap.php | UTF-8 | 1,571 | 2.53125 | 3 | [] | no_license | <?php
use App\Core\App;
App::bind('config', require 'config.php');
require_once 'core/session.php';
$conf = App::get('config');
App::bind('database', new QueryBuilder(
Connection::make($conf['database'])
));
function view($name, $data = array())
{
extract($data);
return require 'app/views/'.$name.'.v... | true |
7f0b4129bbcbce8526d20bbb99323ec027c406c5 | PHP | pawarkiran95/animals | /submission.php | UTF-8 | 7,113 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>Submit Animal Info</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
<body>
<?php
// define variables and set to empty values
$nameError = $categoryError = $pictureEr... | true |
0b3291026a10acb62ba0618fb2b5f5e9725c102e | PHP | webmasterproxy-media/OctaPHP | /application/core/Sessions.php | UTF-8 | 1,093 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
class Sessions{
public function __construct($session){
if($session){
session_start();
}
}
public function start($data,$val=null){
if($data){
if(is_array($data)){
foreach($data as $key=>$row){
$_SESSION[$key] = $row;... | true |
77644e26ace7cb1af942d5e18179af993b87859c | PHP | baskuis/werock | /public/modules/User/procedures/UserEntitlementProcedure.class.php | UTF-8 | 1,758 | 2.703125 | 3 | [] | no_license | <?php
/**
* User entitlement procedure
*
* PHP version 5
*
* @package Ukora
* @author Bas Kuis <b@ukora.com>
* @copyright 2012 Bas Kuis (http://www.ukora.com)
* @license http://creativecommons.org/licenses/by-nc/3.0/ Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)
* @link http://www.ukora.com/cms/docume... | true |
90319606c60aa1340d50c5c7412c84508ada8efe | PHP | lucasmoraes804/ead-plataforma | /service/model/model-service.php | UTF-8 | 2,993 | 2.734375 | 3 | [] | no_license | <?php
class Model_Service extends Connect
{
public function get_services()
{
$query = "SELECT service_id, service_name, service_description, DATE_FORMAT( register_date, '%d/%m/%Y %h:%i' ) register_date ".
"FROM {$this->prefix}services ORDER BY register_date DESC ";
try{
... | true |
970e6f01a211a6cb00090348802e21fcbbda47e5 | PHP | CatLabInteractive/catlab-ancient-cms | /php/Pages/Admin.php | UTF-8 | 1,842 | 2.6875 | 3 | [] | no_license | <?php
/*
Neuron CMS
Author: Thijs Van der Schaeghe
Copyright: Neuron Interactive
*/
class Pages_Admin extends Modules_Module
{
/*
Returns a multiple dimension array
with all (printable) navigation items.
*/
public function getNavigation ($showAll = false)
{
$text = Core_Text::__getInstance ();
$o = ar... | true |
2fa85a7ded68a8af4f138ee9152c3a6918180687 | PHP | maletskyi/films | /app/Core/Validation/Rules/MaxValueRule.php | UTF-8 | 380 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Core\Validation\Rules;
class MaxValueRule extends AbstractRule
{
private $maxValue;
public function __construct($minValue, $value, $errorMessage)
{
parent::__construct($value, $errorMessage);
$this->maxValue = $minValue;
}
public function checkRule(): bool
... | true |
193781e24d8bc9bce790b5d09019f4aff005bad5 | PHP | ricardosmartins/gerenciadordetarefas | /index.php | UTF-8 | 2,321 | 2.6875 | 3 | [] | no_license | <?php
function __autoload($class_name){
require_once 'classes/' . $class_name . '.php';
}
?>
<!DOCTYPE HTML>
<html land="pt-BR">
<head>
<meta charset="UTF-8">
<title>Gerenciador de Tarefas</title>
<link rel="stylesheet" href="css/bootstrap.css" />
</head>
<body>
<div class="container">
<header class="m... | true |
72faddeaa7c3a3a987151b3b5b2a3a3a8e04c9cf | PHP | montero9/web_adminstracion_ayuntamiento_PHP | /administracion/anadir_noticia/subir_imagen.inc | ISO-8859-1 | 1,236 | 2.78125 | 3 | [] | no_license | <?php
//Datos del arhivo
//Nombre del archivo
$nombre_archivo = $_FILES['imagen']['name'];
//Tipo de archivo
$tipo_archivo = $_FILES['imagen']['type'];
//Tamao del archivo
$tamano_archivo = $_FILES['imagen']['size'];
//Carpeta donde se va a guardar
$path="../../contenido/imagenes/noticias/".$nom... | true |
4729466cce76b658a47a136faea1faa8fd43d5ca | PHP | jesus143/able_plastics | /debug/string.php | UTF-8 | 858 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: JESUS
* Date: 6/27/2016
* Time: 5:05 PM
*/
echo "state = " . stateRename('');
function stateRename($state) {
$state = str_replace('_', ' ', $state);
$state = strtolower($state);
switch ($state) {
case 'new south wales':
$state = 'NSW';
... | true |
b595b60f5c8d7eb259715a890822971351f4afc5 | PHP | btcpayserver/btcpayserver-php-client | /src/BTCPayServer/UserInterface.php | UTF-8 | 1,010 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @license Copyright 2019 BTCPayServer, MIT License
* see https://github.com/btcpayserver/btcpayserver-php-client/blob/master/LICENSE
*/
namespace BTCPayServer;
/**
*
* @package BTCPayServer
*/
interface UserInterface
{
/**
* @return string
*/
public function getPhone();
/**
... | true |
bb1786b6d655d896dbd492b9b2732fead60d1315 | PHP | oxnp/CRM-OXNP | /app/Http/Models/projects/CategoriesToProject.php | UTF-8 | 2,002 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Models\projects;
use App\Http\Models\projects\ProjectsCategories;
use Illuminate\Database\Eloquent\Model;
class CategoriesToProject extends Model
{
public $table ='categories_to_project';
public $timestamps = false;
protected $fillable = ['project_id','category_id'];
/* Add... | true |
53f399ec3641141ab50e63f30fcbb49bda5eeeb3 | PHP | karlredman/FCMS | /dev/version1.1/lib/buttons_show.inc | UTF-8 | 4,251 | 2.6875 | 3 | [] | no_license | <?
/* buttons_show.inc
*/
function back_button($message)
{
if($message->referp_id ||
strstr($message->action,"edit") )
{
//default button type
$btn_type = "back";
if($message->action == "edit" &&
$message->security_level <= 3)
{
$page_id = $message->page_id;
$referp_id = $messag... | true |
4a57a60ed6acbf2274e53ea1d75a23931bd67c8c | PHP | crhayes/Bare | /libraries/database/database.php | UTF-8 | 8,342 | 3.234375 | 3 | [] | no_license | <?php
/**
* Database Utility. Provides a wrapper around PHP's PDO extension to
* simplify database querying.
*
* Classes
* -------
* Database
* DatabaseQuery
*
* @author Chris Hayes <chayes@okd.com, chris@chrishayes.ca>
* @link http://okd.com, http://chrishayes.ca
* @copyright (c) 2012 OKD, C... | true |
6b5b8e9f08298de272b82dfd166c15c2ddcf3310 | PHP | EbarriosCode/Proyecto-BD | /ProyectoBD/model/fechas_modelo.php | UTF-8 | 454 | 2.96875 | 3 | [] | no_license | <?php
class fechas{
private $db, $conn;
public function __construct()
{
require_once('Conexion.php');
$this->db = new Conexion();
$this->conn = $this->db->Conectar();
}
public function insertarFecha($fecha,$hora)
{
$sql = "INSERT INTO FECHAS(FECHA,HORA) VALUES(?,?)";
$stmt = $this->con... | true |
a837c524d757d58bd59bb345c681b1e9b5837696 | PHP | elenakononskaya/wl-sdk | /WellnessLiving/Core/Passport/Login/Enter/EnterModel.php | UTF-8 | 1,393 | 2.65625 | 3 | [] | no_license | <?php
namespace WellnessLiving\Core\Passport\Login\Enter;
use WellnessLiving\WlModelAbstract;
/**
* Signs user in.
*/
class EnterModel extends WlModelAbstract
{
/**
* Captcha (if needed).
*
* <tt>null</tt> if not needed.
*
* @post post
* @var string|null
*/
public $s_cap... | true |
fbaecfdb4ca8df7e955204d1e2ed74222dd8d110 | PHP | ViktorSjoblom/picture-this | /app/functions.php | UTF-8 | 5,829 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
if (!function_exists('redirect')) {
/**
* Redirect the user to given path.
*
* @param string $path
*
* @return void
*/
function redirect(string $path)
{
header("Location: ${path}");
exit;
}
}
/**
* Get data from database us... | true |
b801ca39302d7f7eebee078916b272079831cd96 | PHP | Jorique/bitrix-validators | /classes/general/date_validator.php | UTF-8 | 854 | 2.765625 | 3 | [] | no_license | <?php
namespace Jorique\Validators;
class DateValidator extends Validator {
public $message = 'Некорректная дата';
public $format;
public function validate() {
$attrVal = $this->_model->getAttribute($this->_attr);
$counter = 0;
if(is_array($attrVal)) {
foreach($attrVal as $attr) {
if(!$this->checkDate... | true |
ba046a588729c6a9373b7ab8e56ac2686fe51d25 | PHP | cultuurnet/media-download-manager | /src/Fetcher/Fetcher.php | UTF-8 | 1,237 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace CultuurNet\MediaDownloadManager\Fetcher;
use Guzzle\Http\Client;
use Monolog\Logger;
class Fetcher implements FetcherInterface
{
/**
* @var
*/
private $apiKey;
/**
* @var Logger
*/
private $logger;
/**
* Fetcher constructor.
* @param $apiKey
* ... | true |
61d971f20100e3204e18de95c35fdf4a41479606 | PHP | josephecmu/whois | /code/class/cmu/html/form/products/AbstractControls.php | UTF-8 | 5,200 | 2.78125 | 3 | [] | no_license | <?php
namespace cmu\html\form\products;
abstract class AbstractControls extends AbstractFormComponent
{ //This class is is used for all form controls (user actionable)
/*
* Properties//////////////////////
*
*/
static $validateswitch = null;
protected $onchange; //dynamic
... | true |
227170310f04909e8c3da98b09edfdd7ffcef188 | PHP | openbizx/openbizx | /src/Object/ObjectFactoryHelper.php | UTF-8 | 4,333 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Openbizx\Object;
use Openbizx\Openbizx;
use Openbizx\Helpers\XMLParser;
/**
* Helper class for ObjectFactory
*
* @author agus
*/
class ObjectFactoryHelper
{
private static $_xmlFileList = [];
private static $_xmlArrayList = [];
/**
* Get Xml file with path
*
* Sea... | true |
1536b77c8ce8bfeeaac770342d211eecbbfd3c6b | PHP | adrozdek/psw-php3 | /db_down.php | UTF-8 | 247 | 2.546875 | 3 | [] | no_license | <?php
require_once 'db_connect.php';
$sql = 'DROP DATABASE IF EXISTS my_psw;';
if (mysqli_query($conn, $sql)) {
echo "Database dropped successfully";
} else {
echo "Error dropping database: " . mysqli_error($conn);
}
mysqli_close($conn); | true |
cc587d752d4f68a98e59a1c8f2b28eae08eed5a0 | PHP | HugoChea/projetweb_licence | /php/fiche_episode.php | UTF-8 | 2,976 | 2.6875 | 3 | [] | no_license | <?php
require("Episode.php");
require("Utilisateur.php");
$a=new Utilisateur();
session_start();
if(isset($_GET['id']) AND is_numeric($_GET['id']))
{
$c=new Episode();
if(!isset($_SESSION['login'])){
$_SESSION['login']="";
}
if(isset($_POST['noter'])){
$c->noter($_GET['id']);
}
?>
<!DOCTYPE html>
... | true |
f0019521aa9845c3a0757f4fb032f008763c3201 | PHP | liaoshengping/DesignPattern | /Coupon/index.php | UTF-8 | 3,685 | 2.9375 | 3 | [] | no_license | <?php
interface calculateInterface
{
public function calculate();
}
/**
* 满减
* Class FullReduction
*/
class FullReduction implements calculateInterface
{
public function calculate()
{
return '满减';
}
}
class Discount implements calculateInterface
{
public function calculate()
{
... | true |
5264f514746f97e982b0ec1e2fb77506d5e398c7 | PHP | felipexlr50/AedesMapWebservice | /salvarImagem.php | UTF-8 | 1,794 | 2.515625 | 3 | [] | no_license | <?php
include "APIKEY_VERIFY.php";
include "msqliConnection.php";
function file_force_contents($dir, $contents){
$parts = explode('/', $dir);
$file = array_pop($parts);
$dir = '';
foreach($parts as $part)
if(!is_dir($dir .= "/$part")) mkdir($dir);
file_put_contents("... | true |
1141deb1e229b0aafb897a17c9049827188503c8 | PHP | msheep/admin-Yii | /protected/models/Users.php | UTF-8 | 569 | 2.703125 | 3 | [] | no_license | <?php
class Users extends BaseModel {
public function tableName() {
return '{{users}}';
}
public function loadInit($params = array()) {
}
public function relations(){
return array(
);
}
/**
* Checks if the given password is corre... | true |
71338cf43e8102478ef5e3f9284d0972425d5c00 | PHP | githubXiaosong/danger | /app/Http/Controllers/Admin/ApiController.php | UTF-8 | 2,533 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Video;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ApiController extends Controller
{
/**
* 视频删除
*/
public function videoDelete()
{
$validator = Validator::make(
... | true |
f67e7aad394f6e0ddf07b445c73324f60fa5f00d | PHP | hueltonsantos/SistemaInventarioETEOT | /controller/senha.php | UTF-8 | 1,070 | 2.625 | 3 | [] | no_license | <?php
//Chamando arquivo que tem as funções de validar, consulta, editar, inserir
include_once '../model/usuario.php';
$id_usuario = $_SESSION['id_usuario'];
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$validacao = validarSenha($_POST);
if (count($validacao['erros']) == 0) {
$gravou = atualizarSenha($validacao... | true |
785068f27382a7bd361e25370f71c462f40bcacb | PHP | andramirez/CST336Work | /Assignments/Assignment5/getScore.php | UTF-8 | 2,543 | 2.59375 | 3 | [] | no_license | <?php
session_start();
include 'db_connect.php';
$connection = getDatabaseConnection();
function getScore(){
$hopefully = "SELECT MAX(QuizNum) FROM QuizResults";
$hopes = getDataBySQL($hopefully, $dbConn);
$data = json_decode(stripslashes($_GET['Q41']));
foreach($data as $ans)
{
$q4 .= $... | true |
43e8fb8f4ead5be190f2b84ba85d2a77aab9863d | PHP | Jalle19/yii-yui-clientscript | /src/yiiyuiclientscript/interfaces/PathResolver.php | UTF-8 | 554 | 2.796875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
namespace yiiyuiclientscript\interfaces;
/**
* Path resolver interface
*
* @author Sam Stenvall <sam@supportersplace.com>
* @author Peter Buri <peter.buri@netpositive.hu>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
interface PathResolver
{
/**
* Based on the specifi... | true |
60872f377c07206c7d613b23a8eb5f09b1153aea | PHP | valorin/valversion | /src/ValVersion/Controller/VersionController.php | UTF-8 | 3,949 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | <?php
/**
* ValVersion - ZF2 Version Module
* A simple database versioning system for ZF2 applications.
*
* Copyright (c) 2012, Stephen Rees-Carter <http://stephen.rees-carter.net/>
* New BSD Licence, see LICENCE.txt
*/
namespace ValVersion\Controller;
use ValVersion\Manager\DbAdapter as DbAdapterManager;
use V... | true |
8455e348817b0cbeb822dc5ae90a3bc5f9f41c4d | PHP | EnixCoda/ECNUxhw | /reserve.php | UTF-8 | 2,801 | 2.6875 | 3 | [] | no_license | <?php
// extract request form
$postdata = file_get_contents('php://input');
$request = json_decode($postdata);
$stuID = $request->stuID;
$stuPsw = $request->stuPsw;
$room = $request->room;
$date = $request->date;
$beginTime = $request->beginTime;
$endTime = $request->endTime;
$followers = isset($req... | true |
5fd7260c70d2d45f3e2c22104ecab71898e7a46d | PHP | Flavio-Cherchi/nikarsa | /class/Neutral.php | UTF-8 | 3,589 | 2.953125 | 3 | [] | no_license | <?php
include "./class/Fight.php";
session_start();
class Neutral {
public function __construct() {
}
public static function journeys($ID_community) {
$conn = connessione::start();
$sql = " SELECT * FROM communities WHERE ID = $ID_community ";
$ris = $con... | true |
3dd67fbb84b33e89507deb85b6ac8422ebfed059 | PHP | medinamarquezp/categories-products-rest-api | /app/src/Controller/Api/ProductController.php | UTF-8 | 2,189 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller\Api;
use App\Entity\Product;
use App\Exceptions\BaseException;
use App\Exceptions\NotFoundException;
use App\Exceptions\ValidationException;
use App\Exceptions\InvalidCurrencyException;
use App\Repository\ProductRepository;
use App\Service\ProductCurrencyService;
use App\Service\Validat... | true |
8bcb65cb5df45796f5d79ae5ed55be59b519fc1a | PHP | dbilovd/rpn-calc | /src/Strategies/SubtractionStrategy.php | UTF-8 | 346 | 3.15625 | 3 | [] | no_license | <?php
namespace RPN\Strategies;
use RPN\Interfaces\StrategyInterface;
class SubtractionStrategy implements Strategy
{
/**
* Perform Operation
*
* @param Integer $firstValue
* @param Integer $secondValue
* @return Integer
*/
public function performOperation ($firstValue, $secondValue)
{
return $first... | true |
3e39b81e4b53e8e416ddfa66c3d42c4905001feb | PHP | duncan3dc/console | /src/Duration.php | UTF-8 | 977 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | <?php
namespace duncan3dc\Console;
class Duration
{
/**
* @var array<string, int> The segments to break the duration up into
*/
private $times = [
"hours" => 3600,
"minutes" => 60,
"seconds" => 1,
];
/**
* @var float The duration this instance represe... | true |
b80dad8844d4e523e38c4563ac7ebc808c2c46ba | PHP | CodingWorker/enhancingProgram | /PHP/codes/bumingzhishidian_codes/clone1.php | UTF-8 | 296 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: DaiYan
* Date: 2017/6/19
* Time: 14:46
*/
class Inner{
public $i;
}
class Test{
public $a;
public $obj;
}
$t=new Test();
$t->a=12;
$t->obj=new Inner();
$t->obj->i=12;
$t2=clone($t);//这是一个浅复制
$t->obj->i='a';
var_dump($t2); | true |
11e861f010f09876a414a113631584f51d4c541f | PHP | jamesoncarrwalker/depend-encyinject-OnMe | /private/model/authenticators/AuthenticatorApi.php | UTF-8 | 683 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jamesskywalker
* Date: 23/07/2019
* Time: 21:49
*/
namespace model\authenticators;
use interfaces\AuthenticatorInterface;
class AuthenticatorApi implements AuthenticatorInterface{
public function setAuthenticationParams() {
// TODO: Implement setAuthentica... | true |
b1ee8adee283da7039cd9b66bf5d5013bad30938 | PHP | niknikhil32/Eyecare | /orderpkg.php | UTF-8 | 1,798 | 2.8125 | 3 | [] | no_license | <?php
include('connect.php');
?>
<!DOCTYPE html>
<html>
<head>
<style>
table
{
width: 50%;
border-collapse: collapse;
}
table, td, th
{
border: 1px solid black;
padding: 5px;
}
th {text-a... | true |
928e69d9e132d3b5a5168543924f6ec4170f1a9c | PHP | edubz99/the_vera | /integrations/facetwp/class-facetwp.php | UTF-8 | 1,339 | 2.640625 | 3 | [] | no_license | <?php
class Capstone_FacetWP extends Capstone_Integration {
public function __construct() {
// include sub-classes
$this->includes = array(
'class-facetwp-template.php',
'class-facetwp-submit.php',
);
parent::__construct( dirname( __FILE__ ) );
}
public function init() {
$this->template = new Cap... | true |
3a391ade2b458cc803a0332c5b9c5eef16557b92 | PHP | zelding/Yapper | /app/Http/Requests/UpdateUser.php | UTF-8 | 743 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class UpdateUser extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
// this ... | true |
61e62cad839a0beb4ccd5f63365d3e905a18fc38 | PHP | itwedoit/gulf | /protected/models/MSearch2.php | UTF-8 | 4,402 | 2.546875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "Projectnew".
*
* The followings are the available columns in table 'Projectnew':
* @property integer $id
* @property string $Grant
* @property string $Consortia
* @property string $Task
* @property string $ProjectTitle
* @property string $SubAwards
* @property s... | true |
7a9018d9780442aec8c0007188aa880e224d7706 | PHP | isaiasdr/Unearte | /Model/clases_usuario.php | UTF-8 | 2,353 | 3.296875 | 3 | [] | no_license | <?php
include_once("ManejadorBD.php"); //clase para el manejo de la conexion a la base de datos
class clases_usuario extends ManejadorBD {
private $idClase;
private $Tipo_Usuario;
private $db;
public function __construct($conexion) {
$this->db = parent::conectar($conexion); //ejecuta el me... | true |
de42004fa3ba681384d477f4ea2376b7db36c4ec | PHP | dwijpr/share | /database/seeds/UsersTableSeeder.php | UTF-8 | 1,285 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use ShareApp\User;
use ShareApp\Role;
use ShareApp\Permission;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
User::create([
'name' => 'Dwi Prabowo',
... | true |
a2b2c70b4dbd8a3fe3ddad623976a705ddd7ce66 | PHP | yulicaa/vscode-git | /Update dan Search/functions.php | UTF-8 | 2,659 | 3.265625 | 3 | [] | no_license | <?php
//membuat koneksi
$conn=mysqli_connect("localhost", "root", "", "phpdatabase");
// cek koneksi jika error
// menggunakan method get untuk mengambil id yang telah terseleksi oleh user dan dimasukkan
// ke dalam variabel baru yaitu $id
// $id=$_GET["id"]=1;
// var_dump("$id");
// query berdasarkan id
// $mhs = qu... | true |
059647ac9085a466c8a376f0bdd1ec836d8562fc | PHP | wiz-comunicaciones/oc-blog-plugin | /classes/AssetAnchorFm.php | UTF-8 | 1,121 | 2.578125 | 3 | [] | no_license | <?php namespace Wiz\Blog\Classes;
use Wiz\Blog\Models\Setting;
class AssetAnchorFm extends Asset {
public static function extractIdFromUrl($url)
{
return $url;
}
public static function embedCode($id)
{
return $id;
}
public static function get($url, $htmlAttrs = [])
{... | true |
78b2c59b18b840390abb85f269b867a4a6999a6b | PHP | kritjenwit/Music-Streaming-Website-New-version | /php/admin-panel/opt/add-album.php | UTF-8 | 1,203 | 2.53125 | 3 | [] | no_license | <?php
$conn = new mysqli("localhost","root","","project");
if(isset($_POST['album_upload'])){
// TEXT
$album_name = $conn->real_escape_string($_POST['album_name']);
$artist = $conn->real_escape_string($_POST['album_artist']);
$music_name=$conn->real_escape_string($_PO... | true |
4f885c6e5b3eabbf43a090bab083a7a0bbf7c2a0 | PHP | bogiesoft/FiligansHotelReservation | /app/models/Booking.php | UTF-8 | 2,465 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Booking extends \Eloquent {
protected $fillable = [];
protected $appends = ['datecreated','checkindate','checkoutdate', 'nights','change', 'total_deduction', 'total_additional'];
public function remarksHistory()
{
return $this->hasMany('BookingRemarksHistory','booking_id','id');
}
public function... | true |
ade5b153721aaac8a406e114724f30d6cc2307c7 | PHP | Galibri/school-management-system-php | /teacher-dashboard/update_result_subject_selector.php | UTF-8 | 1,035 | 2.71875 | 3 | [] | no_license | <?php
require_once '../functions.php';
if(isset($_POST['global_name_id']) && isset($_POST['teacher_email'])) {
$global_name_id = $_POST['global_name_id'];
$teacher_email = $_POST['teacher_email'];
$query = "SELECT DISTINCT subject_id FROM results WHERE teacher_email='$teacher_email' AND global_name_id='$global_nam... | true |
6cfe82bbd9ab0f9830038fd4846ec0c49343adac | PHP | macopedia/magento2-allegro | /Model/Api/Auth/Data/Token.php | UTF-8 | 1,672 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Macopedia\Allegro\Model\Api\Auth\Data;
use Macopedia\Allegro\Api\Data\TokenInterface;
use Magento\Framework\DataObject;
/**
* Token data class
*/
class Token extends DataObject implements TokenInterface
{
const ACCESS_TOKEN_FIELD_NAME = 'access_token';
const REFRESH_TOKEN_FIELD_NAME = 'refr... | true |
87980c8dc954d804f8d762d12d6935f5500b650a | PHP | yugeta/framework | /system/common/php/file.php | UTF-8 | 4,163 | 3.296875 | 3 | [] | no_license | <?
/**
* ファイル操作
**/
class FILE{
//読み込み(行毎の配列で返す)
function read($path){
if (file_exists($path)){
$fl = file_get_contents($path);
$fl = ereg_replace("\r\n","\n",$fl); //-- 置換
$fl = ereg_replace("\r","",$fl); //-- 置換
$fl2 = explode("\n",$fl);
... | true |
a5c5d5c17cdf302349c6b7e23a13eb3290a7154e | PHP | jishnunand/PHP-Email | /email.php | UTF-8 | 702 | 2.6875 | 3 | [] | no_license | <?php
require 'PHPMailerAutoload.php';
function email_send($to, $subject, $body)
{
$mail = new PHPMailer;
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 2;
$mail->Host = 'smtp.mail.gmail.com';
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
$mail->SMTPAuth = true;
$mail->Username = ""; // GMAIL username
$mai... | true |
d69f7fe473316851afbc2441ea709c6903165100 | PHP | TheFundamentalShape/thechocolatemilkmile.org | /app/Console/Commands/SendConfirmationEmails.php | UTF-8 | 2,385 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Mail\RegistrationDetails;
use Illuminate\Console\Command;
use App\Models\Event;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\Mail;
class SendConfirmationEmails extends Command
{
/**
* The name and signature of the conso... | true |
0efbd3add7db522a568ec6052128306b49bfe398 | PHP | johandas/site_cv_V2 | /admin/titre_cv.php | UTF-8 | 5,752 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require('inc/inc.header.php');
if(!$_SESSION['connexion']) {
header('location:../index_.php');
exit();
}
// Gestion des contenus de la Base de données
$sql = $pdo->prepare("SELECT * FROM t_titre_cv");
$sql -> execute();
$nbr_titre_cv = $sql->rowCount();
// Insertion d'une formation
... | true |
aac70ca10b8e441664683d9dfdc42d62d3270f1c | PHP | silvadesign/php-mvc-structure | /App/Core/Model.php | UTF-8 | 678 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Core;
use PDO;
use PDOException;
use Exception;
class Model
{
private $host;
private $name;
private $username;
private $passwd;
private $driver;
private $pdo;
private $err;
public function __construct()
{
$this->host = $_ENV['DB_HOST'];
$this->name = $_ENV['DB_NAME'];
$this->usern... | true |
8d5def53ba502e1a9b122a600c8429c62448cdad | PHP | uPaid/sms-verification | /src/Managers/UnlimitedResendManager.php | UTF-8 | 1,081 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Upaid\SmsVerification\Managers;
use Upaid\SmsVerification\Contracts\SmsManagerInterface;
class UnlimitedResendManager extends BaseManager implements SmsManagerInterface
{
public function sendSmsAgain(string $action, string $phone, array $messageTranslationPlaceholders = []): string
{
... | true |
f8f0d36dcfac14d5fe338ac886e40929c3ca60ac | PHP | ramziammar/websites | /belmarkhomes.com/sapphire/core/model/fieldtypes/Boolean.php | UTF-8 | 860 | 3.015625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @package sapphire
* @subpackage model
*/
/**
* Represents a boolean field.
* @package sapphire
* @subpackage model
*/
class Boolean extends DBField {
function __construct($name, $defaultVal = 0) {
$this->defaultVal = ($defaultVal) ? 1 : 0;
parent::__construct($name);
}
function requir... | true |
587deb2e8a535a8baa840d52f72c139c0f157d51 | PHP | DonnovanSegura/Stock_V3 | /pdf/plantilla.php | UTF-8 | 12,481 | 2.53125 | 3 | [] | no_license | <?php
require 'fpdf/fpdf.php';
/**
* Clase Para los Catálogo de Clientes
*/
class PDF extends FPDF{
function Header(){
$this->Image('images/stars.png', 5, 5, 30);
$this->SetFont('Arial','B',15);
$this->Cell(30);
$this->Cell(120,10,utf8_decode( 'Catálogo De Clientes'),0,0,'C');
$this->SetFon... | true |
0c57645876d11b9293bba21e2b4c11cb723eac81 | PHP | nassafou/comm-app | /module/Users/src/Users/Model/Upload.php | UTF-8 | 1,108 | 2.921875 | 3 | [] | no_license | <?php
namespace Upload\Model;
class Upload
{
#Attributs
public $id; //identifiant du fichier
public $filename; // nom du fichier
public $label; //étiquette du fichier
public $user_id; // identifiant de l'utilisateur
#Constantes
... | true |
327155be0e4526de2087995308241d65a864b0a2 | PHP | janmarek/Neuron | /Component/Upload/UploadControl.php | UTF-8 | 1,092 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Neuron;
/**
* Upload control
*/
class UploadControl extends BaseControl
{
private $handler;
private $redirectUri;
public function setHandler($handler)
{
$this->handler = $handler;
}
public function setRedirectUri($redirectUri)
{
$this->redirectUri = $redirectUri;
}
public func... | true |
784acb4bbe0e5ea5644d1443550a2cd75d8b58f6 | PHP | CMP-Studio/EmuObjectMover | /config.php | UTF-8 | 1,742 | 2.609375 | 3 | [] | no_license | <?php
/* Ensure we have a session running */
function is_session_started()
{
if ( php_sapi_name() !== 'cli' ) {
if ( version_compare(phpversion(), '5.4.0', '>=') ) {
return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;
} else {
return session_id() === '' ? FALSE : T... | true |
891c7002bf7c3a89852e3333ac15722c1ba91807 | PHP | cclp94/Damavand | /app/models/task.php | UTF-8 | 5,341 | 2.765625 | 3 | [] | no_license | <?php
require_once 'employee.php';
require_once 'purchase.php';
require_once 'assigned.php';
require_once 'permit.php';
class Task {
var $id, $name, $estTime, $estCost, $description, $startDate, $endDate, $projectId, $employees, $phase, $actualCost;
function Task($id, $name, $estTime, $estCost, $de... | true |
d29a1fe8e8f681db62c348c8d5c8c69eaf3923a0 | PHP | tmleeek/mish | /app/code/local/VES/AdvancedFaq/Model/System/Config/Source/Speed.php | UTF-8 | 560 | 2.515625 | 3 | [] | no_license | <?php
class OTTO_AdvancedFaq_Model_System_Config_Source_Speed
{
const CONFIG_SLOW = "slow";
const CONFIG_NORMAL = "normal";
const CONFIG_FAST = "fast";
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
{
return array(
array('value' => self::CONFIG_SLOW, 'labe... | true |
f3a801028e3f98fc9b4f565859da57e12310612b | PHP | abeldotam/md5implementation | /functions/md5.php | UTF-8 | 10,681 | 3.125 | 3 | [] | no_license | <?php
function implementMD5($string)
{
//Variable initialisation
$a = "67452301";
$b = "efcdab89";
$c = "98badcfe";
$d = "10325476";
$A = $a;
$B = $b;
$C = $c;
$D = $d;
//Conversion du message
$compteurMot;
$tailleMessage = strlen($string);
$tempNombreMots_1 = $tail... | true |
442e87ae325e21fdf68ef35e188b63120cef0cd0 | PHP | swwwww/wft-code | /framework/components/sys/Command.php | UTF-8 | 706 | 3.015625 | 3 | [] | no_license | <?php
/**
* 通用command父类
* @Description:
* @ClassName: Command
* @author Quenteen || qintao ; hi:qintao870314 ;
* @date 2014-11-19 下午11:01:20
*/
abstract class Command extends CConsoleCommand{
public function __construct($name, $runner){
parent::__construct($name, $runner);
}
//定义魔术方法 - 可利用单例模... | true |
4a0085b280a6c546975796d9e9c6f6c2551df69e | PHP | sergiorps/gotmoney | /library/Extra/RESTController.php | UTF-8 | 6,778 | 2.515625 | 3 | [] | no_license | <?php
/**
* REST Controller default actions
*
* @author Mauricio Lauffer
*/
abstract class Extra_RESTController extends Zend_Rest_Controller
{
const HTTP_METHOD_GET = 'GET';
const HTTP_METHOD_POST = 'POST';
const HTTP_METHOD_PUT = 'PUT';
const HTTP_METHOD_DELETE = 'DELETE';
protected ... | true |
89baa92f58b322437a5a4b2042803bd68bd464be | PHP | Edsardio/Examen | /application/models/Details_model.php | UTF-8 | 551 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Details_model extends CI_Model {
public function __construct(){
//Laad de database in voor de volledige class
//Database is aan te roepen als $this->db
$this->load->database();
}
//Haal alle gegevens van de in... | true |
bd1d97a1de4dbac8dcbf02e4078406f18a868261 | PHP | marcmanusch/PaulCheckGroup | /Subscriber/CompileLess.php | UTF-8 | 1,193 | 2.515625 | 3 | [] | no_license | <?php
namespace PaulCheckGroup\Subscriber;
use Enlight\Event\SubscriberInterface;
use Shopware\Components\Theme\LessDefinition;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Class CompileLess
* @package PaulSaleSuite\Subscriber
*/
class CompileLess implements SubscriberInterface
{
/** @... | true |
e711a2698442411d3d9a8e73b38206a175d1cf7d | PHP | zatchbell141/AllProject | /yashinfo/add.php | UTF-8 | 1,373 | 2.6875 | 3 | [] | no_license | <?php
$key=md5('india');
$salt=md5('india');
function encrypt($string,$key)
{
$string=rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_ECB)));
return $string;
}
function decrypt($string,$key)
{
$string=rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($string), ... | true |
d9204383cf2c0195266256f29f13c5cc024aa3a4 | PHP | Liriq/monitoring3 | /app/Entities/Template.php | UTF-8 | 1,363 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Template extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'color',
];
/... | true |
e051d6c11b26a4523c1360636416cbdb05749ea2 | PHP | wp-kitten/valpress-newspaper-feed-reader | /src/FeedImporter.php | UTF-8 | 15,792 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use App\Models\Feed;
use App\Helpers\Syndication\FeedReader;
use App\Models\MediaFile;
use App\Models\Post;
use App\Models\PostMeta;
use App\Models\PostStatus;
use App\Models\PostType;
use App\Models\Role;
use App\Models\Tag;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str... | true |