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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
66dc09c4683aefc2fd01d5b05db2bc586650b135 | PHP | prismicio/php-plain-starter | /public_html/index.php | UTF-8 | 1,117 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once '../resources/config.php';
include_once(__DIR__.'/../vendor/autoload.php');
use Prismic\Api;
try {
$api = Api::get($PRISMIC_URL, $PRISMIC_TOKEN);
$documents = $api->query(null);
} catch (Guzzle\Http\Exception\BadResponseException $e) {
handlePrismicHelperException($e);
}
$title="All d... | true |
25824b74b1844fc195f1d591e4726b0c925ec3cc | PHP | Aquarius121/php_codeIgniter | /application/classes/media_database/contact_access.php | UTF-8 | 1,062 | 2.5625 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
abstract class Media_Database_Contact_Access {
public static function has_plus_access($user = null)
{
if ($user === null)
{
if (Auth::is_admin_online()) return true;
$user = Auth::user();
}
if ($user->has_platinum_access()) re... | true |
dbcedb149cae9cdd1662b6a18043f70fba4c0551 | PHP | anthony-b/tickit | /email/send_mail.php | UTF-8 | 1,658 | 2.578125 | 3 | [] | no_license | <?php
class send_mail{
//public $send_mail_funct;
function __construct($recipient, $subject){
/*---------------PHP mailer -------------------*/
ini_set('SMTP', 'localhost');
ini_set('smtp_port', 25);
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP(); // Se... | true |
c002bc3d0d2256ac476c39456d664b4b46f88e15 | PHP | lordmx/currency_parser | /currency_parser/application/modules/api/models/Base.php | UTF-8 | 1,632 | 2.78125 | 3 | [] | no_license | <?php
class Api_Model_Base implements \ArrayAccess
{
/**
* @return object
*/
public function getBaseDto()
{
$className = 'Api_Dto_' . substr(get_class($this), strlen('Api_Model_'));
if (!class_exists($className)) {
return null;
}
return new $className... | true |
f066d245a47f3bc5e5b7405730ca7074c548f3e8 | PHP | ruiokazaki-archive/phpStudy | /index.php | UTF-8 | 1,886 | 3.890625 | 4 | [] | no_license | <?php
$age = 19;
define("NAME", "Okazaki Rui");
define("TAX",1.1);
echo $age."\n".NAME;
echo "<br>";
echo 3000 * TAX;
echo "<hr>";
$a = "PHP Study";
echo '1. タイトルは $a です。<br>';
echo "2. タイトルは $a です。<br>";
echo "3. タイトルは$aです。<br>";
echo "4. タイトルは{$a}です。<br>";
echo "5. タイトルは".$a."です。<br>";
echo "<hr>";
$family = arr... | true |
1f479ea1d1d6b17694d3e15eb6501cd07dd7319a | PHP | birendrakumarbehera/User-Management | /index.php | UTF-8 | 3,366 | 2.5625 | 3 | [] | no_license | <?php
include "includes/db.php";
if(isset($_SESSION['username'])){
header('location:dashboard.php');
}
if(isset($_POST['login']) && !empty($_POST['email']) && !empty($_POST['password'])){
$email = $_POST['email'];
$password = $_POST['password'];
if(strlen($password)< 8){
ech... | true |
afe50ced991da466381d5c29082ba6aa41ba6fa7 | PHP | DianeGagne/beads-website | /database/migrations/2017_07_17_004545_create_finishes_table.php | UTF-8 | 1,032 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFinishesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('finishes', function (Blueprint $table) {
... | true |
e0921dc0cfec5acf06de98e1d360d8fb5bcab0be | PHP | weierophinney/zf-web | /public/issues/secure/attachment/12986/gateway.php | UTF-8 | 2,336 | 2.515625 | 3 | [] | no_license | <?php
ini_set("display_errors", 1);
$dir = dirname(__FILE__);
$webroot = $_SERVER['DOCUMENT_ROOT'];
$configfile = "$dir/amf_config.ini";
//default zend install directory
$zenddir = $webroot. '/ZendFramework/library';
//Load ini file and locate zend directory
if(file_exists($configfile)) {
$arr=parse_ini_f... | true |
d76f0efde738c0ad6fd6eb014f5c8e850eac4e07 | PHP | programic/laravel-hoorayhr | /src/HoorayHR.php | UTF-8 | 789 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Programic\Hooray;
use Illuminate\Contracts\Foundation\Application;
/**
* Class HoorayHR
* @package Programic\Hooray
* @extends Programic\Hooray\HooraiApi
*/
class HoorayHR
{
protected $app;
protected $client;
public function __construct(Application $app)
{
$this->app = $a... | true |
3cd7800d52e87dcedd071f2b98cc35cbdd7ad2e2 | PHP | sodalevy/sign | /src/Sign.php | UTF-8 | 1,535 | 3.15625 | 3 | [] | no_license | <?php
namespace Sodalevy\Sign;
class Sign
{
/**
* 验证签名
* @param $sign
* @param $values
* @param $app_secret
* @param int $timeout
* @return bool
*/
public static function checkSign($sign,$values,$app_secret,$timeout=10){
$make_sign=self::makeSign($values,$app_secret)... | true |
506b264dc301f430cc58f52b7dd0c2fd72163005 | PHP | alshabalin/kohana-advanced-migrations | /views/migration_template.php | UTF-8 | 2,059 | 2.671875 | 3 | [
"MIT"
] | permissive | <?= '<?php' ?>
class <?= $migration_name ?> extends Migration
{
public function up()
{
<?php if (!empty($add_column)) { ?>
Schema::table('<?= $table_name ?>', function($table)
{
$table->string('<?= $add_column ?>');
});
<?php } else if (!empty($remove_column)) { ?>
Schema::table('<?= $tab... | true |
d1f6fccf5067e6619aeccf01b711660189002f38 | PHP | evilreiko/zf3test | /module/Application/src/Model/MyModelX.php | UTF-8 | 409 | 2.765625 | 3 | [] | no_license | <?php
// In this model example, we pass the $db from controller (or from anywhere) to each function (since the class is abstract)
namespace Application\Model;
abstract class MyModelX {
public static function staticFunc1($db) {
// $result = $db->query('SELECT * FROM `users`', \Zend\Db\Adapter\Adapter::Q... | true |
9e5c69dddf6d4065fcc88776555de9619738c3e4 | PHP | luigif/WsdlToPhp | /samples/bioid-web-service/Quality/BioIDWSServiceQuality.php | UTF-8 | 1,362 | 2.796875 | 3 | [] | no_license | <?php
/**
* Class file for BioIDWSServiceQuality
* @date 15/08/2012
*/
/**
* Class BioIDWSServiceQuality
* @date 15/08/2012
*/
class BioIDWSServiceQuality extends BioIDWSWsdlClass
{
/**
* Method to call QualityCheck
* @uses BioIDWSWsdlClass::getSoapClient()
* @uses BioIDWSWsdlClass::setResult()
* @uses B... | true |
9de29d1564fb380ee29d141590cc5f15c2d27338 | PHP | nicolastanski/design-patterns-php | /TemplateMethod/ImpostosVestuario.php | UTF-8 | 212 | 2.90625 | 3 | [] | no_license | <?php
namespace TemplateMethod;
class ImpostosVestuario extends ImpostosAbstract
{
public function calculaImpostoVariavel(float $precoProduto): float
{
return ($precoProduto * 1.15);
}
} | true |
c7fd8846e29bde03d0a1b0931acc410f8e456bc3 | PHP | rahulyhg/advanced-content-bundle | /Model/Content.php | UTF-8 | 1,705 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Sherlockode\AdvancedContentBundle\Model;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
abstract class Content implements ContentInterface
{
/**
* @var int
*/
protected $id;
/**
* @var ContentTypeInterface
*/
protected... | true |
2aaca84bfbc7cd13a9e82a4c363201cd2dc1e061 | PHP | hutamaadi98/PWEB | /PWEB/Week 3/Week3.php | UTF-8 | 298 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
function tambah($a, $b=0)
{
$hasil = $a + $b;
$a = 20;
//echo $hasil;
return $hasil;
}
$angka1 = 10;
$angka2 = 20;
$hasil = tambah($angka1,$angka2);
echo "<BR> $hasil";
echo "<BR> $angka1";
$hasil = tambah($angka1);
echo "<BR> $hasil";
?> | true |
6bef894051013e4fff14509312b1be22c38b8ef1 | PHP | InVerTem/ViraMusic | /basic/models/UploadForm.php | UTF-8 | 606 | 2.6875 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\base\Model;
class UploadForm extends Model {
public $file;
public function rules() {
return [
['file', 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, jpeg, svg, mp3, gif'],
];
}
public function upload() {
... | true |
6fb47d90933a24b1d66cbcac7f180d0ee8f177ee | PHP | ivankne/Vjezbanje | /Ljetni/functions.php | UTF-8 | 1,022 | 2.546875 | 3 | [] | no_license | <?php
//function l($varijabla){
// echo "<pre>";
// print_r($varijabla);
// echo "</pre>";
//}
function saljiEmail($mail,$primatelji,$naslov,$poruka){
require 'PHPmailer/PHPMailerAutoload.php';
date_default_timezone_set('Etc/UTC');
$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug... | true |
3991bb1ed30734ff27d7d58069d362b0bac482b1 | PHP | smanjit/QoS | /rectra/loginer.php | UTF-8 | 697 | 2.515625 | 3 | [] | no_license | <?php require_once "./connection.php"; ?>
<?php
session_start();
if(isset($_POST['sbtn']))
{
echo $name = trim($_POST['user']);
echo $pass = trim($_POST['pass']);
$md5 = md5($pass);
//checking username in database
$stmt = $conn->prepare("SELECT * FROM userlog WHERE user = ?");
$stmt->execute([$name])... | true |
beffc955079bc4d743ba9bde5cdfea1e45780c31 | PHP | robotateme/currency | /app/Services/CbrApi/RatesDailyRatesRequest.php | UTF-8 | 3,779 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Services\CbrApi;
use App\Services\CbrApi\Contracts\RatesRequestInterface;
use Carbon\Carbon;
use GuzzleHttp\Exception\GuzzleException;
use SimpleXMLElement;
class RatesDailyRatesRequest implements RatesRequestInterface
{
/**
* @var string
*/
public $uri = 'http://www.cbr.ru/sc... | true |
31b997a1c0bba256d570bb1103b2d7e45bef20f7 | PHP | durangol/CallMe | /src/CallMe/WebBundle/Entity/Phone/PhoneCallManager.php | UTF-8 | 3,028 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace CallMe\WebBundle\Entity\Phone;
use CallMe\WebBundle\Core\AbstractManager;
use CallMe\WebBundle\Entity\PhoneCall;
use CallMe\WebBundle\Entity\User;
use Rhumsaa\Uuid\Uuid;
class PhoneCallManager extends AbstractManager
{
/**
* @var PhoneCallFactory
*/
protected $phoneFactory;
/**... | true |
7767e5e809a44f8aab6ccd42e21eb967be1e84a0 | PHP | pi-engine/pi | /lib/Pi/I18n/Translator/LoaderPluginManager.php | UTF-8 | 2,993 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Pi Engine (http://piengine.org)
*
* @link http://code.piengine.org for the Pi Engine source repository
* @copyright Copyright (c) Pi Engine http://piengine.org
* @license http://piengine.org/license.txt BSD 3-Clause License
*/
namespace Pi\I18n\Translator;
use Laminas\I18n\T... | true |
fb18a0bea439929361a2d6b9492dd03fd9b84110 | PHP | jcordero/mgp | /mgp/www/lmodules/reportes/class_indicadores.php | UTF-8 | 2,090 | 2.515625 | 3 | [] | no_license | <?php
/* Clase generada automaticamente
* Compilador PHPClass Version 2.6.18 (01/MAR/2012) UTF-8 / http://www.commsys.com.ar
*/
include_once "common/cobjbase.php";
if( !class_exists('indicadores') ) {
class indicadores extends cobjbase {
function __construct() {
parent::__construct();
$this->m_cl... | true |
8fcfc837c5f3152474366e15b4a89a6e18f79bed | PHP | thomasrose/scooter | /lib/Search/Model/Query/Presentation.php | UTF-8 | 2,894 | 2.78125 | 3 | [] | no_license | <?php
namespace Scooter\Search\Model\Query;
use Scooter\Search\Model\AbstractModel;
class Presentation extends AbstractModel
{
const FORMAT_DEFAULT = 'default';
const FORMAT_JSON = 'json';
const FORMAT_XML = 'xml';
const FORMAT_PAGE = 'page';
/**
* Whether or not to bold search terms in sea... | true |
94550642be33ab24ed568703f4b093a699f715a7 | PHP | dualavatara/jbfw | /admin/lib/Admin/Extension/Template/Escaper/HtmlEscaper.php | UTF-8 | 303 | 2.765625 | 3 | [] | no_license | <?php
namespace Admin\Extension\Template\Escaper;
class HtmlEscaper extends Escaper {
public function __construct() {
parent::__construct(array($this, 'escapeHtml'));
}
public function escapeHtml($value) {
return is_string($value)
? htmlspecialchars($value, ENT_QUOTES)
: $value;
}
} | true |
8cd28f472f9c20fd66f6a5fb020c1f5c366a5cbe | PHP | Shok958/proyecto1 | /html/tema07/agenda/includes/conexion.php | UTF-8 | 324 | 2.5625 | 3 | [] | no_license | <?php
function abrirConexion($host,$usuario,$pass,$bd){
$conexion = mysqli_connect($host,$usuario,$pass,$bd);
if ($conexion) {
mysqli_set_charset($conexion,"utf8");
return $conexion;
}else{
echo "Error en la conexion";
exit();
}
}
function cerrarConexion($conexion){
mysqli_close($conexion);
}... | true |
4165f9a8a0d2641e190b72cfe981650b3f81264c | PHP | sottoc/topup_card_management | /bol/eventlogbol.php | UTF-8 | 792 | 2.625 | 3 | [] | no_license | <?php
class eventlogbol{
function save_eventlog($action_name,$action_table,$changes_mode,$original_mode)
{
//get ip address
$ipaddress = getenv('REMOTE_ADDR');
$action_user_id='1';
//session user id
$eventlogdal=new eventlogdal();
$changes_mode_str='';
$original_mode_str='';
if(is_array($chang... | true |
b93ecbbb49c39e0b3bf1dc8cc4abdaeeaac02cdc | PHP | dapodix/dapodik-2022 | /app/dataweb/apps/src/DataDikdas/Model/map/UnitUsahaKerjasamaTableMap.php | UTF-8 | 3,498 | 2.546875 | 3 | [] | no_license | <?php
namespace DataDikdas\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'unit_usaha_kerjasama' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used i... | true |
50f791b732a70b23bbc4d62f55053541a7d0ff86 | PHP | umer107/de-snap | /diamond-emporium-crm/html/public_html/06082015/library/De/Lib.php | UTF-8 | 818 | 2.71875 | 3 | [] | no_license | <?php
namespace De;
final class Lib {
public static function dbDateFormat($date) {
list($d ,$m, $y) = explode('/', $date);
return strtotime("$y-$m-$d") ? date('Y-m-d', strtotime("$y-$m-$d")) : false;
}
public static function isTaskOverDue($taskData) {
if(empty($taskData['due_date']) || !strtotime($taskDat... | true |
00eadb2491041a13839d356049e887606dcebdca | PHP | JoeFavara/MyFirstPhpProject | /dao_model/returnPerson.php | UTF-8 | 455 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: josephfavara
* Date: 1/6/15
* Time: 2:03 PM
*/
class returnPerson {
/**
*
*/
public function testPerson() {
$work = new person();
$work->setName('Hakan Anderson');
$work->setStreetName('World Champ Lane');
$work->setNumb... | true |
4e2fd11491bcc6336ac093c028797fcf8d1c07bb | PHP | itsMagondu/Dodger_Server | /getEvent.php | UTF-8 | 1,159 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
include 'dbConnect.php';
if (!$connection) {
print("Connection Failed.");
exit;
} else {
$currentTime = "SELECT LOCALTIMESTAMP";
$timeQuery = pg_exec($connection, $currentTime);
$timeCur = pg_fetch_result($timeQuery, 0, 0);
$query = "SELECT time FROM events ";
$myquery = pg_exec($co... | true |
928fac9218186eb8d9f2a8b4fb46871189dcbe55 | PHP | dgierejkiewicz/design_patterns_php_examples | /Transactional.php | UTF-8 | 5,665 | 3.09375 | 3 | [] | no_license | <?php
namespace DesignPatterns;
interface Processiable
{
public function process($subject);
}
interface Transactionable
{
public function tryOperation(): bool;
public function operation();
public function saveToMemento();
public function restoreFromMemento();
}
interface TransactionChainable... | true |
e7421c57a16f2595036fffe33470592f9a7c458e | PHP | reborncms/reborn | /heart/reborn/src/Reborn/Util/Html.php | UTF-8 | 7,169 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Reborn\Util;
/**
* Html Tag Helper class
*
* @package Reborn\Util
* @author Myanmar Links Web Development Team
**/
class Html
{
/**
* Single(< />) tag lists
*
* @var array
**/
protected static $singleTags = array('input', 'hr', 'br', 'img', 'base', 'link', 'meta');
... | true |
b3be7f649a1f8f480e762f4934375657f7e07769 | PHP | nerahmou/ft_minishop | /src/services/articles_service.php | UTF-8 | 1,935 | 2.734375 | 3 | [] | no_license | <?php
/**
* This file is here to communicate with the storage.
* This file don't interact with the objects, refer to the appropriate model
* to interact with them.
*
* Only read/write on storage and existence check are made.
*/
$articles = [];
$prev = '/var/www/private/';
$articles_folder = $prev . "articles.da... | true |
5759acf04542a894067bf07f197466a5c27a7b6c | PHP | Silvayn/weneedplayer | /Entity/Player.php | UTF-8 | 1,943 | 2.921875 | 3 | [] | no_license | <?php
namespace Entity;
use App\Entity;
use DateTime;
use Tools\Base;
class Player extends Entity {
use Base;
private $nom;
private $prenom;
/**
*
* @var DateTime
*/
private $naissance;
private $ville;
private $numero;
private $position;
private $team;
... | true |
1184ef9125d383c28c92f4e763afbd7453d148bd | PHP | karashi39/scraping_ippai | /lib/Scraping/URLGenerator.php | UTF-8 | 1,161 | 2.515625 | 3 | [] | no_license | <?php
namespace Scraping;
class URLGenerator
{
public static function genPressURLList($search_condition_list)
{
if (is_null($search_condition_list)) {
return null;
}
$target_site_list = [
"pr-times",
"prwire",
"news2u",
... | true |
495afbd0952c98f5cda791f1c2400fc846d83e77 | PHP | TimeToogo/Penumbra | /Source/Core/Object/Expressions/FieldExpression.php | UTF-8 | 1,748 | 2.96875 | 3 | [] | no_license | <?php
namespace Penumbra\Core\Object\Expressions;
/**
* @author Elliot Levin <elliot@aanet.com.au>
*/
class FieldExpression extends ObjectOperationExpression {
private $NameExpression;
public function __construct(Expression $ObjectValueExpression, Expression $NameExpression) {
parent::__constru... | true |
8bab8b7547725b43d406b56bd7bce08873b60956 | PHP | soleynenero/hotel | /src/Controller/InfoUserController.php | UTF-8 | 6,991 | 2.8125 | 3 | [
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-proprietary-license"
] | permissive | <?php
namespace Hotel\Controller ;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Hotel\Model\UserDAO ;
use Hotel\Model\InfoReservationDAO ;
class InfoUserController
{
// fonction permettant l'affichage des données de l'utilisateur
public functio... | true |
692fd32b74ae1127631220f8964b6e5a711a3255 | PHP | marcelo-idoso/ZF2Breacrumb | /module/Application/src/Application/Entity/EntityModule.php | UTF-8 | 778 | 2.765625 | 3 | [] | no_license | <?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* EntityModule
*
* @ORM\Table(name="module")
* @ORM\Entity
*/
class EntityModule
{
/**
* @var integer
*
* @ORM\Column(name="idModule", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="I... | true |
adde63f3f56212ce42720fc1c152df101ae31eb3 | PHP | budihartantom/Tes-Programmer | /tes6.php | UTF-8 | 403 | 3.140625 | 3 | [] | no_license | <h1>Menampilkan bilangan prima 1 s/d 12</h1>
<?php
$n=12;
for($a=1;$a<=$n;$a++){
//data input bilangan
$z=0;
for($b=1;$b<=$a;$b++){ //data input bilangan kedua
if($a%$b == 0){ // bilangan terbagi
$z++;
}
}
... | true |
af5904fbd49e5fae3e5c9ecd36fea29f5a8e44a9 | PHP | lus860/Yii2projectnew | /common/models/NewsletteresForm.php | UTF-8 | 1,713 | 2.65625 | 3 | [] | permissive | <?php
namespace common\models;
use Yii;
use yii\base\Model;
use yii\helpers\Html;
use common\models\User;
use common\models\Newsletteres;
class NewsletteresForm extends Model
{
public $email;
public $user_id;
public $categories_id;
public function rules()
{
return [
[['email... | true |
a7b825e6aae3880095695189fb7c7445e610aa8a | PHP | Yanyinghenmei/PHPLearn | /PHPStudy/homeWork.php | UTF-8 | 1,660 | 3.25 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>作业</title>
</head>
<body>
<form class="" action="#" method="post">
<input type="text" name="lineNum" value="">
<br>
<input type="submit" name="action" value="金字塔">
<input type="submit" name="action" value="空心菱形">
<... | true |
3649e70f599b40df4c31927f0cac6a64405326b0 | PHP | thedotmack/rotorwash-bootstrap-3-0 | /assets/functions/filters.php | UTF-8 | 6,397 | 3.0625 | 3 | [] | no_license | <?php
/**
* RotorWash filters
*
* @package WordPress
* @subpackage RotorWash
* @since 1.0
*/
/**
* Makes some changes to the <title> tag, by filtering the output of wp_title().
*
* If we have a site description and we're viewing the home page or a blog posts
* page (when using a static front page)... | true |
78744fcd1447d83110586117bf4b0dc5d021c870 | PHP | abdiiwan1841/itunesApplication | /database/migrations/2020_05_17_034151_create_songs_table.php | UTF-8 | 1,099 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSongsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('songs', function ... | true |
6f2a87ad5056b62534417e9e368d64bef0840312 | PHP | luccavallari/security-2 | /src/Authentication/HttpBasicAuthenticationProvider.php | UTF-8 | 1,789 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of KoolKode Security.
*
* (c) Martin Schröder <m.schroeder2007@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace KoolKode\Security\Authentication;
use KoolKode\Http\HttpRequest;
use Kool... | true |
5be518574740f48975ff805f57e1284c0c080bf1 | PHP | MakulaVojtech/maturitni-projekt | /app/Presenters/PisnickyPresenter.php | UTF-8 | 1,189 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Presenters;
use App\Model\PisnickyManager;
final class PisnickyPresenter extends BasePresenter
{
private $pisnickyManager;
public function __construct(PisnickyManager $manager)
{
$this->pisnickyManager = $manager;
}
public function renderDefault(string $rytmus = "") : voi... | true |
084cbf119a9786756c6440f61ee62ca74c54afdd | PHP | polbalada/DAW2-M6 | /UF4/01 Receptes de cuina amb Recipe XML/list_recipes_callback.php | UTF-8 | 1,006 | 2.640625 | 3 | [] | no_license | <?php
//header('content-type: text/plain; charset=utf-8');
//header("access-control-allow-origin: *");
$data="";
if ($handle = opendir('recipes/')) {
/* This is the correct way to loop over the directory. */
while (false !== ($entry = readdir($handle))) {
if (strstr($entry, '.xml')) {
//Si... | true |
36d572ca49c4661a77ed325d3ab8ab3ba0fb1462 | PHP | shabnam611/CA | /students_profile.php | UTF-8 | 7,673 | 2.578125 | 3 | [] | no_license | <?php
include_once("error.php");
include_once("connection.php");
include_once("form_functions.php");
include_once("functions.php");
include_once("session.php");
include("header.php");
if(isset($_SESSION['user_type']) && $_SESSION['user_type']==0)
{
?>
<button type="button" class="btn btn-info btn-lg" data-toggle="mod... | true |
0fe904454a7d406bd9e79450faf02e4780f71b4f | PHP | veitsi/patterns | /index.php | UTF-8 | 464 | 3.0625 | 3 | [] | no_license | <?php
class DB
{
private static $instance;
public $counter;
private function __construct()
{
}
public static function getInstance()
{
if (empty(self::$instance))
{
self::$instance = new self();
return self::$instance;
}
}
public fu... | true |
7e52c3b226a6144bc0db8715a00671059f96b4d8 | PHP | nicolaslovento/practicappLab | /PracticaPP2/Helado.php | UTF-8 | 8,240 | 3.3125 | 3 | [] | no_license | <?php
include_once ("IVendible.php");
/*Crear la clase HELADO con atributos privados: sabor, precio y foto, que implemente la interface
IVendible con el método PrecioMasIva().*/
class Helado implements IVendible{
private $sabor;
private $precio;
private $foto;
public function __cons... | true |
69dc7e464c8eaa86309f955a1eb17ed0f692b1e3 | PHP | nbgspl-github/AmVirgin-Backend | /app/Exceptions/OtpPushException.php | UTF-8 | 254 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exceptions;
use Exception;
class OtpPushException extends Exception{
/**
* OtpPushException constructor.
*/
public function __construct(){
parent::__construct('Failed to send a one time password. Please try again.');
}
}
| true |
091989a05047a51238f31e5076d8253469a96dfd | PHP | hastom/xlsx-creator | /src/Structures/Values/Value.php | UTF-8 | 1,794 | 3.53125 | 4 | [
"MIT"
] | permissive | <?php
namespace Topvisor\XlsxCreator\Structures\Values;
use DateTime;
use Topvisor\XlsxCreator\Exceptions\InvalidValueException;
/**
* Class Value. Используется для задания значения ячейки.
*
* @package Topvisor\XlsxCreator\Structures\Values
*/
class Value{
// Типы значений ячеек
const TYPE_NULL = 0;
const T... | true |
062d5c67bb4e8084e9efc5eed3138c2d991b0115 | PHP | Uru-ruru/digital-river-models | /tests/PriceTest.php | UTF-8 | 654 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Uru\Tests\DR;
use TypeError;
use Uru\DR\Price;
use PHPUnit\Framework\TestCase;
class PriceTest extends TestCase
{
public function testSetCurrency()
{
$dr = new Price();
$dr->setCurrency('test');
$this->assertEquals('{"currency":"test"}', json_encode($dr));
}
... | true |
8e40a72024d1e0468c9cc9fcff28c084275fa0f7 | PHP | youssefmagdy1/CMS | /admin/includes/displaying_user.php | UTF-8 | 3,419 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_POST['checkBoxArray'])){
foreach($_POST['checkBoxArray'] as $checkBoxValue){
$bulk_option = $_POST['bulk_options'];
switch ($bulk_option) {
case 'admin':
admin_user($checkBoxValue);
break;
... | true |
a9d854f7c4f165fa889433ece686ab7f65444c2c | PHP | Team-Tipiak-ESGI/fairrepack-website | /utils/dao/product.php | UTF-8 | 4,972 | 2.75 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../database.php';
require_once __DIR__ . '/../UUIDv4.php';
require_once __DIR__ . '/offer.php';
require_once __DIR__ . '/reference.php';
/**
* Insert a new product
* @param string $reference Reference's UUID
* @param string $user
* @param string|null $description
* @param string|nul... | true |
861bb0c33c0c836a54788208423a7b3e4faa29d3 | PHP | Leidy1Rojas/SistemaPhp | /finca/controlador/IsumosCtrl.php | UTF-8 | 2,512 | 2.6875 | 3 | [] | no_license | <?php
require_once ('../modelo/Insumos.php');
if(!empty($_GET['action'])){
IsumosCtrl::main($_GET['action']);
}else{
echo "No se encontro ninguna accion...";
}
class IsumosCtrl {
/**
* @param $action
*/
static function main($action)
{
if ($action == "crear") {
IsumosCtr... | true |
4143ea7e095cc57ea0ffd044f27e4c9ba8e5a7b8 | PHP | DanyJesus/AulasPHP | /funcao/anonimas.php | UTF-8 | 512 | 3.875 | 4 | [
"MIT"
] | permissive | <div class="titulo">Funções Anônimas</div>
<?php
/*Uma variavel que recebe o valor d euma função*/
$soma= function($a, $b)
{
return $a + $b;
};
echo $soma(1,2). '<br>';
function executar($a, $b, $op, $funcao){
$resultado = $funcao($a,$b)?? "Nada";
echo "$a $op $b = $resultado<br>";
}
executar(5, 9, '+', ... | true |
24e86a36004a12779a6cdc7e93b0c7615a949779 | PHP | kunsanw/php_blog | /php_work/switch-case/3.5.2.php | UTF-8 | 544 | 2.625 | 3 | [] | no_license | <?php
// 获取前台数据
$name = $_POST['name'];
// var_dump($name);
if(empty($name)){
exit ;
}
// var_dump($name);
switch ($name) {
case "春天":
echo "温度5-10‘C 请注意保暖哦";
break;
case "夏天":
echo "温度20-35‘C 天气热请多喝水,防止中暑";
break;
case "秋天":
echo "温度16-25‘C 天气转凉了,多加衣服";
break;
cas... | true |
95507f27f327b04cdfb565f05db05761402e5ad2 | PHP | JustinBarreira/PHPSpring2014 | /week10/index.php | UTF-8 | 2,559 | 2.6875 | 3 | [] | no_license | <?php include 'dependency.php'; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
// put your code here
define('WAIT_SECONDS', 5);
//http://saas.site88.net/mail/index.php
if( isset($_SESSION[... | true |
6db5ec007fe050eb2603013ae0c2f77c50354f1b | PHP | maurime2/PerezMauricio_CIS12_48939 | /Hmwk/Perez, Mauricio - Assignment 2 091615 - 48939/get_paycheck_if.php | UTF-8 | 1,259 | 3.359375 | 3 | [] | no_license | <html>
<?php /*
RCC Class PHP
Sept 15th, 2015
Purpose: Paycheck with IF Paycheck Construct
*/
?>
<body>
<?php // sets hours worked variable to NULL and sets grade variable from form data
$paycheck = "NULL";
$hours = $_GET['hours'];
$rate = (float)$_GET['rate'];
$rateD = (float)($rate*... | true |
78d4e850bf4e591255eb7a1824c723b8ec39cf6c | PHP | JMSBot/widget | /lib/Widget/Apc.php | UTF-8 | 4,376 | 2.78125 | 3 | [] | no_license | <?php
/**
* Widget Framework
*
* Copyright (c) 2008-2012 Twin Huang. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licens... | true |
d53dd45ac9555fbeaeebe7397975425c4936df57 | PHP | sinichkinpavl/suql | /src/syntax/SuQL.php | UTF-8 | 3,153 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
use core\SuQLObject;
class SuQL extends SuQLObject
{
private $suql = null;
public function clear() {
parent::clear();
$this->suql = null;
}
public function rel($leftTable, $rightTable, $on, $temporary = false) {
parent::rel($leftTable, $rightTable, $on, $temporary);
return $this;
}
... | true |
44155786164d564d7512138a727d684373aa7b49 | PHP | AlbertusKevin/Design-Pattern-Collections | /BridgePattern/After/Lele.php | UTF-8 | 174 | 2.78125 | 3 | [] | no_license | <?php
require_once 'HewanAir.php';
class Lele extends HewanAir
{
/**
* @override
*/
public function getNama(): string
{
return 'lele';
}
}
| true |
2614c85b904f4f9b152c3831d8d6aff927d9703d | PHP | lunches-platform/etl | /src/Lunches/ETL/Service/AbstractService.php | UTF-8 | 925 | 2.828125 | 3 | [] | no_license | <?php
namespace Lunches\ETL\Service;
use GuzzleHttp\Client;
abstract class AbstractService
{
/** @var Client */
protected $client;
/** @var string */
protected $accessToken;
/** @var string */
protected $company;
/** @var string */
protected $apiDateFormat = 'Y-m-d';
public f... | true |
f28b0ab789d9055ca01edab9336dbc161b19a6e1 | PHP | shyaken/couponicclone | /protected/models/MDealRedeemLocation.php | UTF-8 | 1,980 | 2.640625 | 3 | [] | no_license | <?php
class MDealRedeemLocation extends UActiveRecord
{
public static function module()
{
return 'deal';
}
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName()
{
return '{{DealRedeemLocation}}';
}
public function rules()
{
return arr... | true |
db31721c4059e50ea536c5875076c83d3c2f3b2d | PHP | vdhicts/tagcloud-builder | /tests/unit/ParserTest.php | UTF-8 | 1,197 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use Vdhicts\Dicms\Tagcloud;
class ParserTest extends TestCase
{
public function testParser()
{
$separator = ',';
$tagNames = ['php', 'javascript', 'mysql'];
$tagString = implode($separator, $tagNames);
$parser = new Tagcloud\Parser($tagStr... | true |
b2deab27daad118569273440ca39533d93e2d8a8 | PHP | katheroine/minium | /app/helpers/TileGalleryViewHelper/TileGalleryViewHelper.php | UTF-8 | 4,404 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class rebuilding photos collection and replenishing with additional gap images
* placed in appropriate collection cells accordingly to gallery columns number.
*/
class TileGalleryViewHelper {
/**
* Default number of columns.
*/
const COLUMNS_DEFAULT = 4;
/**
* Patht to the gap image file.
... | true |
dbfcc6cb014b504f29a2bcf19d7bc078cfbba22c | PHP | s4y/Instaswap | /www/pages/home.php | UTF-8 | 1,319 | 2.71875 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
switch ($_POST['action']) {
case 'send':
$to = $_POST['to'];
$url = $_POST['url'];
if ($to && $url){
if (($user_to = $db->get_user_by_name($to))) {
if (Instaswap\send($user, $user_to, $url)) {
$success = 'Sent!';
// Don’t repopulate the... | true |
9b8b2c06d58fd9eb2eeb57975342355b2c50bc3b | PHP | ganoro/doc-reports | /src/Services/reports.php | UTF-8 | 7,010 | 2.78125 | 3 | [] | no_license | <?php
/**
* Reports API
*/
/**
* Generate report API
*
* @param unknown_type $req
* @param unknown_type $res
* @param unknown_type $isMonthly
* @param unknown_type $timeUnit
* @param unknown_type $uid
*/
function generate_report($req, $res, $isMonthl... | true |
141851080c8b070cb1d610f128aad2174f11b9bf | PHP | alecrabbit/php-traits | /tests/Unit/NameableTest.php | UTF-8 | 614 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace AlecRabbit\Tests\Traits;
use const AlecRabbit\Traits\Constants\DEFAULT_NAME;
use PHPUnit\Framework\TestCase;
class NameableTest extends TestCase
{
/** @var HasTraitNameable */
private $obj;
protected function setUp(): void
{
$this->obj = new HasTraitN... | true |
c232052ac7f85fc7b6a75042c25c6a0d7bda21e8 | PHP | m-hcb/accountsapp | /app/Http/Controllers/AccountController.php | UTF-8 | 3,379 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Account;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class AccountController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illumi... | true |
b9c744f9f96d45a18969c960a7f4bba69ed61690 | PHP | insomynwa/ava-menu | /includes/class-ava-menu-tools.php | UTF-8 | 4,610 | 2.734375 | 3 | [] | no_license | <?php
/**
* Class description
*
* @package package_name
* @author Cherry Team
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! class_exists( 'Ava_Menu_Tools' ) ) {
/**
* Define Ava_Menu_Tools class
*/
class Ava_Menu_Tools {
/**
* ... | true |
c0111fbc02dea3e927045b6a94ee76694363752c | PHP | Sadiqueee/P_133-BookSite | /Site_Design_fischerda - Copie (2)/fichier Gege/Register.php | UTF-8 | 4,543 | 3.0625 | 3 | [] | no_license | <?php
/**
* ETML
* Auteur : silvestrge
* Date : 02.02.2018
* Description : Page pour la création d'une page utilisateur
*/
class Register
{
const rgxMail = "/^.*@.*\.[a-z]{2,5}$/";
const rgxName = "/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/... | true |
dc0416b667ba60ffe6ac2db178cb100f0533542b | PHP | qisimah/web | /qisimah/app/Jobs/UncompletedSongUploadCleaner.php | UTF-8 | 669 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use App\File;
use Illuminate\Queue\Jobs\Job;
class UncompletedSongUploadCleaner extends Job
{
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
... | true |
eb6103f553422e256f2e5cbaca24abe2a3599a73 | PHP | baboowang/dataddy | /install/common.php | UTF-8 | 5,282 | 2.765625 | 3 | [] | no_license | <?php
function _dump($obj){
echo '<pre>';
var_dump($obj);
}
function d()
{
$args = func_get_args();
foreach ($args as $arg) {
if (!empty($arg)) {
return $arg;
}
}
return $arg;
}
function create_link($host, $port = 3306, $user, $pwd, $dbName){
static $link = NULL... | true |
9e6618380e05980374dd6ce942a4b09c9f0db7ea | PHP | zizohassan/adssystem | /app/Application/Repository/InterFaces/MenuInterface.php | UTF-8 | 304 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Application\Repository\InterFaces;
interface MenuInterface{
public function updateMenuItems($request);
public function getMenuById($id);
public function addNewItemToMenu($request);
public function getItemById($id);
public function updateOneMenuItem($request);
} | true |
294cba7f82617d7ac492687f52586a722c2e2883 | PHP | smouheb/covhelp | /src/Entity/Post.php | UTF-8 | 2,700 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\PostRepository")
*/
class Post
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type=... | true |
2d5b19daa1bb530098418d30e262791771c02c69 | PHP | nosorrow/manufacture | /src/Core/Libs/Validator/Rules/ValidationRules.php | UTF-8 | 13,398 | 2.890625 | 3 | [] | no_license | <?php
namespace Core\Libs\Validator\Rules;
use Core\Libs\Database\MySqlPDOConnection;
trait ValidationRules
{
public $validatedFilename;
/**
* Alpha
*
* @param string
* @return bool
*/
public function alpha($str): bool
{
return ctype_alpha($str);
}
/**
... | true |
8618fdfadc91234c5de75aeb994b29713252fa66 | PHP | phug-php/dev-tool | /src/Phug/DevTool/Command/CoverageCheckCommand.php | UTF-8 | 2,048 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Phug\DevTool\Command;
use Phug\DevTool\AbstractCommand;
use SimpleXMLElement;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class CoverageChe... | true |
e07e7efe1c5202036b563e97a897bbecdbdccaa8 | PHP | mattvlr/CEA-Scheduler | /schedule.php | UTF-8 | 1,606 | 2.703125 | 3 | [] | no_license | <?php
$dbhost = "104.131.179.153";
$dbname = "Scheduler";
$dbuser = "web";
$dbpass = "cea";
// Connection
global $db;
$day = date('Y-m-d');
//echo($day);
$db = new mysqli();
$db->connect($dbhost, $dbuser, $dbpass, $dbname);
$db->set_charset("utf8");
// Check Connection
//if ($db->connect_errno) {
// printf("Conne... | true |
06bcfa331367051e6a4f5ff52c99a33a4bf2f98b | PHP | dragostinova/php7-design-patterns | /Tests/Behavioral/StateTest.php | UTF-8 | 1,721 | 2.640625 | 3 | [] | no_license | <?php
namespace DesignPatterns\Tests\Structural;
use DesignPatterns\Behavioral\State\{CreatedOrderState, ShippedOrderState, DeliveredOrderState};
use DesignPatterns\Behavioral\State\Order;
use DesignPatterns\Behavioral\State\OrderStateInterface;
use PHPUnit\Framework\TestCase;
final class StateTest extends TestCase
... | true |
eff14cc0c16b06846f943014ad208264d61298c4 | PHP | Cemmsaka/forum | /database.php | UTF-8 | 898 | 2.921875 | 3 | [] | no_license | <?php
class mydatabase{
private static $conn;
private static $servername = "localhost";
private static $databasename = "accounts";
private static $username = "root";
private static $password = "secret";
public function __construct(){
try{
$sn = mydatabase::$servername;
$dn =... | true |
1d9f5e4d76f1804fa46ac2125ee5d422d54c9d66 | PHP | joshuaoyerinde/LMs-Backend | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 3,856 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use App\Models\User;
use Mail;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\Request;
class Regis... | true |
209988dbfcdb17a1229aba9e93788786d3a4539e | PHP | tommy-boy/weather_newsletter | /email/newsletters/classes/MostPopular.php | UTF-8 | 1,064 | 2.75 | 3 | [] | no_license | <?
class MostPopular {
static function getHeadlines($datasource, $number = NULL){
$html = file_get_html($datasource->src);
$links = $html->find('ul',0)->find('li');
$i = 0;
$set = NULL;
foreach($links as $link){
$i++;
if($i == $number) {
$set .= '<tr valign="top" style=" padding:5px; bord... | true |
ebc1b2ed6e0a96ac228a9ca3bdbbe3555b6ab17a | PHP | erickmerchant/wright | /src/Model/PageModel.php | UTF-8 | 566 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace Wright\Model;
use Aura\Sql\ExtendedPdoInterface;
/**
* @todo add docblocks
*/
class PageModel extends NodeModel
{
public function __construct($page_id, ExtendedPdoInterface $connection)
{
$this->connection = $connection;
$page = $connection->fetchOne("SELECT * FROM pages WHE... | true |
30ba4a567cda55d01d85fa14542232d03557228e | PHP | BeeLaravel/base | /app/Helpers/Laravel.php | UTF-8 | 459 | 2.53125 | 3 | [] | no_license | <?php
// ## Laravel
use App\Models\System\Menu;
use App\Models\System\MenuItem;
// ### System
function route_class() {
return str_replace('.', '-', Route::currentRouteName());
}
function base_route() {
$route_name = \Route::currentRouteName();
$route_name_data = explode('.', $route_name);
return reset(... | true |
2e5d2730e3076e1f0891483218bbeaec5649e51b | PHP | tonysoft2018/sga_web | /api/cerrarsesion.api.php | UTF-8 | 4,152 | 2.5625 | 3 | [] | no_license | <?php
// ----------------------------------------------------------------------------------
// cerrarsesion.api.php
// ----------------------------------------------------------------------------------
// Autor. Ing. Antonio Barajas del Castillo
// -----------------------------------------------------------------------... | true |
2c391e21ce53e617c3b9781a91a2b73c448e33b9 | PHP | JordanDalton/hiprod | /bundles/admin/controllers/product.php | UTF-8 | 6,233 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
/**
* products
*
* Description goes here..
*
* @author Jordan Dalton <jordandalton@wrsgroup.com>
* @created Oct 24, 2012, 12:10:51 PM
*/
class Admin_Product_Controller extends Admin_Base_Controller
{
//--------------------------------------------------------------------------
/**
* Produ... | true |
fd51cb261956d6a069e8912c9c056826b090e1fb | PHP | codingNinjaSatoshiSeven/php_homework | /public_html/company/api/Product.php | UTF-8 | 4,259 | 3.15625 | 3 | [] | no_license | <?php
class Product {
// database connection and table name
private $conn;
private $table_name = "company_products";
// object properties
public $id;
public $name;
public $display_name;
public $description;
public $price;
public $image;
publi... | true |
7816f152b1b5b857dc4ec8740b18a1974305a8fe | PHP | Philpof/OC_POO-en-PHP | /index.php | UTF-8 | 1,093 | 2.6875 | 3 | [] | no_license | <?php
require('controllers/autoloader/Autoloader.php');
?>
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Philippe PERECHODOV">
<title>OC_POO en PHP</title>
</head>
<body>
... | true |
e149fb307c4c3ec75f4034785595fbf2922407d8 | PHP | nartb/m-supply | /html/public/core-functions.php | UTF-8 | 2,155 | 2.8125 | 3 | [] | no_license | <?php
// Make standardized database GET call
function make_get_call($mid_url) {
global $base_url, $end_url;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_HEAD... | true |
eb962817093e0790fdaf50f12d92526f85f356aa | PHP | Taulita/Vynile-co | /apps/articleConfirmPanier.php | UTF-8 | 931 | 2.609375 | 3 | [] | no_license | <?php
require('models/vinyle.class.php');
require('models/platine.class.php');
$TTC= array();
$HT= array();
$TVA= array();
$i=0;
while($i<sizeof($_SESSION['panier']))
{
$idArticle= $_SESSION['panier'][$i];
$req="SELECT * FROM t_article WHERE id='".$idArticle."' AND categorie ='platine' ";
$res=mysqli_query($db,$req)... | true |
0d4140fc24e1b215e0283e1dfc1b38dae019d9e6 | PHP | simkesd/imar | /src/simkesd/SmartClassroom/SmartClassroomBundle/Entity/Collection.php | UTF-8 | 6,806 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace simkesd\SmartClassroom\SmartClassroomBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Collection
*
* @ORM\Table(name="collections")
* @ORM\Entity(repositoryClass="simkesd\SmartClass... | true |
2c015629a1268383b4c79a66e50ac0db5573addd | PHP | zahaton01/steam-market | /src/Application/Config/Exchanger/ExchangerConfig.php | UTF-8 | 1,530 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Application\Config\Exchanger;
use App\Application\Config\ConfigInterface;
use App\Application\Exception\Config\ConfigInvokeFailed;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* @author Anton Zakharuk <zahaton01@gmail.com>
*/
class ExchangerConfig implements ConfigInterfac... | true |
79f021cf98c550e84b6e4db56933c7974d4b37eb | PHP | shohe/yumyum | /app/modules/YumDB.class.php | UTF-8 | 4,249 | 3 | 3 | [] | no_license | <?php
require_once("./modules/model/User.class.php");
require_once("./modules/model/Users.class.php");
class YumDB {
private $pdo = null;
private $table_name = '';
public function __construct() {
$dsn = 'mysql:host=localhost;dbname=yumdb;charset=utf8;';
$dbuser = 'root';
$dbpass =... | true |
d00b3b5c0c7a3886bb09569e141795fdf3cf573f | PHP | ohyes0707/weifentong-laravel | /app/Models/User/BussModel.php | UTF-8 | 726 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: admin
* Date: 2017/6/16
* Time: 11:40
*/
namespace App\Models\User;
use App\Models\CommonModel;
class BussModel extends CommonModel{
protected $table = 'bussiness';
protected $primaryKey = 'id';
public $timestamps = false;
static public function changePw... | true |
b4bca2a3c32209e279f73e30673570bf80f801a4 | PHP | yessicsa/FPlantilla. | /app/Http/Requests/ProveedorUpdateRequest.php | UTF-8 | 2,874 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ProveedorUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
8aabaeb18006af45d99a38fec874ab1463998728 | PHP | spbgovbr/gepnet | /application/modules/diagnostico/models/mappers/Partediagnostico.php | UTF-8 | 3,353 | 2.59375 | 3 | [] | no_license | <?php
/**
* Newton Carlos
*
* Criado em 14-11-2018
* 16:07
*/
class Diagnostico_Model_Mapper_Partediagnostico extends App_Model_Mapper_MapperAbstract
{
/**
* Set the property
*
* @param string $value
* @return Diagnostico_Model_Partediagnostico
*/
public function insert(Diagnostic... | true |
9942366ff01e1734a73bea08949339b4d906dfaa | PHP | dainst/ariadne-portal | /app/Http/Controllers/SubjectController.php | UTF-8 | 3,166 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Config;
use App\Services\Subject;
use Request;
class SubjectController extends Controller {
/**
* List the subjects and number of records
*
* @return Response
*/
public function index(... | true |
f95914ccbcf22519e7823468a1674a003b21857e | PHP | pandigresik/easyHRIS | /app/Traits/CacheModelTrait.php | UTF-8 | 1,309 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
trait CacheModelTrait
{
protected $rememberCacheTag;
// protected $rememberCachePrefix;
protected $rememberFor = 1440; /** in minutes, 60 * 24 */
// Semua operasi insert dan update melalui Eloquent pada akhirnya
// akan memanggil method 'save' di Illuminate\Database\Elo... | true |