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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
90f7bebf157bf10a2ee5277e6b16f9e46aa49a43 | PHP | cornernote/php-timesheet | /classes/GrindStone.php | UTF-8 | 10,384 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Class GrindStone
*/
class GrindStone extends Base
{
/**
* @var
*/
public $xmlFiles;
/**
* @var
*/
public $staff;
/**
* @var string
*/
public $createdDate;
/**
* @var string
*/
public $startDate;
/**
* @var string
*/
... | true |
5748ee6fe371e3dfca0ca5817fd74fa4277e63e5 | PHP | niltoncaldasjr/adminexpress | /control/OsChecklistControl.php | UTF-8 | 653 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Fabiano
* Date: 26/05/2016
* Time: 20:39
*/
class OsChecklistControl
{
protected $con;
protected $objChk;
protected $osDAO;
function __construct(OsChecklist $chk= null){
$this->con = Conexao::getInstance()->getConexao();
$this->osDAO = new ... | true |
e852de73dff2154234579b6f12a6004416be356c | PHP | dg482/mrd | /src/Builder/Form/Fields/Select.php | UTF-8 | 837 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dg482\Mrd\Builder\Form\Fields;
/**
* Class Select
* @package Dg482\Mrd\Builder\Form\Fields
*/
class Select extends FieldEnum
{
const FIELD_TYPE = 'select';
/**
* @param bool $original
* @return string
*/
public function getFieldValue(bool $original = false)
{
... | true |
d9111a8ce460ac8ab1663405482fe97bbf5b6ebc | PHP | GosmanVlad/class-manager | /app/api/auth/register_back.php | UTF-8 | 1,575 | 2.515625 | 3 | [] | no_license | <html lang="ro">
<?php
include $_SERVER['DOCUMENT_ROOT'] . "/class/app/Controllers/AccountController.php";
include $_SERVER['DOCUMENT_ROOT'] . "/class/components/header.php";?>
<body class="background-photo">
<div class="form-container">
<?php
if(empty($_POST['username']) || empty($_POST['password']) || empty($_PO... | true |
ba0499bbe1754614c5ff8768b9cd2a9f4ae757af | PHP | Sywooch/yii2_shop_prototype | /migrations/m160731_095612_languages.php | UTF-8 | 1,109 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
class m160731_095612_languages extends Migration
{
public function up()
{
$this->createTable('languages', [
'id' => $this->primaryKey('10'),
'url' => $this->string('2')->notNull(),
'locale' => $this->string('6')->notNull(),
'... | true |
c0417f4f64e7f9f291394e5be67da7e627d6ba2a | PHP | Swarna1310/events-226 | /searchevents.php | UTF-8 | 3,800 | 2.765625 | 3 | [] | no_license | <html>
<head><title></title></head>
<body>
<h1>Search Results</h1>
<?php
$searchtype = filter_input(INPUT_POST, "searchtype");
try {
//add connection to database here $con =
if ($searchtype == "all") {
$query = "SELECT * FROM events";
echo $query;
... | true |
d3ba2f28ca707f020700db1baad0068b3eb063f6 | PHP | shahrasel/test-another-project | /protocol/criteria/criteria.php | UTF-8 | 568 | 2.53125 | 3 | [] | no_license | <?php
abstract class criteria
{
// Common method
public function getOutPut($filter_criteria) {
//echo $filter_criteria[0];
if ( !class_exists($filter_criteria[0].'_instance') ){
//echo $GLOBALS['module_path'];
require_once ($GLOBALS['module_path'].$filter_criteria[0].'/'.$filter_criteria[0].'_ins... | true |
a66dd003276a2fa9b4290ad40b259e97f5ea40a6 | PHP | ifochka9519/softgroup | /task2class/view/trophy.php | UTF-8 | 888 | 2.828125 | 3 | [] | no_license | <?php
include __DIR__ . '/../project/Project.php';
require_once __DIR__ . '/../project/ClubsDisplayer.php';
$project = new Project();
$project->loadDB();
$display_club = new ClubsDisplayer();
$arr = $display_club->getTrophy($_GET['club_id']);
?>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
... | true |
08057d32b809de2e4b32783c2c9cf6b7503fd345 | PHP | andersbjorkland/book-readers-be | /src/Security/JwtAuthenticator.php | UTF-8 | 2,902 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Security;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Firebase\JWT\JWT;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;... | true |
58b354e783f3ad9b839065d0b14511382de6b22c | PHP | fancyproject/example-framework | /src/DependencyInjection/Container.php | UTF-8 | 2,482 | 2.796875 | 3 | [] | no_license | <?php namespace Framework\Core\DependencyInjection;
use InvalidArgumentException;
class Container
{
private $container;
/**
* @param string $class
* @return ContainerItem
*/
protected function getContainerItem($class)
{
if (!isset($this->container[$class])) {
$refle... | true |
d180c17fb792749fb6967b6229f5c286b4a00ce9 | PHP | dev-ab/Timezone | /app/Http/Controllers/AuthController.php | UTF-8 | 2,651 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests;
use Illuminate\Http\Request;
use JWTAuth;
use Auth;
use Validator;
class AuthController extends Controller {
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct() {
$this->middleware(... | true |
13daaed25d65c77beddfb18d6c09478fbda2da99 | PHP | ssabate/IntroPhp | /IntroPhp/Cotxe.php | UTF-8 | 4,728 | 3.1875 | 3 | [] | no_license | <?php
class Cotxe
{
//Propietat estàtica <-- no s'ha de posar!!!!!
public static $propEstatica=7;
//Constructor
public function __construct($marca=null, $model=null){
if($marca) $this->marca=$marca;
if($model) $this->model=$model;
}
//Destructor
public function __destru... | true |
31e2b147970a70f3efdb80fd7f2cef810b013c4b | PHP | matoro183/Database-API | /delete.php | UTF-8 | 862 | 2.578125 | 3 | [] | no_license | <?php
error_reporting(0);
ini_set('display_errors', 0); // Do not display errors
$user = filter_var($_GET["user"]);
$secret_key = filter_var($_GET["secretkey"]);
$table = filter_var($_GET["table"]);
$conditions = filter_var($_GET["conditions"]);
if ($user == NULL || $secret_key == NULL || $table == NULL ... | true |
0979af140c0ec1eb1cf806b2f9adf0d8df573f7b | PHP | Totengeist/IVParsers | /src/TheLastStarship/ShipFile.php | UTF-8 | 9,960 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Classes necessary for processing a `.ship` file.
*/
namespace Totengeist\IVParser\TheLastStarship;
use Totengeist\IVParser\Exception\InvalidFileException;
use Totengeist\IVParser\IVFile;
class ShipFile extends IVFile {
protected static $REQUIRED_SECTIONS = array('Habitation');
/**
* The t... | true |
7d9100911f01d06fc263ecbf9644c95986acb0b3 | PHP | kuai6/zend-event-bus-module | /src/Message/Hydrator/Strategy/Factory.php | UTF-8 | 2,774 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kuai6\EventBus\Module\Message\Hydrator\Strategy;
use Kuai6\EventBus\Module\Message\Hydrator\Exception\BadMethodCallException;
use Kuai6\EventBus\Module\Message\Hydrator\Exception\RuntimeException;
use Zend\Hydrator\Strategy\StrategyInterface;
/**
* Class Factory
* @package Kuai6\EventBus\Module\Mes... | true |
1c451f2fc3b08b978c3aa79100006afcf2f337b5 | PHP | maxprofs-llcio/Repo | /Flipper/EPC/test.europinball.com/classes/html/check.class.php | UTF-8 | 869 | 2.765625 | 3 | [] | no_license | <?php
class check extends input {
public function __construct($name = NULL, $value = NULL, $type = 'checkbox', $checked = FALSE, array $params = NULL) {
$params['name'] = ($name) ? $name : (($params['name']) ? $params['name'] : $value);
$params['id'] = ($params['id']) ? $params['id'] : $na... | true |
61220bdfa22e4cee6c2535e07fbb23aef14963b5 | PHP | natsuta/SEPMCoffeeBuzz | /staff.php | UTF-8 | 501 | 2.578125 | 3 | [] | no_license | <?php
include_once('header.php');
?>
<title>Staff List</title>
<body>
<div>
<?php
while($row = $ret->fetchArray(SQLITE3_ASSOC) )
{
echo "<ul class='center'>NAME : ". $row['firstname'] ."</ul>";
echo "<li class='center'>Phone : ". $row['work_phone'] ."</li>";
... | true |
3fbffe62c5938f51cbe698c4c98356e505b7e3ad | PHP | symfony/symfony | /src/Symfony/Component/DependencyInjection/Attribute/AutowireCallable.php | UTF-8 | 1,855 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Attribute;
use Symfony\Component\... | true |
65732733095e9d812ba1749f9041e1e494b8fbf4 | PHP | Mufasah9/sekolah | /app/Models/TahunModel.php | UTF-8 | 444 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use CodeIgniter\Model;
class TahunModel extends Model
{
protected $table = 'tahun';
protected $primaryKey = 'id_tahun';
protected $useTimestamps = true;
protected $allowedFields = ['id_tahun', 'tahun'];
public function __construct()
{
$this->db = db_connect... | true |
cc68fd4f5147e4cbb8cbf5b7718c83d55236d01f | PHP | AbdullahAlqudiry/LaraProtectId | /src/Traits/LaraProtectId.php | UTF-8 | 1,892 | 2.671875 | 3 | [] | no_license | <?php
namespace Alqudiry\LaraProtectId\Traits;
use Alqudiry\LaraProtectId\LuhnAlgorithm;
trait LaraProtectId {
/**
* Retrieve the model for a bound value.
*
* @param mixed $value
* @param string|null $field
* @return \Illuminate\Database\Eloquent\Model|null
*/
public functi... | true |
fd8f405d6d9314701bebf5994b773ed70eb8f310 | PHP | Maksimus77/CodeThisCodeThat | /Let's Code/StopWatch/php/io.php | UTF-8 | 521 | 3.125 | 3 | [] | no_license | <?php
$time = $_REQUEST["time"];
$myfile = fopen("../data.txt", "a") or die("Unable to open file!");
fwrite($myfile, "End time: ".$time." seconds \n");
$l = getIfSet($_REQUEST["l0"]);
$index = 0;
while(!empty($l)){
fwrite($myfile, "Laps ".$index.": ".$l." seconds \n");
$index = $index + 1;
$l = ... | true |
1ca423b6ff4e1c0d8dd584b1ccb904398e341ebd | PHP | tim-3bc7s8/TempMonitor | /tempmonitor-web/php/getTempCsv.php | UTF-8 | 5,104 | 3.046875 | 3 | [] | no_license | <?php
/***************************************************************
getTempCsv.php
Part of the TempMonitor project
This script builds a CSV file from sensor data
stored in the database.
****************************************************************/
/******************************************************... | true |
9456f4dd1f5eb2a5a081d6975c92cd39375c6cb2 | PHP | Shafqat5/Haidre | /index.php | UTF-8 | 2,669 | 2.625 | 3 | [] | no_license | <?php
include 'db.php';
$result="";
if (isset($_POST['submit'])) {
$name = test_input($_POST['name']);
$email =test_input( $_POST['email']);
$city =test_input( $_POST['city']);
$phone = test_input($_POST['phone']);
}
$sql="INSERT INTO data(name,email,city,phone)VALUES('$name','$email','$city','$phone'";... | true |
63f1ee523457c4299e92a2ef44e4ce67c8eb1f93 | PHP | gregoryduckworth/sloot-ainoga | /database/seeds/MineTableSeeder.php | UTF-8 | 372 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Mine;
use Illuminate\Database\Seeder;
class MineTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$mines = ['copper', 'tin'];
foreach ($mines as $mine) {
Mine::insert([
... | true |
56c1be3a92ab2c99b508864923ee9b1f4c184d6b | PHP | rodymolenaar/oop | /app/Services/Middleware/MiddlewareManager.php | UTF-8 | 1,609 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Middleware;
use Symfony\Component\HttpFoundation\Request;
class MiddlewareManager
{
protected $middleware = [
\App\Middleware\CaptureIntendedUrl::class,
\App\Middleware\CaptureOldInput::class,
\App\Middleware\GenerateCsrfToken::class,
\App\Middleware\V... | true |
b30e52488a1b43e4c12f2c638a29b20888320cc7 | PHP | Smahrt/jicadc | /app/models.php | UTF-8 | 580 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
include('config.php');
function showNumRows($table){
global $dbh;
$query ="SELECT * from $table";
$result = $dbh->query($query);
$num = $result->rowcount($result);
echo $num;
}
function getRows($table, $thisCol, $thatCol){
global $dbh;
if( ($thisCol == NULL)&&($tha... | true |
d3027bee9ed1f35adb566382e2484f9b467b151a | PHP | NielsRoels/SecretSanta | /src/Intracto/SecretSantaBundle/Entity/EntryService.php | UTF-8 | 1,236 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"ISC"
] | permissive | <?php
namespace Intracto\SecretSantaBundle\Entity;
use Doctrine\ORM\EntityManager;
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Templating\EngineInterface;
/**
* @DI\Service("intracto_secret_santa.entry_service")
*/
class EntryService
{
/*... | true |
54925cea83272e1ca4178bdb63fabb0529be620c | PHP | CosminIorga/Equinox | /app/Factories/ColumnFactory.php | UTF-8 | 1,040 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chase
* Date: 11/09/17
* Time: 12:40
*/
namespace Equinox\Factories;
use Equinox\Definitions\Columns;
use Equinox\Exceptions\FactoryException;
use Equinox\Models\Column;
use Equinox\Models\ColumnTypes\HashColumn;
use Equinox\Models\ColumnTypes\PivotColumn;
use Equinox\Mo... | true |
0f76567551508a8d55388900d100d231b59347d7 | PHP | solejar/traffic_ru_ece | /filezilla/php/map_communicator.php | UTF-8 | 3,849 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
// struct for the steps
class routeStep {
public $stLat;
public $stLng;
public $ndLat;
public $ndLng;
public $rdName;
}
//hello I'm a little map communicator
function get_route($my_location){
$route_start = $my_location[0];
$route_end = $my_location[1];
$loc_api_key = AIzaSyBFu... | true |
00e852538f8694676168f5f7a9f4e17fe38c022f | PHP | fox67rus/SimpleEngine | /Model/User.php | UTF-8 | 468 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: apryakhin
* Date: 06.06.2016
* Time: 11:08
*/
namespace SimpleEngine\Model;
use SimpleEngine\Controller\DatabaseController;
class User
{
protected $id;
protected $name;
public function __construct($id = null)
{
$this->id = 1;
$this->name... | true |
87f1f05f5c31254995f263e2e5b10d92e6de7bd7 | PHP | robclm/Curso-PHP-MySQL | /archivos a bbdd/leer archivo bbdd.php | UTF-8 | 913 | 2.859375 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
</head>
<body>
<?php
$Id="";
$contenido="";
$tipo="";
require("datos_conexion.php");
$conexion=mysqli_connect($db_host,$db_usuario,$db_contra);
if(mysqli_connect_errno()){
echo "Fallo al co... | true |
e52a843a46edadb612d0123daa34db877a2495fb | PHP | Lich2013/Date_backend | /Application/Home/Model/UsersModel.class.php | UTF-8 | 635 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* By:Orange-W
* 自定义数据表
*/
namespace Home\Model;
use Think\Model;
class UsersModel extends Model {
protected $autoCheckFields = false;
protected $tableInfo= [
'info' => ['title'=>'用户信息修改','detail'=>'在这里你可以修改所有用户数据信息'],
'table'=>'users',
'order' => 'users.id',
'field' => 'users.id, grade.id as 成绩I... | true |
8aaa3839af027fc0fd6636f8a09020165e2faf60 | PHP | WsdlToPhp/PackageOvh | /src/StructType/DedicatedNetworkStruct.php | UTF-8 | 10,092 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ovh\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for dedicatedNetworkStruct StructType
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class DedicatedNetworkStruct extends AbstractStructBase
{
/**
* The type
* @var string
... | true |
9c3abf93ca0f3346922fb55638209628779f0a6a | PHP | gestorideas/inove | /modules/modIdeas/controller/controllerListIdeas.php | UTF-8 | 2,579 | 2.875 | 3 | [] | no_license | <?php
//..........................................................................
// Genera el listado de ideas asociadas a un autor en particular, le da el
// formato de salida HTML, y le devuelve al dashboard para visualizar
//............................................................................. | true |
9a85b622fafda4897934965bd67f8a4708f1469f | PHP | jarick/bx | /src/BX/Mutex/MutexManager.php | UTF-8 | 2,025 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php namespace BX\Mutex;
use BX\Base\Dictionary;
use BX\Config\Config;
use BX\Mutex\Adaptor\IMutexAdaptor;
use BX\Mutex\Adaptor\SystemMutex;
use BX\Mutex\Entity\MutexEntity;
class MutexManager #implements IMutexManager
{
use \BX\String\StringTrait;
/**
* @var Dictionary
*/
private $dictionary;
/**
* @var IM... | true |
74bdf1bc1d3525fe93d9de8d1b7e83307894588d | PHP | Davi-o/teste-contato-seguro | /api/service/Connection.php | UTF-8 | 907 | 3.1875 | 3 | [] | no_license | <?php
namespace Service;
use Connection\DatabaseConfiguration;
use PDO;
/**
* Class Connection
* @package Service
*/
class Connection extends PDO
{
/**
* @var PDO
*/
protected static PDO $connection;
/**
* Connection constructor.
* @param $dsn
* @param null $username
* @... | true |
c56282ced1a3c8eae81b23d5e3b81ca409eb05b9 | PHP | wicky4github/design-pattern-php | /demo/package/Interpreter/ExpressionFactory.php | UTF-8 | 1,222 | 2.96875 | 3 | [] | no_license | <?php
namespace package\Interpreter;
class ExpressionFactory
{
private static $expressions = [];
/**
* @param $key
* @return Expression
* @throws \Exception
*/
public static function getExpression($key)
{
switch ($key) {
case "O":
$expression = ... | true |
9374ea9ca947e53d0c19594214fa61206cf4559a | PHP | ddindu/ddindu-s-php | /php/php/connmysql_1.php | UTF-8 | 559 | 2.578125 | 3 | [] | no_license | <html>
<head> <meta charset="utf-8"/> </head>
<?php
$host="localhost";
$user='root';
$pw="apmsetup";
$dbName='sqldb';
$mysql=mysqli_connect($host,$user,$pw,$dbName);
$sql="insert into 구매테이블(num,userID,prodName,category,price,amount)";
$sql.="value('13','asd','0102','kse',... | true |
e6d4064ee9738b633f3d01b58e3eaa24065b6a6e | PHP | nikhilshakohi/socialweb | /comments.php | UTF-8 | 2,410 | 2.5625 | 3 | [] | no_license | <?php
include_once "header.php";
include_once "dbh.php";
if (isset($_POST['submitcomments'])) {
$imageidnum = $_POST['imageid'];
$message = $_POST['comment'];
$date = $_POST['date'];
$uid = $_POST['usernum'];
$firstname = $_SESSION['u_first'];
$lastname = $_SESSION['u_last'];
$fullname = ucfir... | true |
9cdca9c4717c78281a1f736520416029cb3c65d7 | PHP | kmishita/GradCafe | /insert.php | UTF-8 | 1,648 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<body>
<div class="center" style="margin-top:5%;">
<?php
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "Jaisairam.16", "JobPortal");
// Check connection... | true |
0b2b44a4fccff51ad5bbc95181315b44a28cacc5 | PHP | laczaroli/rcoin | /src/KeyStore.php | UTF-8 | 918 | 2.859375 | 3 | [] | no_license | <?php
namespace App;
class KeyStore {
private $res;
private function createKeys() {
$config = ["digest_alg" => "sha256",
"private_key_bits" => 4096,
"private_key_type" => OPENSSL_KEYTYPE_RSA];
return $this->res ?? $this->res = openssl_pkey_new($config);... | true |
4b07cc6b86ed1a962312223a12a70d4ea1fc2ba0 | PHP | moosabukhamsin/sensor | /app/Console/Commands/ReadDoor.php | UTF-8 | 1,444 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Notification;
use App\Repositories\DoorReading\DoorReadingRepositoryInterface;
use App\Notifications\DoorOpen;
class ReadDoor extends Command
{
/**
* The name and signature of the console command.
*
... | true |
b9f87cb15bbbf65a13a0f1d7d424d54eee56592b | PHP | EmballePese/PI | /Model/m_g_categorie.php | UTF-8 | 613 | 2.71875 | 3 | [] | no_license | <?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=emballe_pese;charset=utf8', 'root', 'MonMySQL');
}
catch (Exception $e)
{
die('Erreur : '. $e->POSTMessage());
}
$recov = $bdd->query('SELECT * FROM Type');
$exist =false;
while ($donnees = $recov->fetch()){
if(strtolower($cat) == strtolower($do... | true |
658ed0c8837213fbf96de33c88379d72bd96ff9b | PHP | rcardosoo/Academico | /Programação web I/Projeto final - Filmes/src/control/filme/ControlerFilme.php | UTF-8 | 3,042 | 2.625 | 3 | [] | no_license | <?php
namespace app\control\filme;
class ControlerFilme {
public function listarTodos() {
$daofilme = new \app\model\filme\DAOfilme();
$filmes = $daofilme->listar();
if (!empty($filmes)) {
# como passar a variavel post
$_SESSION["filmes"]=$filmes;
header("Location:?do=paineladm");
} else... | true |
adb4bd2090b41a3c1d84179c7987f74d5b9b87bc | PHP | Ram2507/7am | /block.php | UTF-8 | 270 | 2.890625 | 3 | [] | no_license | <?php
$m=10;
if($m>=90)
{
echo "Grade A";
}
else if($m>=80)
{
echo "Grade B";
}
else if($m>=70)
{
echo "Grade C";
}
else if($m>=60)
{
echo "Grade D";
}
else
{
ECHO "Fail";
}
/*
$v=10;
$x=($v==1)? 'Yes': 'No';
echo $x;
//(condition)? true block : false block;
*/
?>
| true |
9c0efb2e5820c000adffb78e295a17f57208d8af | PHP | LemahieuL/LabelBulle | /src/App/Views/ViewsExceptions.php | UTF-8 | 359 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Views;
/**
* Fait appelle a la classe php Exception
*/
class ViewsExceptions extends \Exception {
/**
* Affichages des erreurs lier aux vues.
* @param string $message
*/
public function __construct($message) {
parent::__construct($message);
}
public funct... | true |
4f2cfb89bb418a14e5ad2524c6b7f6bbf4cc6694 | PHP | otsenguun/Laravel_DragAndDrop | /app/Mail/messageSent.php | UTF-8 | 1,134 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class messageSent extends Mailable
{
use Queueable, SerializesModels;
/**
* The order instance.
*
* @var Order
*/
p... | true |
0f6ed33bca15965e34976a37d475bf40452c6f22 | PHP | Azierz/KH3-Re-Mind-Speedrun-Event | /logout.php | UTF-8 | 317 | 2.515625 | 3 | [] | no_license | <?php
session_start(); // Access the existing session.
// Cancel the session:
$_SESSION = array(); // Clear the variables.
session_destroy(); // Destroy the session itself.
setcookie ('PHPSESSID', '', time()-3600, '/', '', 0, 0); // Destroy the cookie.
// Redirect user to home page
header("Location:index.php");
?> | true |
324973a83cfe44282320f22ecb3324cb096f5e90 | PHP | ellman121/SchoolworkArchive | /CSC_468_Graphical_User_Interfaces/Course Advising Web Page/php/parseClasses.php | UTF-8 | 6,542 | 3.0625 | 3 | [] | no_license | <?php
/*=====================================================================
file: classEntry.php
Description: This file loads in the course database and provides the functions
necessary to parse it.
Author: Elliott Rarden
======================================================================*/
require_once "req... | true |
c719f53757c160e767408233506bd781ba73c654 | PHP | tony-tran/en-marche.fr | /src/Controller/Api/ScopeTrait.php | UTF-8 | 692 | 2.578125 | 3 | [
"GPL-3.0-only",
"Apache-2.0"
] | permissive | <?php
namespace App\Controller\Api;
use App\Entity\Adherent;
use App\Scope\Exception\NotFoundScopeGeneratorException;
use App\Scope\GeneralScopeGenerator;
use App\Scope\Scope;
trait ScopeTrait
{
/** @var GeneralScopeGenerator */
protected $generalScopeGenerator;
protected function getScope(string $scope... | true |
e04abae793b984d5b74fed47711836e1d35d792e | PHP | Daplar/Wyes-Production | /Controllers/Controller_user.php | UTF-8 | 2,126 | 2.734375 | 3 | [] | no_license | <?php
class Controller_user extends Controller
{
public function action_form_create(){
$this->render('form_create',[]);
}
public function verification_create($infos){
//echo ('dans verif');
if( (!isset($infos['name'])) or !preg_match("/^([a-zA-Z' ]+)$/",$infos["name"])){
//echo('pas de qté');
... | true |
97da8670ddeeb4a36be3eccb963a5edbbfcaa084 | PHP | anthony-reboli/runtrack4 | /bigjob/include/admin/staff.php | UTF-8 | 703 | 2.609375 | 3 | [] | no_license | <?php
echo"<div id='contadminstaff' class='col-3'>";
echo"<h1>Le staff</h1>";
$requete2="SELECT nom,prenom,rank FROM `utilisateurs` WHERE rank='admin' OR rank='modo'";
$requete2Q=mysqli_query($connexion,$requete2);
while($data2= mysqli_fetch_assoc($requete2Q))
{
$i=0... | true |
4ccf02a58cabd58e473878abc0e4bd99033fc66e | PHP | leelcn/show | /module/Application/src/Application/Service/PasswordService.php | UTF-8 | 786 | 2.53125 | 3 | [] | no_license | <?php
namespace Application\Service;
use GoalioForgotPassword\Service\Password;
use SharengoCore\Entity\Customers;
class PasswordService extends Password
{
/**
* @param $password
* @param Customers $user
* @param array $data
*
* @return bool
*/
public function resetP... | true |
de3606a3d19534a93013fad8a7606f5c1235b291 | PHP | DhirajAswani/AutomaticQuestionPaperGenerator | /Admin/create_group_process.php | UTF-8 | 1,250 | 2.5625 | 3 | [] | no_license | <?php
//echo "insave padge";
include_once("../includes/db.php");
session_start();
global $connection;
if(isset($_POST['create_group'])){
$group_name = $_POST['group_name'];
$branch_id = $_POST['branch_id'];
echo $group_name;
$query = "insert into group_name (group_name,branch_id... | true |
a13983dc5a32a72aa9ee0828ef9268cd444f3971 | PHP | fangface/yii2-concord | /src/validators/StrengthValidator.php | UTF-8 | 5,221 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the fangface/yii2-concord package
*
* For the full copyright and license information, please view
* the file LICENSE.md that was distributed with this source code.
*
* @package fangface/yii2-concord
* @author Fangface <dev@fangface.net>
* @copyright Copyright (c) 2014 Fangface <... | true |
ec50ad73c6bd5b422c080a93b8e98e9d7ae81d36 | PHP | vansante/genericproxy | /filesystem/usr/local/lib/genericproxy/User.php | UTF-8 | 8,361 | 2.828125 | 3 | [] | no_license | <?php
/*
All rights reserved.
Copyright (C) 2009-2010 GenericProxy <feedback@genericproxy.org>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the ab... | true |
422fdb3a02e6e84533ccb1bc227b9eab6083a742 | PHP | wesmaffazzolli/schoolproject | /admin/pages/listar_timeline.php | UTF-8 | 4,950 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
if(isset($_GET['source'])) {
?>
<div class="panel panel-default">
<div class="panel-heading">
Lista de histórias da Timeline
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered tabl... | true |
159b8985283a689d9fd003be1a4ae90d00082ac8 | PHP | alex-yashin/php-simple-lisp | /src/Functions/CondFunction.php | UTF-8 | 372 | 2.734375 | 3 | [] | no_license | <?php
namespace SimpleLisp\Functions;
class CondFunction implements FunctionInterface
{
public function run($context, $params)
{
while ($branch = array_shift($params)) {
list($cond, $stat) = $branch;
if ($context->calc($cond)) {
return $context->calc($stat);
... | true |
99f51d48309907051fcc25acd210bd14fa55a804 | PHP | nerea91/laravel | /app/Console/Commands/SetupCommand.php | UTF-8 | 2,123 | 2.8125 | 3 | [] | no_license | <?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class SetupCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'setup';
/**
* The console command description.
*
* @var string
*/
prote... | true |
65ffb3ec050defa237d3459afde92f33f56e0cbe | PHP | Iopi/WEB_SP | /SP_WEB_Prucha_1.5/app/model/upload-mod.php | UTF-8 | 2,907 | 2.59375 | 3 | [] | no_license | <!-- nahrání příspěcku a uložení pdf souboru do složky uploads -->
<?php
session_start();
include_once '../model/dbh.php';
$target_dir = 'G:\SP_WEB_Prucha_1.5\uploads/';
$target_file = $target_dir . basename($_FILES["file"]["name"]);
$fileSize = $_FILES['file']['size'];
$fileTmpName = $_FILES['file']['tm... | true |
0a229e44b5ac5b2f6c984d216a454a89ca70a47f | PHP | Alpakash/PHP | /01-SchoolTerm1-Boardgame v1.0/core/database/QueryBuilder.php | UTF-8 | 2,112 | 3.5 | 4 | [] | no_license | <?php
/**
* Created by: Veggiecoder - Akash 2018
* phpoop
*/
class QueryBuilder
{
protected $pdo;
/**
* @inheritDoc
*/
public function __construct(PDO $pdo)
{
$this->pdo = $pdo;
}
public function selectAll($table, $intoClass)
{
/**
* @var $statement a... | true |
1ab2edeac56603ef3e8ed2e7988e9d53eea1d512 | PHP | damongolding/Perch-resources | /ui/region display state/regionDisplayIndicator.php | UTF-8 | 1,543 | 2.546875 | 3 | [] | no_license | <?php
$createMarkUp = "<script type='text/javascript'>";
$createMarkUp .= "$('.inner table thead tr th:first').after('<th>Is region displayed on page?</th>');"; // Create header cell
$createMarkUp .= "$('.inner table tbody tr').each(function(){";
$createMarkUp .= "$(this).find('td:first').after('<td class=\"isLive\">... | true |
52798afb4174f8983b4b341371b64dc0b766c3a7 | PHP | roycan/trainingCRM | /main/updateCompany.php | UTF-8 | 2,192 | 2.625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<script>
/*
* File: updateCompany.php
* By: Roy Canseco
* Date: 27 Sep 2018
*
* This script takes the edits from editCompanyForm.php and saves it to the DB
*
*=====================================
*/
</script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" hr... | true |
97d828a8ac90b7612a18b42e7aff9023f133cc40 | PHP | achal0309/php | /Gettype.php | UTF-8 | 156 | 2.921875 | 3 | [] | no_license | <?php
echo"<h1>PHP</h1>";
$var1 = 14;
echo gettype($var1);
$var2 = "Hello";
echo gettype($var2);
$var3 = 23.56;
echo gettype($var3);
echo $var2.$var1;
?>
| true |
5fa88685b1f6a10d79b3a303bb3fb32b3d481996 | PHP | Wathis/PhotographSymfony | /src/Entity/Album.php | UTF-8 | 2,354 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\AlbumRepository")
*/
class Album
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/... | true |
b334cbfa14a3e9c38ebaa949f39739e9cf01dc6f | PHP | easymagic/R2-Wordpress | /base/libs/request.php | UTF-8 | 1,028 | 2.828125 | 3 | [] | no_license | <?php
class request extends container{
private $bucket;
function __construct(&$app){
parent::__construct($app);
$this->bucket =& $_REQUEST;
}
function __get($k){
if (isset($this->bucket[$k])){
return $this->bucket[$k];
}else{
return '';
}
}
function __set($k,$v){
$this... | true |
9926f94149a216fb8b9c0babe72cd066e2d5990b | PHP | zacharyasmith/navsonline | /application/models/Media_model.php | UTF-8 | 2,033 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Media_model extends MY_Model {
public $organization_id;
public function __construct() {
// Call the CI_Model constructor
parent::__construct();
$this->organization_id = $this->session->userdata('organization... | true |
e758e0bf6c69b43526c686aaf588b2fa265e0c8d | PHP | jrliller/previdencia | /login_submit.php | UTF-8 | 286 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include 'pensioner.class.php';
$pensioner = new Pensioner();
if(isset($_POST['user'])){
$user = addslashes($_POST['user']);
$senha = addslashes($_POST['senha']);
$pensioner->loginUser($user, $senha);
header("Location: index.php");
}
?> | true |
e5ec1bd94c4a0014dbc819c52638f6e1129c151e | PHP | my-minimarket/my-minimarket | /app/Policies/PostPolicy.php | UTF-8 | 1,940 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\Customer;
use Illuminate\Auth\Access\HandlesAuthorization;
class PostPolicy
{
use HandlesAuthorization;
public function before(Customer $customer, $ability) {
if($customer->isAdmin()) {
return true;
}
}
/**
* Determine whether th... | true |
162d83b30236581e6645b3e24df3ca3db55508de | PHP | pbarsale/gamify | /App/Controllers/Signup.php | UTF-8 | 2,314 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use \Core\View;
use \App\Models\User;
use \App\Flash;
/**
* Signup controller
*
* PHP version 7.0
*/
class Signup extends \Core\Controller
{
/**
* Show the signup page
*
* @return void
*/
public function newAction(){
View::renderTemplate('Signup/n... | true |
b602f4fe61ebcd2a3629719ceda3a12fda87c80e | PHP | villaflor/Wecreu | /tools/categoryTest.php | UTF-8 | 1,629 | 2.8125 | 3 | [] | no_license | <?php
include_once('category.php');
include_once("sql.php");
$db = Database::getInstance();
//create an object
$category = new Category($db,3);
// add one
if ($category->add("testing name", "tesing description")){
echo "add #1 success<br>";
}else{
echo "add #1 f... | true |
b62c2eb9192d0917a9c81ba42cd70e61ceeb40d1 | PHP | gmponos/justfood | /control/imgUploadFun.php | UTF-8 | 1,726 | 2.625 | 3 | [] | no_license | <?php
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
function ImageUpload($image_name,$image_temp,$directory,$Lwidth,$Swidth)
{
if($image_name)
{
$filename = stripslashes... | true |
9daef1b7802116229583795282acff16a8bc7f3c | PHP | sachitha2/cmi | /en/admin/html/subPages/salesViewToday.php | UTF-8 | 1,821 | 2.515625 | 3 | [] | no_license | <?php
require_once("../db.php");
require_once("../../methods/DB.class.php");
require_once("../../methods/Main.class.php");
$main = new Main;
$DB = new DB;
$DB->conn = $conn;?>
<?php $main->b("sales.php") ?>
<?php
if($DB->nRow("purchaseditems","where date = curdate()"," DISTINCT dealid , cc") != 0){ ?>
<table cl... | true |
26a0d186bf63b5c724826675178192322d90443f | PHP | h4mpy/sync.payments | /local/modules/inteolocal.zabava/lib/deal.php | UTF-8 | 2,293 | 2.6875 | 3 | [] | no_license | <?php
namespace Inteolocal\Zabava;
use Bitrix\Main\ArgumentException;
use Bitrix\Main\Web\Json;
/**
* Class Deal
* @package Inteolocal\Zabava
*/
class Deal
{
/**
* Метод создает сделку в Б24 и возвращает id созданной сделки.
* @param array $fields Массив полей для метода crm.deal.add
* @param bool $addEv... | true |
26dfbf8f85b511f88238b2e6ccf77eb85c60217e | PHP | arisdevx/epermit | /app/Http/Requests/RegisterAccountRequest.php | UTF-8 | 2,723 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RegisterAccountRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
f347dd8bc971ea29c5754d6aa7ef58203c5dfa4a | PHP | chrisfarnsvt/GradeQuest | /fighthistory.php | UTF-8 | 1,609 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Previous Fights</title>
<link rel="stylesheet" type="text/css" href="final.css">
</head>
<body>
<h3>Let us reflect on the skirmishes of yore...</h3>
<div class='scroll_table'><table class='scroll_table_width'>
<tr><th>Player</th><th>Foe</th><th>Win?</th></tr>
<?php
... | true |
b18946f0041799ecf6fa5a28ab7008f2bc7a47ac | PHP | ayuberlianda/tugas2_php | /tugas2.php | UTF-8 | 867 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$menu1 = "Cireng";
$menu2 = "Es Duren";
$menu3 = "Es Milo";
$menu4 = "Es Teh";
$menu5 = "Piscok";
$harga1 = "Rp 1000";
$harga2 = "RP 15000";
$harga3 = "Rp 20000";
$harga4 = "Rp 5000";
$harga5 = "Rp 1000";
echo"<h1>DAFT... | true |
332b59628870fef9f5f82ad7bf29bb9cdc60e832 | PHP | munxar/playground-plugin | /updates/builder_table_create_jazz_playground_files.php | UTF-8 | 568 | 2.53125 | 3 | [] | no_license | <?php namespace Jazz\Playground\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateJazzPlaygroundFiles extends Migration
{
public function up()
{
Schema::create('jazz_playground_files', function($table)
{
$table->engine = 'InnoDB';
... | true |
039f739d97273966a5901bcdeda7307525abb48f | PHP | marmozist/steam-gifts | /src/UseCase/GetGiveaway/Interactor.php | UTF-8 | 751 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Marmozist\SteamGifts\UseCase\GetGiveaway;
use Marmozist\SteamGifts\Component\Giveaway\Giveaway;
/**
* @link http://github.com/marmozist/steam-gifts
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
* @author Andrey Gotmanov <got... | true |
83aeceee6f852219af49b23bc926eca534203206 | PHP | sounboul/symfony-constraints | /src/Validator/Constraints/PhoneValidator.php | UTF-8 | 977 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Dbout\SfConstraints\Validator\Constraints;
use Symfony\Component\Validator\{Constraint, ConstraintValidator};
/**
* Class PhoneValidator
*
* @package Dbout\SfConstraints\Validator\Constraints
*
* @author Dimitri BOUTEILLE <bonjour@dimitri-bouteille.fr>
* @link https://github.com/dim... | true |
bd34bd0e3b9d776018ee6dace054a3d3812243b9 | PHP | CyberusNetwork/- | /var/www/htdocs/admin/dns/model/DnsModel.php | UTF-8 | 1,870 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: adrienthibault
* Date: 24/08/2014
* Time: 13:58
*/
// Model DNS --> Storing and data backup of table DNS
class DnsModel {
// Attributes
private $db_access_admin;
private $datas_dns;
// Functions
function __construct()
{
// Connexion - D... | true |
2f7a6d55686d6128536bb6a1342bc4b373de0d9c | PHP | ajdoc/ajd-validation | /src/AJD_validation/Helpers/Database.php | UTF-8 | 32,411 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace AJD_validation\Helpers;
use \PDO;
use \PDOException;
use AJD_validation\Config\Config;
class Database
{
const FETCH = 'fetch';
const FETCH_ALL = 'fetchAll';
const FETCH_OBJ = 'fetchObject';
const FETCH_COL = 'fetchColumn';
const SELECT = 'select';
const TABLE = 'tab... | true |
c6f9001d0ec294ac21163d01d2a835c4ec3c88df | PHP | rkndk/InfoDosen | /session.php | UTF-8 | 761 | 2.75 | 3 | [] | no_license | <?php
// Memulai Session
session_start();
if(!isset($_SESSION['user'])||!isset($_SESSION['level'])){
header('Location: login.php');
}
else{
// Membangun Koneksi dengan Server dengan nama server, username dan password sebagai parameter
$connection = mysql_connect("localhost", "root", "");
// Seleksi Database
$db =... | true |
523f0796b52ac3cec329625a88308e6f4a55a52d | PHP | brunosusak/RNWA-TIM21 | /DZ AA - 01/rest2/index.php | UTF-8 | 4,553 | 2.828125 | 3 | [] | no_license | <?php
$valid_passwords = array ("admin" => "admin");
$valid_users = array_keys($valid_passwords);
$user = $_SERVER['PHP_AUTH_USER'];
$pass = $_SERVER['PHP_AUTH_PW'];
$validated = (in_array($user, $valid_users)) && ($pass == $valid_passwords[$user]);
if (!$validated) {
header('WWW-Authenticate: Basic realm="My Real... | true |
de370215892757845726b9cb38162bbc4a89934e | PHP | mimosafa/wp-route | /Posts.php | UTF-8 | 1,057 | 2.734375 | 3 | [] | no_license | <?php
/*
* This file is part of the mimosafa\wp-route package.
*
* (c) Toshimichi Mimoto <mimosafa@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace mimosafa\WP\Route;
/**
* @author Toshimichi M... | true |
92f39698fc683d9177b6c32c641fb8cb59e72d59 | PHP | qiwi3268/Expertise | /Lib/Singles/Helpers/PageAddress.php | UTF-8 | 1,545 | 2.875 | 3 | [] | no_license | <?php
namespace Lib\Singles\Helpers;
use core\Classes\Session;
/**
* Вспомогательный класс для работы с адресом страницы
*
*/
class PageAddress
{
/**
* Предназначен для получения дефолтных GET-параметров для навигационной страницы (/home/navigation)
*
* Параметры являются персональными для к... | true |
e797f89b9bd771ac621880c7ece04bf401710271 | PHP | mauricioprado00/Policylead_Scraper | /src/Policylead/Scraper/Parser/ArticleDate/Bundle.php | UTF-8 | 784 | 3.0625 | 3 | [] | no_license | <?php
namespace Policylead\Scraper\Parser\ArticleDate;
use Policylead\Scraper\Parser\ArticleDate as Base;
class Bundle extends Base
{
/**
* @var Base[] $parsers
*/
private $parsers = [];
/**
* @param Base $parser
* @return $this
*/
public function addParser($parser)
{
... | true |
0db5a57bb5dd9aac38f54335c33ecd754421ef50 | PHP | LumenSH/gss | /src/Command/StartServerCommand.php | UTF-8 | 1,414 | 2.75 | 3 | [] | no_license | <?php
namespace GSS\Command;
use GSS\Component\Hosting\Gameserver\Daemon;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\Symf... | true |
54d11f180f4159a916a3065ba0b9022c4514d25c | PHP | greenscar/caffeinewebdesign | /from_food/php/Site_Info_1.0/classes/Phone_Line_Type.inc | UTF-8 | 2,847 | 3.015625 | 3 | [] | no_license | <?php
require_once("DB_Mgr.inc");
class Phone_Line_Type
{
// The DB unique ID
var $id;
// The name of this type.
var $name;
// The description of this type.
var $description;
function Phone_Line_Type($id = "")
{
$this->id = $id;
}
function generate_id(... | true |
19647ba2d7d5ab14e498f1b16cc69048e49ff4fc | PHP | orapansu/Phpbasic | /oop1.php | UTF-8 | 335 | 3.546875 | 4 | [] | no_license | <?php
class car{
public $coler; //property
public function setColer ($c){
return 'Car is :'.$this->coler=$c;
}
public function sayHello (){
return 'sayHello';
}
}
$newcar=new car;
$test=$newcar->SetColer('red');
echo$test;
echo'<hr>';
echo$newcar->sayHello();
echo'<hr>';
echo$newcar->c... | true |
a560cf18d159f9e385979fef85da8e8fa7edcfaa | PHP | hopehomehealth/mokuai | /yuancode/yydb/1yyg225/system/model/page.php | UTF-8 | 8,765 | 2.546875 | 3 | [] | no_license | <?php
/*
* ---------------------------------------------------------------------
* 分页类
* @author lowxp modified
* ---------------------------------------------------------------------
* 调用示例
* $this->load->load->model('page');
* $this->page->set_vars(array(
* 'url'=>' title="第{num}页" onclick="quote.subm... | true |
61c154c051a329835da49740d542d1f681a41df4 | PHP | chantelledmello/e2 | /practice/susan/process.php | UTF-8 | 355 | 2.6875 | 3 | [] | no_license | <?php
session_start();
$winner = null;
$coin = ['heads', 'tails'];
$choice = $_GET['choice'];
$flip = $coin[rand(0, 1)];
if ($choice == $flip) {
$winner = true;
} else {
$winner = false;
}
$results = [
'winner' => $winner,
'flip' => $flip,
'choice' => $choice,
];
$_SESSION['results'] = $result... | true |
7e5ebed7ac6b0a45a3e72d41a9cc7d7921f26206 | PHP | NguyenHuuDuc1006/NguyenHuuDuc1006.github.io | /application/default/models/orderDetail.php | UTF-8 | 1,800 | 2.90625 | 3 | [] | no_license | <?php
class Default_Models_OrderDetail {
public $orderDetailID;
public $orderID;
public $productID;
public $quantity;
public $price;
private $con = null;
public function __construct($db) {
$this->con = $db;
}
public function addOrderDetail() {
$query = "INSERT INTO... | true |
68504f325ac4eb4961531e3c2efabf66630bcda5 | PHP | hugowetterberg/php-class-parser | /ClassParser.php | UTF-8 | 3,528 | 2.890625 | 3 | [] | no_license | <?php
class ClassParser {
private $classes = array();
private $extends = array();
private $implements = array();
const STATE_CLASS_HEAD = 100001;
const STATE_FUNCTION_HEAD = 100002;
public function getClasses() {
return $this->classes;
}
public function getClassesImplementing($interface) {
$... | true |
4e8b31b6b0cf0185ea8d38b9f1f8a9f03604fca5 | PHP | Dev-Pledge/API | /src/Application/Service/PledgeService.php | UTF-8 | 4,717 | 2.921875 | 3 | [] | no_license | <?php
namespace DevPledge\Application\Service;
use DevPledge\Application\Events\CreatedDomainEvent;
use DevPledge\Application\Events\DeletedDomainEvent;
use DevPledge\Application\Events\UpdatedDomainEvent;
use DevPledge\Application\Factory\PledgeFactory;
use DevPledge\Application\Repository\PledgeRepository;
use De... | true |
a83317f7fd98ae1bc168a03cd4c6779f6a013d8a | PHP | AndreiTusinean/Projects | /PHP+SQL/site cu elemente de baza SQL/colocviu_final_Tusinean_Andrei/colocviu_final/3_a.php | UTF-8 | 1,533 | 2.671875 | 3 | [] | no_license | <html>
<head>
<title>3_a</title>
</head>
<body background="img-13.jpg">
<p ><font size=6>Subiectul 8</p> </font>
<table bgcolor="#FFFFFF" border =1>
<tr>
<th><a href="index.php">Index Page</a></th>
<th><a href="3_a.php">Exercitiul 3 a)</a></th>
<th><a href="3_b.php">Exercitiul 3 b)</a></th>
<th><a href="4_a.php... | true |
834ceeb541e66f7782f0f113fc7b98460afc4f14 | PHP | sommerwind1998/Karteikarte-Web | /update_thema.php | UTF-8 | 911 | 2.734375 | 3 | [] | no_license | <?php
//Thema in Datenbank updaten (zu anderem Fach verschieben)
include "html_helper.php";
$thema_id = $_POST["thema"];
$fach_id = $_POST["fach"];
if (is_admin() AND is_logged_in())
{
$params = include("datenbankparameter.php");
$conn = new mysqli($params["host"], $params["username"], $params["passwor... | true |
3bedbf73dcfd9fee31bca5321968b1e2ccd55387 | PHP | jamilcse13/CSS-and-PHP-practice | /php/17file_handling.php | UTF-8 | 1,536 | 2.828125 | 3 | [] | no_license | <?php
$fonts= "verdana";
$bgcolor= "#444";
$fontcolor= "orange";
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
body{
font-family: <?php echo $fonts;?>
}
.phpcoding{
width: 900px;
margin: 0 auto;
background: <?php echo "#ddd";?>;
}
.header, .footer{
text-align: ce... | true |
3f96a9845f99a2bd8d238390ec9575a7e4fc8fe6 | PHP | georgievnikolai/takeaway-mailer | /src/app/TakeawayMailer/Message.php | UTF-8 | 1,714 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\TakeawayMailer;
use App\TakeawayMailer\Exceptions\MessageValidationException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
class Message
{
public $id;
public $reference_id;
public $subject;
p... | true |
07c35abb2653a463ec1a9903d46a7b562ff5290e | PHP | moroto/jobeet | /web/frontend/work/car.class.php | UTF-8 | 1,791 | 3.984375 | 4 | [] | no_license | <?php
interface Car
{
public function run();
public function stop();
}
interface Passenger
{
public function getIn($num);
public function getOut($num);
}
class Lexus implements Car, Passenger
{
const CAPACITY = 5;
private static $passenger = 0;
private $isRun = false;
public function run()
{
... | true |