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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9e9e2940b5946633883aa3eb224c22fbc8148cae | PHP | osler10/Final_Programacion | /modelo/Conexion.php | UTF-8 | 958 | 2.515625 | 3 | [] | no_license | <?php
require_once("../modeloAbstractoBD.php");
class Login extends modeloAbstractoBD
{
private $usuario;
private $pass;
function __construct()
{
# code...
}
public function consultar($usuario='',$pass='') {
if($usuario!=''):
$this->query = "
SELECT * FROM usuario WHERE... | true |
17bd65dea109dbc888d57df48900ef21d2913692 | PHP | NicholasZyl/chess | /spec/Domain/Rules/KingMovesSpec.php | UTF-8 | 21,126 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace spec\NicholasZyl\Chess\Domain\Rules;
use NicholasZyl\Chess\Domain\Action\Attack;
use NicholasZyl\Chess\Domain\Action\CanMoveCheck;
use NicholasZyl\Chess\Domain\Action\Exchange;
use NicholasZyl\Chess\Domain\Action\Move;
use NicholasZyl\Chess\Domain\Board;
use NicholasZyl\Chess\... | true |
5e662ac7b9b008c167b6c53ff56a2bec79e25b2b | PHP | Molinenko/prostudy | /src/Entity/Materia.php | UTF-8 | 4,945 | 2.625 | 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\MateriaRepository")
*/
class Materia
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
878760ca82f035ae58171316452ed8954f83cef2 | PHP | ahmdNafis/sporttub | /app/Console/Commands/NewsUpdate.php | UTF-8 | 1,343 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Support\Facades\DB;
use Illuminate\Console\Command;
use App\Console\Commands\InputToDB as InputToDB;
class NewsUpdate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
private $db_mongo;
prote... | true |
483c6cb358f5f4a2c7e4997d5d2f787bcfac6eec | PHP | laelatuzzahro/Sistem-Perpus | /KP/admin/anggota.php | UTF-8 | 4,288 | 2.578125 | 3 | [] | no_license | <?php include 'header.php'; ?>
<h3><span class="glyphicon glyphicon-briefcase"></span> Data Anggota </h3>
<button style="margin-bottom:20px" data-toggle="modal" data-target="#myModal" class="btn btn-info col-md-2"><span class="glyphicon glyphicon-plus"></span>Tambah Anggota</button>
<br/>
<?php
$per_hal=10;
$jumlah... | true |
19ab113354deccd4fabe84ab2b66b6ebf63e2e5e | PHP | KrivomazViacheslav/imt | /lesson05/home/hw05.php | UTF-8 | 2,038 | 3.3125 | 3 | [] | no_license | <?php
/*
* Задача 1
* Создайте функцию drawTable() или Table().
* Задайте для функции три аргумента: $col, $row, $color.
* Отрисуйте таблицу умножения 3 раза с разным цветом, вызывая свою функцию с произвольными параметрами.
*/
echo '<h1>Задача 1</h1>';
function drawTable($col, $row, $color) {
echo '<table border =... | true |
b5be477b19d73a29d10e5a9eb33d82b8478cffbd | PHP | uneak/CKTemplateBundle | /Model/CKTemplate.php | UTF-8 | 820 | 2.65625 | 3 | [] | no_license | <?php
namespace Uneak\CKTemplateBundle\Model;
use Uneak\CKTemplateBundle\Model\CKTemplateInterface;
class CKTemplate implements CKTemplateInterface {
protected $title;
protected $image;
protected $description;
protected $html;
public function getTitle() {
return $this->title;
}
public function setTitle($... | true |
0c78263d64a4f561780822b2c79bfed0365d2134 | PHP | lxyda5200/css | /app/admin/repository/interfaces/IStoreCompanyInfo.php | UTF-8 | 922 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\repository\interfaces;
interface IStoreCompanyInfo
{
/**
* 审核列表
* @param $where
* @return mixed
*/
public function reviewList($where, $per_page);
/**
* 审核详情
* @param $id
* @return mixed
*/
public function reviewDetail($id);
/*... | true |
180b5fb3381e22df75c983ba5a1b825c85fb2e9b | PHP | JaxCavalera/westcoastauto-php-mysql | /code/includes/v_add_form.php | UTF-8 | 5,702 | 2.734375 | 3 | [] | no_license | <?php
$db = new db;
$add_car_error = '';
/*Create a new vehicle entry when the submit button is pressed*/
if (isset($_POST['category']) &&
isset($_POST['kilometres']) &&
isset($_POST['price']) &&
isset($_POST['manufacturer']) &&
isset($_POST['cylinders']) &&
isset($_POST['colour']) &&
isset($_POST['model... | true |
2a4d9f6a6eac108539b0129f853950f021d8c494 | PHP | elninocz/mongofill | /src/MongoCollection.php | UTF-8 | 4,689 | 2.84375 | 3 | [] | no_license | <?php
use Mongofill\Protocol;
class MongoCollection
{
/**
* @var string
*/
private $fqn;
/**
* @var string
*/
private $name;
/**
* @var MongoDB
*/
private $db;
/**
* @var MongoClient
*/
private $client;
/**
* @var Protocol
*/
... | true |
2f060b21e5ecbdbae9e3ce6a2ce86863b102add2 | PHP | Thalaaashu/rtCamp-Assignment | /check.php | UTF-8 | 1,797 | 2.796875 | 3 | [] | no_license | <?php
$error = '';
$success = '';
$connection = mysqli_connect("remotemysql.com", "G0uOzhgK2V", "3PAfLFuTsk", "G0uOzhgK2V");// connect to mysql
if(!$connection) die("Error while connecting to DB"); // if error, show it
if(!isset($_GET['token'])) { $error = "Invalid token."; goto ext; } // if didn't receive token th... | true |
225ce23dfd88e0939f14ba5df98f1a31a052fd6f | PHP | ShawnMcCool/dot-filer | /src/RepoPath.php | UTF-8 | 1,380 | 2.90625 | 3 | [] | no_license | <?php namespace DotFiler;
use DotFiler\Targets\TargetPath;
use DotFiler\Procedures\InvalidPermissions;
final class RepoPath
{
private string $repoPath;
private function __construct(string $repoPath)
{
$this->repoPath = $repoPath;
}
public function toString(): string
{
return ... | true |
c6a47e16b9ec9cf5ee6b45e96d6d63a148ac9c1f | PHP | rahulyhg/rollypolly | /tournament/admin/players.php | UTF-8 | 5,297 | 2.859375 | 3 | [] | no_license | <?php require_once('../../Connections/connChess.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "... | true |
685f618df43adadff50882d7ceb75d23ea4cc67b | PHP | bhakhri/Syenergy | /Model/GraceMarksManager.inc.php | UTF-8 | 11,199 | 2.609375 | 3 | [] | no_license | <?php
//-------------------------------------------------------
// THIS FILE IS USED FOR DB OPERATION FOR "Grace Marks" table
// Author :Jaineesh
// Created on : (28.02.2009 )
// Copyright 2008-2000: syenergy Technologies Pvt. Ltd.
//
//--------------------------------------------------------
require_once(DA_PATH . '... | true |
89a3ea8fd11635fe57365acb39da0c3cf6f917bc | PHP | nrkkalyan/open-loyalty-framework | /src/OpenLoyalty/Component/Customer/Domain/Event/CustomerWasAttachedToInvitation.php | UTF-8 | 1,048 | 2.765625 | 3 | [] | no_license | <?php
namespace OpenLoyalty\Component\Customer\Domain\Event;
use OpenLoyalty\Component\Customer\Domain\CustomerId;
use OpenLoyalty\Component\Customer\Domain\InvitationId;
/**
* Class CustomerWasAttachedToInvitation.
*/
class CustomerWasAttachedToInvitation extends InvitationEvent
{
/**
* @var CustomerId
... | true |
2f488815e4d56aa8b0bdd76122407c3c0144c4a1 | PHP | solymosi/keret | /framework/form/renderers/inputFieldRenderer.class.php | UTF-8 | 1,305 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class InputFieldRenderer extends Renderer
{
public function __construct($field, $parent = null, $params = array())
{
parent::__construct($field, $parent, $params);
if($this->getType() == "hidden")
{
$this->setParam("row", false);
}
if($this->getTyp... | true |
e0aa232b79bfea0a0a47a1361e8ec1d383a62a67 | PHP | ravindubanda/CDAP_WEBSITE | /email.php | UTF-8 | 342 | 2.546875 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])){
$n =$_POST['name'];
$e =$_POST['email'];
$m =$_POST['message'];
$to="ravindusaluwadana348@gmail";
$subject="Responce from website";
$message="I am very thankful to you";
$headers="From:ravindusaluwadana348@gmail";
if(mail($to,$subject,$message,$headers)){
echo ... | true |
e94093140b6f0d0624a3ccedd3ec71fa1e9a203d | PHP | fj-jannat/Event | /libs/class.ManageRatings.php | UTF-8 | 1,973 | 2.859375 | 3 | [] | no_license | <?php
class ManageRatings{
protected $link;
protected $db_host = 'localhost';
protected $db_name = 'property';
protected $db_user = 'root';
protected $db_pass = '';
function __construct(){
try{
$this->link = new PDO("mysql:host=$this->db_host;dbname=$this->db_name",$this->db_user,$this->db_pass);... | true |
94ed131dea5055b091798180f32e388d035de42d | PHP | orchestra-io/sample-frapi | /frapi/src/frapi/admin/application/modules/default/models/Partner.php | UTF-8 | 3,393 | 2.53125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://getfrapi.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain i... | true |
61cb15a34e157a8b893a121fbe8c9709886622ff | PHP | jclyons52/mycourse-rocks | /app/Models/Quiz.php | UTF-8 | 403 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Quiz extends Model
{
public $table = "quizzes";
public $primaryKey = "id";
public $timestamps = true;
public $fillable = [
"lesson_id",
"question",
"answer",
"false_answer1",
"false_answer2",
"false_answer3",
... | true |
3a676bed413ed07cea2df1a567a9de1a18e7db5f | PHP | ronitbasu/WWF-bmeg | /search_all_materials.php | UTF-8 | 2,309 | 2.90625 | 3 | [] | no_license |
<head>
<!-- change color while hovering over table row and set color and background for table heading -->
<style>
tr:hover {
background-color:#f5f5f5
}
th {
background-color: rgb(84,155,159);
color: white;
}
</style>
</head>
<?php
// check for failed connection
if ($mysqli->connect_errno) {
echo "Fail... | true |
2ab5164cf253dc9f7881e35e672ebebdffc3b0ac | PHP | courtney-jo/cafeFinder | /website.php | UTF-8 | 1,241 | 2.578125 | 3 | [] | no_license | <?php
include 'mydb.php';
$mysqli = NEW MySQLi('localhost', 'root', 'secret', 'cafefinder');
$result = $mysqli->query("SELECT * FROM website");
?>
<!DOCTYPE html>
{% extends "header.html" %}
{% block content %}
<html>
<body bgcolor="#995533">
<h1 align="center"><Cafe Websites</h1>
<table ... | true |
77181c79ea97419e3a9c8524eb6a4bf791961d1e | PHP | luis-17/ci_admredes | /application/core/controllers/Menu_cnt.php | UTF-8 | 396 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Menu_mdl extends CI_Model {
function Menu_mdl() {
parent::__construct(); //llamada al constructor de Model.
$this->load->database();
}
function getData() {
$doctores = $this->db->get('doctor'); //obtenemos la tabla 'doctores'. db->get('nombre_tabla') equivale a SELECT * FROM nombre_tabla.
return... | true |
c239d0ab92417db27ed5013e17e515e2cf820a76 | PHP | var512/kata.test | /tests/Unit/Kata/Interactions/StringCalculatorTest.php | UTF-8 | 4,248 | 2.796875 | 3 | [] | no_license | <?php
namespace Tests\Unit\Kata\Interactions;
use App\Events\AddOccurred;
use App\Exceptions\NegativeNumbersNotAllowedException;
use Exception;
use Illuminate\Support\Facades\Log;
use Kata\Interactions\StringCalculator;
use Kata\Interactions\WebServiceInterface;
use Mockery;
use Mockery\MockInterface;
use Tests\TestC... | true |
24c2253c06e8a58480a0a545392fcc6b1d50122d | PHP | kachourihassen/pidev | /src/RHBundle/Entity/Enseignant.php | UTF-8 | 6,261 | 2.5625 | 3 | [] | no_license | <?php
namespace RHBundle\Entity;
use AppBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\OneToOne;
use ReclamationBundle\Entity\Reclamation;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Enseignant
... | true |
dd68fc9de40650ee5d1fcaa66ebbc34f72ad9186 | PHP | coder371/billing | /init/function.php | UTF-8 | 14,475 | 2.5625 | 3 | [] | no_license | <?php
function getData($db,$row,$table,$sp){
$stmt = $db->prepare("SELECT `$row` FROM `$table` $sp");
$stmt->execute();
if($stmt->rowcount() > 0){
$out = $stmt->fetch();
echo $out[$row];
}
}
function getCount($db,$row,$table,$sp){
$st... | true |
2e881c850d38b0234ab02879b077a69d8bd966c1 | PHP | apexstudios/yamwlib | /src/YamwLibs/Libs/Text/Storage/AbstractTextStorage.php | UTF-8 | 491 | 2.65625 | 3 | [] | no_license | <?php
namespace YamwLibs\Libs\Text\Storage;
/**
* STUB
*
* Abstract storage class for text providers shared by text storages
*
* @author AnhNhan <anhnhan@outlook.com>
* @package YamwLibs
* @subpackage Text
*/
abstract class AbstractTextStorage
{
abstract public function getName();
abstract public func... | true |
3fba251916cf2d3ceb47258d5e19f3277130e695 | PHP | PeekAndPoke/psi | /tests/Psi/Str/ToLowerTest.php | UTF-8 | 961 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* File was created 08.02.2016 22:31
*
* @author Karsten J. Gerber <kontakt@karsten-gerber.de>
*/
namespace PeekAndPoke\Component\Psi\Psi\Str;
use PeekAndPoke\Component\Psi\Stubs\UnitTestToString;
use PHPUnit\Framework\TestCase;
/**
* @author Karsten J. Gerber <kontakt@karsten-gerber.de>
*/
class ToLo... | true |
4d423e579b61a62eddef210fd316560ddcdd24a9 | PHP | asarmiento/systema | /app/controllers/EmpresasController.php | UTF-8 | 3,166 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class EmpresasController extends \BaseController {
/**
* Display a listing of the resource.
* GET /empresas
*
* @return Response
*/
public function index() {
//
}
/**
* Show the form for creating a new resource.
* GET /empresas/create
*
* @return Res... | true |
52aa16c56eab6678ebfa576aff92c9294747a166 | PHP | pnicorelli/imhere-backend | /src/Services/Mail/MailInterface.php | UTF-8 | 200 | 2.625 | 3 | [] | no_license | <?php
namespace ImHere\Services\Mail;
interface MailInterface
{
public function setTo($email);
public function setSubject($subject);
public function setBody($body);
public function send();
}
| true |
42610a6a648011c54fb02b8988676a150d3924b8 | PHP | Sandykkd/CoimbatorePrisonWebsite | /Prison/prisonerreport.php | UTF-8 | 1,746 | 2.53125 | 3 | [] | no_license | <?php
$connect = mysqli_connect('localhost', 'root', '', 'check') or die('Error connecting to MySQL server.');
$d1=$_POST['a'];
$d2=$_POST['b'];
$rpno=$_POST['rpno'];
$date1=date_create($d1);
$date2=date_create($d2);
$d1= date_format($date1,"d.m.Y");
$d2= date_format($date2,"d.m.Y");
$diff=date_diff($dat... | true |
bed52a1aa4715f88bcf35881afe75de198f43db9 | PHP | corygehr/GroupMe-Bot | /vendor/corygehr/thinker-lib/src/Framework/Model.php | UTF-8 | 1,643 | 3.46875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Model.php
* Contains the Thinker\Framework\Model class
*
* @author Cory Gehr
*/
namespace Thinker\Framework;
abstract class Model
{
protected $reflectionClass; // Contains information about the class (ReflectionClass)
/**
* __construct()
* Constructor for the Thinker\Framework\Model Cl... | true |
c43f7c9a9f7e7a078ce71a7740a58521f6bc19d2 | PHP | Leonvk/NerdyGadgets_i3 | /nerdygadgets/verify.php | UTF-8 | 2,136 | 2.890625 | 3 | [] | no_license | <?php
session_start();
$connection = mysqli_connect("localhost", "root", "", "nerdygadgets");
mysqli_set_charset($connection, 'latin1');
include "connect.php";
include "functions/verify.php";
$error = "";
$validUsername = FALSE;
if(empty($_POST['username'])) {
$error .= "-De gebruikersnaam is niet ingevuld.<br>";... | true |
86b73a82eca8c86ea44823c9fb8a97040d308aa2 | PHP | Cafeinoman/FFW | /mod_crud/crud_list.php | UTF-8 | 11,572 | 2.515625 | 3 | [] | no_license | <?php
$html = '';
if ($mod['actions']['list']['title']) {
$page['title'] = $mod['actions']['list']['title'];
} else {
$page['title'] = "Liste des ".$mod['object_plural'];
}
function field_header($field_name) {
global $mod;
$alist = $mod['actions']['list'];
if ($alist['fields'][$field_name]['name']) {
if ($al... | true |
302e05c2b0af0e1bb9a54141722b2418098686d7 | PHP | Markburg/Health | /view/View.php | UTF-8 | 25,118 | 2.609375 | 3 | [] | no_license | <?php
namespace view;
use model\Patient;
include_once ('model/Model.php');
include_once ('model/User.php');
include_once('model/Medicijn.php');
class View
{
private $model;
public function __construct($model)
{
$this->model = $model;
}
public function showRegister($message = null)
{... | true |
7589c9409f9cdfdc285386c4bdb622820a6e5fed | PHP | davidleekraft/ChurchSurvey | /app/View/Report/report_by_skills.ctp | UTF-8 | 3,519 | 2.671875 | 3 | [] | no_license | <?php
echo $skills;
echo $this->Form->create('generateMePdf', array('type' => 'get', 'url' => 'view_skills_pdf'));
echo $this->Form->input('gift', array('type' => 'hidden','default' => $gift));
echo $this->Form->input('comp', array('type' => 'hidden','default' => $comp));
echo $this->Form->input('other', ar... | true |
5f42591b0c3a0409042bb1b3fcc817f72f24ee60 | PHP | ths67/Sample-code | /tag_images.php | UTF-8 | 858 | 2.765625 | 3 | [] | no_license | <?php
include('includes/init.php');
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="styles/all.css">
<?php include('includes/navbar.php');
?>
</head>
<body>
<ul>
<?php
if (isset($_GET['id'])) {
... | true |
17bc3c3c8290637f2c184066765a18c5cbd15f71 | PHP | jdaniel0305/slim_4_api_skeleton | /src/Utils/Responder.php | UTF-8 | 2,407 | 3 | 3 | [] | no_license | <?php
/**
*
* @About:
* @File: Responder.php
* @Date: 8/21/20
* @Version: api 1.0
* @Developer: José Daniel Quijano (jose.quijano55@gmail.com)
*
**/
namespace App\Utils;
use JsonException;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
/**
*... | true |
b11439fae48e8b2ebb4ad97cbb7d77a654458dd3 | PHP | Manzadey/sbuilder-xml-soap | /src/Category.php | UTF-8 | 3,664 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Manzadey\SbuilderXmlSoap;
use Closure;
use DOMDocument;
use DOMElement;
use Manzadey\SbuilderXmlSoap\Exceptions\ElementsArrayException;
use Manzadey\SbuilderXmlSoap\Traits\HasAttribute;
use Manzadey\SbuilderXmlSoap\Traits\HasCategory;
use Manzadey\SbuilderXmlSoap\Traits\HasDu... | true |
42c40501df45e6987b4455005cd3105371f2b1ac | PHP | taginnovationschool/codemaster-mailup | /src/HttpClient/HttpClientRequest.php | UTF-8 | 4,061 | 3.234375 | 3 | [] | no_license | <?php
namespace Codemaster\MailUp\HttpClient;
use Codemaster\MailUp\HttpClient\HttpClient;
/**
* This is a convenience class that allows the manipulation of a http request
* before it's handed over to curl.
*/
class HttpClientRequest
{
const METHOD_GET = 'GET';
const METHOD_POST = 'POST';
const METHOD... | true |
d31386dd804234de64e629be34f352cb61dda7cd | PHP | missxiaolin/yii | /common/components/Filter/Filter.php | UTF-8 | 719 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\components\Filter;
use yii\base\ActionFilter;
/**
* 过滤器
* Class AppAuth
* @package common\components\Filter
*/
class Filter extends ActionFilter
{
/**
* @param \yii\base\Action $action
* @return bool
*/
public function beforeAction($action)
{
echo '在调用acti... | true |
3f96878c6e82f9b1ef7883cd3dd5310d69dd9cd7 | PHP | thiagoprz/cpf-validator | /src/Cpf.php | UTF-8 | 1,545 | 3.015625 | 3 | [] | no_license | <?php
namespace Thiagoprz\CpfValidator;
use Illuminate\Validation\Rule;
/**
* Class Cpf
* @package Thiagoprz\CpfValidator
*/
class Cpf extends Rule
{
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Determine if... | true |
ff229fde0687d1f1d336890a7fe906abdc3e3182 | PHP | RudeJ23/PHP-Examples | /assignment8/prog1.php | UTF-8 | 5,749 | 3.0625 | 3 | [] | no_license | <?php
extract($_REQUEST);
displayform();
if ($button == "Submit")
{
// check for invalid date
if (checkdate($month1,$day1,$year1) and checkdate($month2,$day2,$year2))
{
$cost = 0;
$years = $year2 - $year1;
$months = $month2 - $month1;
$days = $day2 - $day1;
$hours = ... | true |
1094243ec7236c7c53bafb8116fa9e4dec51e840 | PHP | yourant/designshopapi | /app/Services/NativePage/UiTplParser/Sku/SkuDataParser.php | UTF-8 | 6,154 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Services\NativePage\UiTplParser\Sku;
use App\Base\AppConstants;
use App\Services\NativePage\PageUiAsyncDataParser;
use App\Services\NativePage\UiTplParser\AbstractUiTplAsyncApiParser;
use App\Services\NativePage\UiTplParser\Sku\Provider\AbstractSkuProvider;
use App\Services\NativePage\UiTplParser\S... | true |
c22273058579d45dac85a03acd7d50b7ab6c1b53 | PHP | pwFoo/mini-framework | /src/Support/Traits/CoroutineProxy.php | UTF-8 | 820 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Mini.
* @auth lupeng
*/
declare(strict_types=1);
namespace Mini\Support\Traits;
use Mini\Context;
trait CoroutineProxy
{
public function __call($name, $arguments)
{
$target = $this->getTargetObject();
return $target->{$name}(...$arguments);
}
publi... | true |
b213cdc17a1bbeaa943a4837ad2c419300f212b8 | PHP | dzineer/app_agentquote_com_laravel_v3 | /app/Models/MessageUser.php | UTF-8 | 902 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
* Date: Thu, 18 Oct 2018 06:46:47 +0000.
*/
namespace App\Models;
use Reliese\Database\Eloquent\Model as Eloquent;
/**
* Class UserMessage
*
* @property int $id
* @property int $message_type_id
* @property int $originator_id
* @property int $user_id
* @property string... | true |
9923964e520e88a72370c8c50b9893ba64b78690 | PHP | samhol/SPHP-framework | /sphp/php/Sphp/Stdlib/Datastructures/Collection.php | UTF-8 | 7,635 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* SPHPlayground Framework (https://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com>
* @license <https://opensource.org/licenses/MIT> MIT
*/
name... | true |
a0d353b8f61dc2532fc888d17591667e5d5b1ff1 | PHP | rodmiller/icbigband | /public/admin/list.php | UTF-8 | 992 | 2.65625 | 3 | [] | no_license | <?php
session_start();
#$_SESSION['messages'][] = 'TEST MESSAGE1';
#$_SESSION['messages'][] = 'TEST MESSAGE2';
$hostname = "localhost";
$username = "root";
$password = "root";
$databasename = "bigband";
$conn = new mysqli($hostname, $username, $password, $databasename);
if($conn->connect_error){
die("Connection to D... | true |
b07396ebdb25bb844f8e8bae0c7d142a82be6b7a | PHP | creative-web-solution/svg-chart-bundle | /src/SVGChart/Tools/Point.php | UTF-8 | 849 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cws\Bundle\SVGChartBundle\SVGChart\Tools;
class Point
{
public $x;
public $y;
/**
* Create a point
*/
public function __construct($x, $y)
{
$this->x = $x;
$this->y = $y;
}
/**
* Convert a point to an array
*
* @return array
*/
... | true |
17a7471278888b603cbbd4d7cba0cc5616d06778 | PHP | sansig/samples | /celeb_manage_roster.php | UTF-8 | 20,234 | 2.828125 | 3 | [] | no_license | <?php
/*
This page is a celebrity search page for a celebrity fantasy website. The page allows users to search a name, and then searches Wikipedia.org to determine if the person exists and is alive. The script then searches the internet for news and general results to determine if they are famous enough to be selecte... | true |
bb136a421c990d19ec7244ec18f29001be13303f | PHP | pagelab/puppy | /lib/image-functions.php | UTF-8 | 4,432 | 2.53125 | 3 | [] | no_license | <?php
/**
* Custom HTML for the post thumbnail
*
*/
function kibble_custom_thumbnail_html( $html, $post_id, $post_image_id ) {
$title = get_the_title($post_id);
if (empty( $html )) {
$html = '<img width="180" title="'. $title .'" height="240" src="http://fakeimg.pl/164x204/282828/eae0d0/" class="thumbnail img-r... | true |
61e4bf9a9cff33b520075aa2a884f9ef9350a8fa | PHP | mollie/mollie-api-php | /examples/orders/refund-order-partially.php | UTF-8 | 999 | 2.75 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
/*
* Refund some items for an order using the Mollie API.
*/
try {
/*
* Initialize the Mollie API library with your API key or OAuth access token.
*/
require "../initialize.php";
/*
* Refund 1 item of order line "odl_dgtxyl" for an order with ID "ord_8wmqcHMN4U".
*
* See: ... | true |
0a004a795b5d2b54ac4ceda4ebfd57ed2ef91baf | PHP | davidsanchezuribe/sisnotas | /app/Nota.php | UTF-8 | 1,067 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property integer $estudiante_id
* @property integer $evaluacion_id
* @property string $created_at
* @property string $updated_at
* @property float $valor
* @property Estudiante $estudiante
* @property Evaluacione $eva... | true |
793a2c42c4eadace9ae9e92829c4f7774bb77f01 | PHP | armandojes/social | /api/core/controllers/Activate_user.php | UTF-8 | 1,157 | 2.671875 | 3 | [] | no_license | <?php
// activate user
// path: post:: /user/activate
// data: id_user, code
class Activate_user extends Controller {
public function execute(){
//validar datos requeridos
$this->validate(['id_user', 'code']);
//crear intancias
$User = new User();
//setear_datos
$User->set_id($this->data[... | true |
dcbfed06e08c2ced0dd93e49e0143c6716e8dcbf | PHP | ansh0812/Exam-Score-Management | /ranking.php | UTF-8 | 6,061 | 2.578125 | 3 | [] | no_license | <?php
require('./connection.php');
$ranker=0;
$achiever=0;
$defaulter=0;
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="logo.png" >
<!-- Bootstrap CSS -->
<link rel="st... | true |
e0b3f31f6cd562f143704e928cc32ef971a059f1 | PHP | HermelindaSantiagoBautista/proyectofinal | /VerMante.php | UTF-8 | 1,129 | 2.578125 | 3 | [] | no_license | <?php
$Servidor="localhost";
$Usuario="root";
$Clave="";
$BaseDeDatos="registro";
$Conexion = mysqli_connect($Servidor, $Usuario, $Clave, $BaseDeDatos);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Registro Vehicular</title>
<link rel="stylesheet"... | true |
930a47ba1796cb4b6dd5b6e94fd6cb436e78b60f | PHP | hamdiantar/supersoft | /app/Http/Controllers/Admin/MoneyPermissions/BankProcess.php | UTF-8 | 613 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin\MoneyPermissions;
use App\Models\Account;
use Exception;
class BankProcess {
protected $amount;
protected $bank;
function __construct($amount ,Account $bank) {
$this->amount = $amount;
$this->bank = $bank;
}
function increment() {
... | true |
3906cd5e4f1c222f6480c2e6147db549e117dcc4 | PHP | ShibuyaKosuke/laravel-postalcode-japan | /src/Services/ArchiveService.php | UTF-8 | 1,584 | 2.703125 | 3 | [] | no_license | <?php
namespace ShibuyaKosuke\LaravelPostalcodeJapan\Services;
class ArchiveService
{
/**
* @var \ZipArchive
*/
private \ZipArchive $zip;
/**
* @var string
*/
private string $zip_file;
/**
* @var string
*/
private string $outfile = 'app/temp/ken_all_uft8.csv';
... | true |
b143f0f04cfe03c201057492ea33a81b15d83a36 | PHP | ArsalanThange/myphpframework | /core/Database.php | UTF-8 | 2,430 | 3.28125 | 3 | [] | no_license | <?php
namespace Core;
class Database
{
/**
* The active PDO instance static.
*
* @var PDO
*/
private static $instance = null;
/**
* The active PDO connection.
*
* @var PDO
*/
private $connection;
/**
* Host name for database.
*
* @var string... | true |
c30187ad99a9a8589a1835bbe3d6a56376dddbff | PHP | juddy/GIP | /web/generatedCode/simple-example2/information_schema/STATISTICS/insertNewSTATISTICS.php | UTF-8 | 3,676 | 2.5625 | 3 | [] | no_license | <?php
include_once("../common/dbConnection.php");
include_once("../common/header.php");
?>
<?php
// Retreiving Form Elements from Form
$thisTABLE_CATALOG = addslashes($_REQUEST['thisTABLE_CATALOGField']);
$thisTABLE_SCHEMA = addslashes($_REQUEST['thisTABLE_SCHEMAField']);
$thisTABLE_NAME = addslashes($_REQUEST['thi... | true |
a8879f8f6303717be318394e313233ff012e06c6 | PHP | laravel-notification-channels/facebook | /src/Traits/HasButtons.php | UTF-8 | 624 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace NotificationChannels\Facebook\Traits;
use NotificationChannels\Facebook\Exceptions\CouldNotCreateMessage;
/**
* Trait HasButtons.
*/
trait HasButtons
{
/** @var array Call to Action Buttons */
protected $buttons = [];
/**
* Add up to 3 call to action buttons.
*
* @throws... | true |
48eec28cd927bf3a14f93c2147b9d372e0281667 | PHP | zengminghui/study-swoole- | /coroutine/context.php | UTF-8 | 2,502 | 3.046875 | 3 | [] | no_license | <?php
/**
* Created by: phpstorm
* Author: danny
* Date: 2020/6/2
* Time: 21:43
*/
//多个协程是并发执行的,因此不能使用类静态变量/全局变量保存协程上下文内容。使用局部变量是安全的,因为局部变量的值会自动保存在协程栈中,其他协程访问不到协程的局部变量。
//可以使用一个Context类来管理协程上下文,在Context类中,使用Coroutine::getUid获取了协程ID,然后隔离不同协程之间的全局变量
//协程退出时清理上下文数据
use Swoole\Coroutine;
use Swoole\Http\Server;
class ... | true |
443b452e837f95f258226ea680fd3f3478dc3f55 | PHP | ArekPastuszka/coyote | /app/Events/CommentSaved.php | UTF-8 | 383 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Coyote\Events;
use Coyote\Post\Comment;
use Illuminate\Queue\SerializesModels;
class CommentSaved
{
use SerializesModels;
/**
* @var Comment
*/
public $comment;
/**
* CommentSaved constructor.
* @param Comment $comment
*/
public function __construct(Comm... | true |
161682f04c1e4572bdec3e70c7be75bb034c5f44 | PHP | tiagohenrique92/InstaCapture | /src/InstaCapture.php | UTF-8 | 4,782 | 2.921875 | 3 | [] | no_license | <?php
/**
* InstaCapture by T2
* Get photos from Instagram (only public profiles) using Curl with PHP.
*
* @author tiago
*/
class InstaCapture
{
/**
* Profile doesn't have photos
*/
const ERROR_PROFILE_NO_PHOTO = 1;
/**
* Account is private
*/
const ERROR_PROFILE_PRIVATE = 2;... | true |
cbafa5f1d08a18d5dd524d5ebc83f10d8b19d2e9 | PHP | blackbinbinbinbin/div-cjms | /protected/models/User.php | UTF-8 | 1,426 | 2.78125 | 3 | [] | no_license | <?php
@session_start();
/**
* 用户基础信息
* @author benzhan
*/
class User {
private static $_extraInfo = null;
/**
* 当前用户的user_id
* @author benzhan
* @param string $session_id
* @return Ambigous <>
*/
public static function getUserId() {
return $_SESSION['userId'];
}
... | true |
56209606e2886739f21cf2eb92e6588d179ba2f6 | PHP | ondrej-bouda/ivory | /src/Ivory/Type/Std/PgDatabaseWideRefType.php | UTF-8 | 929 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Ivory\Type\Std;
use Ivory\Lang\Sql\Types;
/**
* PostgreSQL object identifier type identifying a database object above any namespace.
*
* Represented as a PHP `string`.
*
* @see https://www.postgresql.org/docs/11/datatype-oid.html
*/
class PgDatabaseWideRefType extends Pg... | true |
fb3cc277893a86c7b60b2392b5c4ba92a649d7e1 | PHP | chhunainsadiq/BackBoneJS_Paractice | /dbhelper.php | UTF-8 | 6,691 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Contains definition of database class
*/
/**
* Manages all the database functionalities
*/
include_once(dirname(__FILE__) . "/drivers/mysqli/PDODRIVER.php");
class dbhelper
{
/**
* contains the handler
* @var PDODRIVER
*/
private $db_handler;
/**
* contains the prepared ... | true |
5370dfd7ba709c5b9b6b378bd443cc324d3dfb52 | PHP | SemPatent/JacobOnyebuchi | /Jacobpractical/editearthaction.php | UTF-8 | 1,582 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Sadeeq
* Date: 6/1/14
* Time: 4:43 PM
*/
$id = $_GET['id'];
$sqlhost="127.0.0.1"; // Host name
$sqlusername="root"; // Mysql username
$sqlpassword=""; // Mysql password
$db_name="jacobpractical"; // Database name
$tbl_name="earth"; // Table name
$conn = mysql_connect("$sq... | true |
bf10709e3336ffb5f1da53ccd984f882ebdcbeb3 | PHP | ana27c/blog_tag | /article.php | UTF-8 | 9,229 | 2.984375 | 3 | [] | no_license | <?php
include('includes/connexion.inc.php');
include('includes/fonctions.inc.php');
//si l'utilisateur est connecté
if ($connecte) {
//si on a un id passé en POST
$id = var_post('id');
//si on a un titre c'est une modification
if ((isset($_POST['titre'])) && $_POST['titre']) {
//on fait un
... | true |
1bf100bde174e24483d299c1da5f1fa2f1b55de4 | PHP | Japhlet/docs-management-system | /session-check.php | UTF-8 | 192 | 2.59375 | 3 | [] | no_license | <?php
$un = $_SESSION['username'];
if ($un) { // do nothing
$loggedin = true;
}
else { // if session is not set redirect user back to login
header("location: login.php");
}
?> | true |
5bc20ac6021b979b07009e665e8a34c092b13ead | PHP | emiberea/fii-min-homework1 | /src/MIN/AppBundle/Command/HillClimbingCommand.php | UTF-8 | 4,618 | 2.859375 | 3 | [] | no_license | <?php
namespace MIN\AppBundle\Command;
use MIN\AppBundle\Model\Equation\GriewangksEquation;
use MIN\AppBundle\Model\Equation\RastriginsEquation;
use MIN\AppBundle\Model\Equation\RosenbrocksEquation;
use MIN\AppBundle\Model\Equation\SixHumpEquation;
use MIN\AppBundle\Model\Genetic\Chromosome;
use MIN\AppBundle\Model\G... | true |
2b92bbde029fa068108f2df2834db367324d1ba4 | PHP | ControlledChaos/upfront | /library/admin/class_upfront_admin_api_keys.php | UTF-8 | 2,852 | 2.578125 | 3 | [] | no_license | <?php
class Upfront_Admin_ApiKeys extends Upfront_Admin_Page {
const FORM_NONCE_KEY = 'upfront_apikeys_wpnonce';
const FORM_NONCE_ACTION = 'upfront_apikeys_save';
private $_model;
public function __construct () {
parent::__construct();
$this->_model = new Upfront_ApiKeys_Model;
}
public function render_p... | true |
5ddeb3f1537b0ff9623f42029e158b73e87f66f8 | PHP | Sixuan/wikkit_labs_site | /application/controllers/api/face.php | UTF-8 | 2,904 | 2.546875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Face extends CI_Controller
{
/**
* 图片上传
* url:http://localhost/wikkit_labs_site/index.php/api/imageUpload
*/
private $url = 'http://120.76.26.101:8081/faceApi/detect?app_key=5738fc1ed3269&app_secret=5738fc1ed3... | true |
e78e7be76ee89835864577ef29cb01711d2214e7 | PHP | toynie/fbavaltool | /app/Repositories/BussTypeRepositoryInterface.php | UTF-8 | 359 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
interface BussTypeRepositoryInterface
{
// Get the associated model
public function getModel();
public function all();
public function store(array $data);
public function edit($id);
public function get($set_id);
public function delete($set_id);
public functio... | true |
06ed7025e40ca9bef3377aacebf6323290ab9979 | PHP | bikundo/kabumbu | /app/database/seeds/PlayersTableSeeder.php | UTF-8 | 402 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
// Composer: "fzaninotto/faker": "v1.3.0"
use Faker\Factory as Faker;
class PlayersTableSeeder extends Seeder {
public function run()
{
$faker = Faker::create();
foreach(range(1, 300) as $index)
{
Player::create([
'first_name' =>$faker->firstNameMale,
'last_name' =>$faker->lastName,
'go... | true |
319dc195f845bd4901bc43b0d72f809d17b5322f | PHP | NoTrueAcc/Test_Shop_PHP | /library/template/templateClass.php | UTF-8 | 1,938 | 3.265625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alex
* Date: 26.05.2017
* Time: 6:13
*/
namespace template;
/**
* Класс шаблонизатор получает путь к шаблону и данные на которые нужно заменить
*
* Class templateClass
* @package template
*/
class templateClass
{
private $dirTemplate;
private $dataForReplace ... | true |
22affe56779fe1612379cff858f93cf12088199b | PHP | schmengler/klondike | /src/Cards/Deck.php | UTF-8 | 319 | 3.28125 | 3 | [] | no_license | <?php
namespace SSE\Cards;
interface Deck
{
/**
* Return number of cards
*/
public function size() : int;
/**
* Convert to pile of cards to deal from it
*/
public function pile() : Pile;
/**
* Return new deck permutated by $p
*/
public function permutation(int ...$p) : Deck;
}
| true |
7e6df3d1c374811eeafe7f4c6da2aee82b8806b5 | PHP | mito121/dart-odense | /handlers/change_email.php | UTF-8 | 1,966 | 2.703125 | 3 | [] | no_license | <?php
session_start();
require_once '../includes/dbconnect.php';
if(isset($_POST) && !empty($_POST)){
$user_id = mysqli_real_escape_string($conn, $_POST['user_id']);
$current_email = mysqli_real_escape_string($conn, $_POST['current_email']);
$new_email = mysqli_real_escape_string($conn, $_POST['new_email']... | true |
f47ae433ef91518352dcea13c4e2ea9489714458 | PHP | TriumfM/DrivingSchools | /app/Services/LiteratureService.php | UTF-8 | 853 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Entities\Literature;
interface LiteratureService
{
/**
* Find All
*
* @return Literature|\Illuminate\Http\JsonResponse|mixed
*/
public function findAll();
/**
* @param $id
* @return mixed
*/
public function findById($id);
... | true |
da1a9bbbb337e91d93d4002840859360db898bcc | PHP | elgarmi09gt/CreditOfficesNew | /app/Models/Agence.php | UTF-8 | 963 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property string $agence
* @property string $adresse
* @property string $codeRegion
* @property string $region
* @property integer $idE
* @property integer $idPays
* @property string $created_at
* @property str... | true |
db3e4d95e4f6f200c7df2faaf908246648378b86 | PHP | HelleboidQ/randoum | /app/Templates/Cardio/Assets/ajax/nombreRandom.php | UTF-8 | 248 | 2.703125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
$number_mini = $_POST['nombre_mini'];
$number_maxi = $_POST['nombre_maxi'];
$result_number = rand($number_mini, $number_maxi);
?>
<p>
Voici le résultat aléatoire que vous cherchiez :
</p>
<p >
<?= $result_number ?>
</p>
| true |
9355ead6a2f88b74f11c983862b591c31e57a705 | PHP | lulanyin/inphp | /app/modules/inphp/http/api/console/menus.php | UTF-8 | 1,963 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace app\modules\inphp\http\api\console;
use Inphp\Modular;
/**
* @app\modules\inphp\attributes\Auth(group="admin")
* Class menus
* @package app\modules\inphp\http\api\console
*/
class menus
{
/**
* @return array
*/
public function index() : array{
//框架的管理模块,提供一些基础的接口
... | true |
1543cec49ea524573575903f39736b694d04a709 | PHP | yusronarif/jalsjflsajfjsaflksajlfjs | /application/core/MY_Model.php | UTF-8 | 2,434 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class MY_Model extends CI_Model {
protected $_table_name = '';
protected $_primary_key = '';
protected $_primary_filter = '';
protected $_order_by = '';
public $rules = array();
protected $_timestamps = '';
function __construct() {
parent::__construct();
}
public function get($id = NULL, $single = F... | true |
6724ade24973192541dfccc59682984db0ecd834 | PHP | roberthaydn/pjhsc-dirty-codes | /PHP/bk2/PDO/sqlfetchsinglecolumn.php | UTF-8 | 497 | 3.28125 | 3 | [] | no_license | <?php
//selecting data
try {
$dbh = new PDO('mysql:host=localhost;dbname=db_pdo', 'root', '');
} catch (PDOException $exception) {
printf("Connection error: %s", $exception->getMessage());
}
// Execute the query
$result = $dbh->query('SELECT sku, title FROM product ORDER BY title');
// Fetch the first row f... | true |
c7fe54a639baea661908a80f935da64677055492 | PHP | Dharms1004/acitm | /application/models/Payment_model.php | UTF-8 | 1,175 | 2.578125 | 3 | [] | no_license | <?php
/**
*
*/
class Payment_model extends CI_Model
{
public function __construct()
{
parent::__construct();
}
public function getAllPayment()
{
$this->db->select("*");
$this->db->from("payment");
$query = $this->db->get();
$data = $query->result_array();
return $data;
}
public function addNewP... | true |
5983416d0cbcb87df1df33464b926654f9e892cf | PHP | pdhoot/Bioskop | /app/controllers/HomeController.php | UTF-8 | 2,451 | 2.640625 | 3 | [] | no_license | <?php
namespace Controllers;
use Models\Users;
use Models\Movies;
class HomeController
{
protected $twig;
public function __construct()
{
$loader = new \Twig_Loader_Filesystem(__DIR__ . '/../views');
$this->twig = new \Twig_Environment($loader);
}
public function get()
{
session_start();
if(isset($_S... | true |
bd5ed63c423d487abcb164ca1b04f74fd4146f40 | PHP | tonyajiang/calculator-and-filesharing | /Module 2- Group/upload.php | UTF-8 | 1,197 | 2.984375 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['user'])){ //if login in session is not set
header("Location: logoutPage.php");
}
//checks to see if there is a session, logs them out if not
// Get the filename and make sure it is valid
// appears that you can't upload a file with spaces in its name
$filename = basenam... | true |
03aa4ea2248460e80993c1a963fd255794deec4a | PHP | elodssa/capsoff.net | /lib/model/doctrine/base/BasePostTags.class.php | UTF-8 | 2,253 | 2.515625 | 3 | [] | no_license | <?php
/**
* BasePostTags
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $id
* @property integer $post_id
* @property integer $tag_id
* @property Post $Post
* @property Tag $Tag
*
* @method integer getId() Returns the current record's "id" value
* @method... | true |
1a20891d33e7f519297c69f0f7b6ec27a4a8f8f0 | PHP | kriptograf/laravel-ads | /app/Http/Controllers/Cabinet/FavoriteController.php | UTF-8 | 1,310 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Cabinet;
use App\Http\Controllers\Controller;
use App\Models\Advert;
use App\Services\User\FavoriteService;
use Illuminate\Support\Facades\Auth;
/**
* Избранное в личном кабинете пользователя
*
* @author Виталий Москвин <foreach@mail.ru>
*/
class FavoriteController extends Co... | true |
5ddbf72b9da22d1b992cfcfe9162df1dc011fef7 | PHP | valbok/leie | /classes/module/leieModuleHandler.php | UTF-8 | 3,868 | 2.890625 | 3 | [] | no_license | <?php
/**
* @author VaL
* @copyright Copyright (C) 2011 VaL::bOK
* @license GNU GPL v2
* @package leie
*/
/**
* Class to handle modules. It points uri to specified module.
*
* modules/user/login/module.php:
* return array( 'class' => 'leieNAMEModule',
* 'parameters' => array( 'Param1'... | true |
eaac164f40c5a07466104746a2ae011ad2d3e801 | PHP | yanb94/blog | /lib/Response/RedirectResponse.php | UTF-8 | 464 | 3.09375 | 3 | [] | no_license | <?php
namespace Framework\Response;
use Framework\Response;
class RedirectResponse extends Response
{
protected $url;
public function __construct(string $url)
{
$this->setUrl($url);
}
protected function redirect(string $url)
{
header('Location: '.$url);
}
public fun... | true |
d3c03236b8d6ee74978114bb80d89c28616cda0d | PHP | anais0210/formation | /src/Controller/UpdateStudentController.php | UTF-8 | 1,620 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\BaseController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
class UpdateStudentController extends BaseController
{
public function __invoke()
{
$response = new JsonResponse();
$json = file_get_conten... | true |
94459caba28684d38dd858313ff1f6489e715b32 | PHP | aradhell/bank-statement-exporter | /src/BSExporter.php | UTF-8 | 514 | 2.78125 | 3 | [] | no_license | <?php
namespace BSExporter;
use BSExporter\Factory\ExporterFactory;
use BSExporter\Factory\ExporterFactoryInterface;
use BSExporter\Inputs\InputInterface;
class BSExporter
{
/**
* @var ExporterFactoryInterface
*/
private $factory;
public function __construct()
{
$this->factory = ne... | true |
e38983cde88c1aec74557125b513f0d933a2d4fc | PHP | quoctrung66/Web_Lab12 | /Car.php | UTF-8 | 2,147 | 3.109375 | 3 | [] | no_license | <?php
require_once('ConnectDatabase.php');
class Car
{
var $id;
var $name;
var $year;
function Car($mid, $mname, $myear)
{
$this->id = $mid;
$this->name = $mname;
$this->year = $myear;
}
}
function getAllCar(){
$query = mysql_query("SELECT * FROM cars");
if($query){
$cars = array();
while($row = my... | true |
df9c4d7dcc56232728b8e7aa187083a6fcc291e9 | PHP | MACSolutionsdotCo/rentmanager | /src/Generator/Parser.php | UTF-8 | 1,157 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace RentManager\Generator;
use Symfony\Component\Yaml\Yaml;
class Parser
{
private $phpDir;
private $baseNamespace;
public function __construct()
{
$this->parse();
}
public function parse()
{
$file = getcwd() . "/rentmanager.yaml";
$schema =... | true |
8216805715c6157f7db8ba60f8751ac861bc330b | PHP | bea93/proyectoTema3 | /codigoPHP/ejercicio19.php | UTF-8 | 2,738 | 3.453125 | 3 | [
"MIT"
] | permissive | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Ejercicio 19</title>
</head>
<body>
<?php
/*
* Vamos a guardar los siguientes datos de una carrera de atletismo de los días 20/02/2020, 04/05/2020 y 06/06/2021:
* Do... | true |
d791291dd870034a72a3adc16261636452526803 | PHP | WildCodeSchool/orleans-0217-jardinsdegaston | /src/model/Livredor.php | UTF-8 | 1,323 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wilder10
* Date: 02/04/17
* Time: 09:19
*/
namespace wcs\model;
class Livredor
{
/* --- Proprietes --------------------------------- */
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $contenu;
/**
* @var str... | true |
6ce107a06ffb16c8f478c7cd57cedc8363dd369f | PHP | shovakmisha/php-lessons | /php4/news/NewsDB.class.php | UTF-8 | 3,451 | 3.140625 | 3 | [] | no_license | <?php
include "INewsDB.class.php";
class NewsDB implements INewsDB, IteratorAggregate{
const DB_NAME = 'news.db';
protected $_db;
private $_items = [];
private function getCategories(){
try{
$sql = "SELECT id, name FROM category";
$result = $this->_db->query($sql);
... | true |
945f3f7c72c8d34888654955c1bb8b846d406c62 | PHP | chris-handy/CodeExamples | /VotingWidget/Includes/dropDownList.php | UTF-8 | 3,300 | 3.390625 | 3 | [] | no_license | <?php
//dropDownList.php
function createDropDown($records, $defaultValue=0, $grouping=false, $nm="list", $blankOption="", $className=""){
/**
create an HTML select tag from the $records submitted
The $records could be an array or a recordset
NB: It is assumed that the list is already sorted according to whatever g... | true |
65f1ee6a19ff1c656286b8d9ca59354e4b104dcb | PHP | vimal1234/palcura | /backend/models/feedback/UpdateFeedback.php | UTF-8 | 1,429 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models\feedback;
use backend\models\feedback\UpdateFeedback;
use yii\base\Model;
use Yii;
/**
* UpdateFeedback
*/
class UpdateFeedback extends Feedback {
public $comment;
public $starrating;
public $status;
/**
* @inheritdoc
*/
public static function tableNa... | true |