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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2fafb5189a9d1faf131f6cd1f190ecf03d33f22a | PHP | sguha-work/MySqlImpulse | /system/CacheManager.php | UTF-8 | 2,222 | 3.171875 | 3 | [] | no_license | <?php
//This class is responsible to manage the cahce
class CacheManager
{
function __construct() {
}
/**
* This function checks wheather the query exits in the query queue or not
*
*
*/
public function isQueryExitsInCache($query) {
$queryQueue_object = ... | true |
2a8b5efb87f5f7db06c13fcacb836fa8ddfaa400 | PHP | IonBatir/book-a-room-api | /review.php | UTF-8 | 2,177 | 2.578125 | 3 | [] | no_license | <?php
include_once 'config/headers.php';
include_once 'config/database.php';
include_once 'config/core.php';
include_once 'objects/review.php';
$database = new Database();
$db = $database->getConnection();
$review = new Review($db);
$review->id = isset($_GET['id']) ? $_GET['id'] : NULL;
$data = json_decode(file_get... | true |
b86c5da36006f398a5a8d9487070f3393bdf5059 | PHP | Adrinachong1997/Software-Engineering- | /newBG/userModel.php | UTF-8 | 3,072 | 2.671875 | 3 | [] | no_license | <?php
require_once("dbconfig.php");
function login($id, $pwd)
{
global $db;
$_SESSION['id']=0;
$_SESSION['sort']='';
$_SESSION['admin']='';
if ($id> " ") {
$sql = "select * from user where id=? and password=?";
$stmt = mysqli_prepare($db, $sql);
mysqli_stmt_bind_param($stmt... | true |
dbb7db1764f16c3be6774081850cd9abe0ccc3d6 | PHP | andreprojects/sp745543 | /module/Application/src/Application/Entity/Usuario.php | UTF-8 | 3,547 | 2.765625 | 3 | [] | no_license | <?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
*
* @ORM\Entity
* @ORM\Table(name="usuario")
* @ORM\Entity(repositoryClass="Application\Entity\UsuarioRepository")
*
* @property string $email
* @property string $nome
* @property int $c... | true |
6517a670f0de78e8d2df29fb820bd3490c2004c2 | PHP | dameert/battleship | /src/BattleShipGame/Artefacts/PlacedShip.php | UTF-8 | 910 | 3.3125 | 3 | [] | no_license | <?php
namespace App\BattleShipGame\Artefacts;
use App\BattleShipGame\Exception;
use App\BattleShipGame\Grid\Square;
class PlacedShip extends Ship
{
/**
* @var Square[]
*/
private $occupiedSquares;
/**
* PlacedShip constructor.
* @param Ship $ship
* @param array $occupiedSquares... | true |
9039f3ccc525f2d01e2def30881e263fa717f1d3 | PHP | beatakapusta/ZTP2 | /src/Entity/RecipeIngredient.php | UTF-8 | 1,794 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\RecipeIngredientRepository")
* @ORM\Entity
* @ORM\Table(name="recipe_ingredient")
*/
class RecipeIngredient
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
... | true |
bd5e7891a16e4ada258bd47fb796dc2d6de50748 | PHP | senda96/spsystem | /admin/main/cambiarc.php | UTF-8 | 3,574 | 2.765625 | 3 | [] | no_license | <?php
//mando a llamar al archivo php que contiene funciones:v
require("..//sql/conexion.php");
//mando a llamar al archivo php que contiene las funciones de pagina
require('../sql/pagina.php');
//mando a llamar al archivo php que contiene las funciones para validar
require('../sql/validar.php');
//mando a lla... | true |
2610e159f13523bdbc73f0045c17475e4fcd74e3 | PHP | nullcitizen/chassis | /app/Chassis/User/Updater.php | UTF-8 | 1,284 | 2.734375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php namespace Chassis\User;
use Validator;
use User;
use Hash;
use Redirect;
class Updater {
protected $listener;
public function __construct($listener)
{
$this->listener = $listener;
}
public function update($id, $input)
{
$input = array_except($input, ['_method', '_token']);
... | true |
d78a9e08dba840c1c1a28519fef5b4f90668c0c0 | PHP | liukang838/study | /app/Models/ArticleModel.php | UTF-8 | 587 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Created by PhpStorm.
* User: liukang
* Date: 2018/12/21
* Time: 上午11:54
*/
class ArticleModel extends BaseModel
{
use SoftDeletes;
protected $connection = 'mysql';
protected $table = 'article';
protected $fillable... | true |
297afa4104ef252b51f0d7ab91b9aedb274059a6 | PHP | vmannino/Course-File-System | /login.php | UTF-8 | 1,686 | 2.59375 | 3 | [] | no_license | <?php
include_once 'functions.php';
$error=$email=$pswd="";
if (isset($_POST['email'])){
$email=cleanString($_POST['email']);
$pswd=cleanString($_POST['pswd']);
if ($email=='' || $pswd==''){
$error='Not all fields were entered<br \>';
}
else{
$query="SELECT email, password FROM ... | true |
3c9dd303764098b33acff9dc2b19889779ccdd17 | PHP | cosnicsTHLU/cosnics | /src/Chamilo/Application/Survey/Rights/Component/DeleterComponent.php | UTF-8 | 2,691 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Application\Survey\Rights\Component;
use Chamilo\Application\Survey\Repository\EntityRelationRepository;
use Chamilo\Application\Survey\Rights\Manager;
use Chamilo\Application\Survey\Service\EntityRelationService;
use Chamilo\Application\Survey\Service\RightsService;
use Chamilo\Libraries\Archi... | true |
32f7ecce1b02b6f3d450c582cc717fd0bb9db3df | PHP | prezly/draft-php | /lib/Model/ContentBlock.php | UTF-8 | 2,350 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace Prezly\DraftPhp\Model;
use InvalidArgumentException;
/**
* @property string $key
* @property string $type
* @property string $text
* @property CharacterMetadata[] $characterList
* @property int $depth
* @property array $data
*/
class ContentBlock
{
/** @var string */
private $_key;
... | true |
c4cf992e28336a65cf8abded597c59635d011e44 | PHP | xervice/rabbitmq | /src/Xervice/RabbitMQ/Business/Model/Queue/QueueBuilder.php | UTF-8 | 1,050 | 2.9375 | 3 | [] | no_license | <?php
namespace Xervice\RabbitMQ\Business\Model\Queue;
use Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface;
class QueueBuilder implements QueueBuilderInterface
{
/**
* @var \Xervice\RabbitMQ\Business\Model\Core\QueueProviderInterface
*/
private $queueProvider;
/**
* @var \Xe... | true |
916af396125183d28d35f2501b368ae0c0d2b537 | PHP | danielnassauer/swtp-urlaubsverwaltung | /server/model/Person.php | UTF-8 | 2,063 | 3.09375 | 3 | [] | no_license | <?php
require_once dirname ( __FILE__ ) . '/../../lib/json/jsonCompatibility.php';
class Person {
private $id;
private $forename;
private $lastname;
private $department;
private $field_service;
private $remaining_holiday;
private $role;
/**
* Repräsentiert eine Person
*
* @param
* id ID
* @p... | true |
392a72a628d2856def794ebcfa81d4b4a305ed35 | PHP | AWworks/2gAdmin | /2go_api/database/migrations/2017_12_21_092034_create_add_on_items_table.php | UTF-8 | 854 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAddOnItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('add_on_items... | true |
bb0a7cfabb23c32d14e80798d7c03d79408835cd | PHP | b33c00l/Laravel_Blog | /database/seeds/CommentsSeeder.php | UTF-8 | 676 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Post;
class CommentsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker\Factory::create();
$posts = Post::all();
foreach ($posts as $post) {
$t... | true |
d21a67187ecaa314877b5a71853dec75029bd4bc | PHP | Jedisjeux/Jedisjeux | /src/Fixture/Factory/PlayerExampleFactory.php | UTF-8 | 2,546 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Jedisjeux.
*
* (c) Loïc Frémont
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Fixture\Factory;
use App\Entity\GamePlay;
use App\Entity\Player;
use App\Fixture\OptionsResolver\LazyO... | true |
eecfaa76198e62b0fda7f0a4d43e1356d7c316fe | PHP | bmorearoundtown/bmorearoundtown-legacy | /cp/_classes/app/PackageX.php | UTF-8 | 1,029 | 2.5625 | 3 | [] | no_license | <?
class PackageX extends Package {
public function __construct($intId = 0) {
$this->_('totalRegistrations');
parent::__construct($intId);
}
public function loadByRegistrationCode($strRegistrationCode) {
$arrCodes = explode('-', $strRegistrationCode);
$this->query("
SELECT p.*,
COUNT... | true |
5f19a5367178f3142680aa14cceadc26a15d3245 | PHP | MrsYHY/qingdao | /backend/forms/MenuForm.php | UTF-8 | 1,448 | 2.75 | 3 | [] | no_license | <?php
namespace backend\forms;
use common\forms\BaseForm;
use Yii;
/**
* This is the model class for table "menu".
*
* @property integer $id
* @property string $route
* @property string $name
* @property string $desc
* @property integer $display
* @property integer $parent
* @property inte... | true |
dbd7c8a834d5f6663587fdfcf8b3e15264471a41 | PHP | wuan-code/AlgorithmDemo | /Transform/BaseTransform/CliTransform.php | UTF-8 | 1,795 | 2.84375 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | 具体的cli转换类
// +----------------------------------------------------------------------
// | author 武安y<yaobin24@126.com>
// +----------------------------------------------------------------------
// | note
// +-----------------------... | true |
16c0db7de0b014c12e438f564fbf600819683050 | PHP | armandoaepp/sa | /beans/Bean_ctactepago.php | UTF-8 | 2,169 | 2.703125 | 3 | [] | no_license | <?php
/* Clase Bean Generada - Creado por @armandoaepp */
class Bean_ctactepago{
//Constructor
public function Bean_ctactepago(){}
//Atributos
private $cCtaCteRecibo;
private $nCtaCtePagCodigo;
private $cPerCodigo;
private $nPerCtaCodigo;
private $nTurno;
private $nForPago;
private $nTipPago;
private $cCtaCte... | true |
9a9d25c5ad3f9126b0a3342d8caf0356d06fdfff | PHP | jstry1991/InfoSysProj | /IndividualPractitionersSchedule.php | UTF-8 | 1,867 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head><link rel="stylesheet" href="style.css" type="text/css"></head>
<div class ="box">
<a href ="index.html">Home</a>
</div>
<br>
<body>
<div class="box">
<h3>Select a Practioner name to print out Individual schedule</h3>
</div>
<form action="individualPractitionersSchedule.php" method="p... | true |
88e91c0d676fd28252ff57ab265f5f20dc477d8c | PHP | rsms/phpab | /lib/base/Stack.php | UTF-8 | 2,017 | 3.015625 | 3 | [
"MIT"
] | permissive | <?
/*
Copyright (c) 2005-2007, Rasmus Andersson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | true |
3a9de0b96bd2284d1fc1e5ee425a595c760750dd | PHP | ryancco/laravel-sessions | /src/Device.php | UTF-8 | 379 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ryancco\Sessions;
use Jenssegers\Agent\Agent;
use Ryancco\Sessions\Contracts\Device as DeviceInterface;
class Device extends Agent implements DeviceInterface
{
public function platformVersion()
{
return $this->version($this->platform());
}
public function browserVersion()
... | true |
8db4648ec8ae20db27709eaa7b809703129181c5 | PHP | Morebec/ValueObjects | /tests/unit/Money/MoneyAmountTest.php | UTF-8 | 2,809 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use Morebec\ValueObjects\Money\Currency;
use Morebec\ValueObjects\Money\MoneyAmount;
/**
* MoneyAmountTest
*/
class MoneyAmountTest extends \Codeception\Test\Unit
{
public function testValidCode()
{
new MoneyAmount(500, Currency::USD());
}
public function testToString(): void
{
... | true |
bdab966231ba35e8ed91e4d815020354b2d26592 | PHP | dveMartins/my-kerpl | /admin/logout.php | UTF-8 | 221 | 2.515625 | 3 | [] | no_license | <?php
require_once '../init.php';
$user = new User();
if($user) {
$user->logout();
$user->redirect("../index.php");
} else {
echo '<p class="text-center alert-danger">You are not logged in!</p>';
}
| true |
a27186ba1e003e94570ab6c3628b34bbc5a961eb | PHP | masteringyii/chapter5 | /commands/BasicController.php | UTF-8 | 1,493 | 3.234375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\commands;
use yii\helpers\Console;
/**
* A basic controller for our Yii2 Application
*/
class BasicController extends \yii\console\Controller
{
/**
* Outputs HelloWorld
* @return 0
*/
public function actionIndex()
{
echo "HelloWorld\n";
return 0;
}
/**
* O... | true |
9a330fd1574275c31ce55e5d1b8c7a32ec616ee3 | PHP | patthomasrick/rpi-patrickwthomas-net | /src/api/heartbeat.php | UTF-8 | 665 | 2.515625 | 3 | [] | no_license | <?php
require "includes/config.php";
$dbh = GetDatabaseHandler();
if (isset($_GET)) {
$api_key = $_GET["api_key"];
$local_ip = $_GET["local_ip"];
if (!$api_key || !$local_ip) {
http_response_code(400);
die("bad");
}
$global_ip = $_SERVER['REMOTE_ADDR'];
$sql = '
SET time_zone = "-04:00";
UP... | true |
b661c40dbee17d1b009ce5622b66daeb5c88e3bc | PHP | goncalogoncalves/wallfav | /src/Wallfav/Models/DashboardModel.php | UTF-8 | 17,217 | 2.796875 | 3 | [] | no_license | <?php
use Slim\Slim;
class DashboardModel {
public function __construct($db) {
try {
$this->db = $db;
} catch (PDOException $e) {
exit('Database connection could not be established.');
}
}
public function utf8_encode_deep(&$input) {
if (is_string($input)) {
$input = utf8_encode($input);
} else... | true |
65461170c33d014952facf8354a7560a3b284f1e | PHP | crcnum4/mySQL | /php/register.php | UTF-8 | 3,665 | 2.703125 | 3 | [] | no_license | <?php
if ($_GET['logout']=='1' AND $_SESSION['id']) {
session_destroy();
$message = "You have been logged out.";
}
if ($_GET['login'] == '1' AND !$_POST['submit']) {
$error = "You must be logged in to access that page!";
}
if ($_POST['submit'] == 'Register') {
... | true |
8d0132d37893605167059ea864d362dc871e9d5f | PHP | banyx101/amsOLD | /protected/models/Persona.php | UTF-8 | 7,113 | 2.625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "persona".
*
* The followings are the available columns in table 'persona':
* @property integer $idPersona
* @property integer $Shoqata_idShoqata
* @property string $emri
* @property string $mbiemri
* @property string $dateLindja
* @property string $ate... | true |
c93e6db9b39b177f121e61b44400041820f9d33a | PHP | KonradPerlicki/Blog | /app/Http/Requests/RegisterUserRequest.php | UTF-8 | 1,002 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules\Password;
class RegisterUserRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
... | true |
5faeb47939538f8ba39c4cb624a5f335c676c421 | PHP | thanhlovesport/zend | /PHP/PHP/phpchapter13/call/02.php | UTF-8 | 578 | 3.125 | 3 | [] | no_license | <?php
class Student{
private $name;
public function __construct(){
$this->name = 'Trương Hồng Anh';
}
// biến $name với $param gợi nhớ ra tên và phương thức khi ta gọi mà nó hk có tồn tại
public static function __callstatic($name,$params){
echo '<pre style="color:red;font... | true |
a7a29d2ff3e1052c67692ed623adc02e15bb9ed9 | PHP | edde-framework/edde | /src/Edde/Application/IRequest.php | UTF-8 | 453 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Edde\Application;
interface IRequest {
/**
* get requested class
*
* @return string
*/
public function getService(): string;
/**
* get requested method
*
* @return string
*/
public function getMethod(): string;
/**
... | true |
a0d8650f3e50b2659d17d09ee56f13ae1e1594f9 | PHP | mhmaarafath/onlinePortal | /admin/course-add.php | UTF-8 | 1,053 | 2.703125 | 3 | [] | no_license | <?php
require('connection.php');
if(isset($_GET['id'])){
$id = $_GET['id'];
$sql = "SELECT * FROM course WHERE id='$id'";
$query = mysqli_query($connect,$sql);
$row = mysqli_fetch_array($query);
}
if(isset($_POST["submit"])){
$name = $_POST["name"];
if(isset($_GET['id'])){
$sql = "UPDATE ... | true |
94c67db2e1a518968437dea379597a5e7c78fcc1 | PHP | giovanipires/cursoshcode_PHP | /09poo/exemplo-02.php | UTF-8 | 955 | 4.03125 | 4 | [] | no_license | <?php
// Atributos e métodos
class Carro {
private $modelo;
private $motor;
private $ano;
function getModelo() {
return $this->modelo;
}
function getMotor():float {
return $this->motor;
}
function getAno():int {
return $this->ano;
}
function setModelo... | true |
e3c31942c7b9d86c5c8088a2d4e07d5f75c95df3 | PHP | Jwilsondesigns/breeze | /tests/Breeze/Errors/ErrorsTest.php | UTF-8 | 11,548 | 2.578125 | 3 | [] | no_license | <?php
/**
* Breeze Framework - Errors test case
*
* This file contains the {@link Breeze\Errors\Tests\ErrorsTest} class.
*
* LICENSE
*
* This file is part of the Breeze Framework package and is subject to the new
* BSD license. For full copyright and license information, please see the
* LICENSE file that is ... | true |
e54810558ac28c139a51afe69559e6b3fe8e96d5 | PHP | Marquis-H/quba-admin | /src/CommonBundle/Entity/SayLoveMessageComment.php | UTF-8 | 1,804 | 2.703125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace CommonBundle\Entity;
/**
* SayLoveMessageComment
*/
class SayLoveMessageComment
{
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $comment;
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var \CommonBundle\Entity\SayLov... | true |
ba53f4e16e740edebbe95bff4306a0860709f6f3 | PHP | CarlosVazquezFarrera/Software | /objetos/raza.php | UTF-8 | 348 | 2.890625 | 3 | [] | no_license | <?php
class Raza{
private $idRaza;
private $raza;
public function setIdRaza($idRaza){
$this->idRaza = $raza;
}
public function getIdRaza(){
return $this->idRaza;
}
public function setRaza($raza){
$this->raza = $raza;
}
public function getRaza(){
retu... | true |
d24a514cfdb1365a194288529320dfcab882e88c | PHP | dbreuer/kocka | /log.php | UTF-8 | 426 | 2.8125 | 3 | [] | no_license | <?php
$myFile = "logfile.txt";
$playerData = "";
foreach($_POST['player'] as $var => $player) {
$playerData .= " | " . $var ."->".$player;
}
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "data: " . $_SERVER['REMOTE_ADDR'] . " / " . date('l jS \of F Y h:i:s A') . " - " . $playerData . "\n";
$st... | true |
9b333d2394ad5602418efb2d688824a0dd52e9d1 | PHP | AlexEvesDeveloper/hl-stuff | /hl-framework/models/datasources/Insurance/DocumentQueue.php | UTF-8 | 3,385 | 2.59375 | 3 | [] | no_license | <?php
/**
* Model definition for quote/policy document queue.
*/
class Datasource_Insurance_DocumentQueue extends Zend_Db_Table_Multidb
{
protected $_multidb = 'db_legacy_homelet';
protected $_name = 'doc_request_queue';
protected $_primary = 'request_id';
/**
* Retrieves documents from the data... | true |
e2e6900c04ceb9472cfc354bfbc9862649a2703e | PHP | ReenExeCubeTime/CodewarsPHP | /tests/SumMixedArrayTest.php | UTF-8 | 476 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace ReenExe\CodewarsPHP\Tests;
use PHPUnit\Framework\TestCase;
use ReenExe\CodewarsPHP\SumMixedArray;
class SumMixedArrayTest extends TestCase
{
public function testExamples()
{
$summer = new SumMixedArray();
$this->assertSame(22, $summer->sum([9, 3, '7', '3']));
$this->as... | true |
589905b99ad1687c3b4edeaf499bdbe27a43784f | PHP | Branko-Mat-83/Upload-and-Autocrop-image-class | /classes/upload-image.class.php | UTF-8 | 6,591 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class UploadImageClass{
public function HiddenUploadForm($upload_image_form_id_fn,$upload_image_ajax_link_fn,$upload_image_input_id_fn){
echo '<div style="height:0px;overflow:hidden">
<form id="'.$upload_image_form_id_fn.'" action="'.$upload_image_ajax_link_fn.'" method="post" enctype="multipart/fo... | true |
a7d9bed02b9a94a00f8d2d291103d2ea7391850d | PHP | cs-portfolios/wp-mysite | /news.php | UTF-8 | 3,100 | 2.515625 | 3 | [] | no_license | <?php
/*
Template Name: NEWS
*/
get_header(); ?>
<?php get_template_part('nav'); ?>
<main>
<div class="main_box">
<div class="news">
<div class="news_box">
<div class="news_title_list">
<div class="news_title">
<h2>NEWS</h2>
... | true |
ec5d47677ff925512ed129045da4dc2dcfbf6da2 | PHP | smail999/monblog | /addpost.php | UTF-8 | 976 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Formation
* Date: 10/05/2017
* Time: 09:05
*/
require 'Model.php' ;
//des que l'utilisateur clic sur le bouton submit le addpost se lance
if(isset($_POST['submit'])) {
// je me connecte a la Bdd
$bdd = getBdd();
// je prépare mais variable pour ma requete sql
... | true |
a043058435fabbbca92831ea27f167e461706eb0 | PHP | gitcommer/php-mysql | /webslesson-crud-pdo-ajax-datatables/fetch.php | UTF-8 | 2,743 | 2.78125 | 3 | [] | no_license | <?php
include('db.php'); // para naay data ang fetch connect to database
include('function.php');
$query = '';
$output = array(); // empty rani siya na array masudlan ni siya sa ubos
$query .= "SELECT * FROM users "; //= meaning pwede nimo i concatinate or i sumpot ang sql query tanan
//this will receive... | true |
a7a4080654905942854b2c8e17db547c413f81a1 | PHP | sugoroku1/Mineflow | /src/aieuo/mineflow/flowItem/condition/ConditionContainer.php | UTF-8 | 697 | 2.78125 | 3 | [
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace aieuo\mineflow\flowItem\condition;
use aieuo\mineflow\flowItem\FlowItemContainer;
interface ConditionContainer extends FlowItemContainer {
/**
* @param Condition $condition
*/
public function addCondition(Condition $condition): void;
/**
* @param array $conditions
*/... | true |
4f0abb83374c0903583bcc4151ea9bdab7a59f5f | PHP | Mosa1/msroomsxml | /src/SalmaAbdelhady/RoomsXML/RoomsXMLRequest.php | UTF-8 | 4,235 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: salmah
* Date: 7/28/15
* Time: 10:52 AM
*/
namespace SalmaAbdelhady\RoomsXML;
use Buzz\Browser;
use Buzz\Client\Curl;
use Buzz\Message\Response;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\Annotation\XmlElement;
us... | true |
f06e65400660eaae10fab1361e95a9a0f66b8123 | PHP | jhbed/cs545-proj3 | /helpers.php | UTF-8 | 1,035 | 2.75 | 3 | [] | no_license | <?php
#Jake Bedard
#jadrn007
#818121974
$bad_chars = array('$','%','?','<','>','php', "'");
function isPost(){
if(!$_POST){
write_error_page("Must use post (called from a form)");
exit;
}
}
function write_error_page($msg) {
#write_header();
echo "<h2>Sorry, an error occurred<br />",
$msg,"</h2>";... | true |
c51ac9aa419539af270fdeb1d6852f61077fb7ea | PHP | jacobDaeHyung/laravel-reservering | /app/Repositories/Booking/BookingRepository.php | UTF-8 | 845 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Booking;
interface BookingRepository
{
/**
* Fetch a record by id.
*
* @param $id
*/
public function getById($id);
/**
* Eloquent Eager Loading to solve N + 1 query problem.
* Get all bookings details via customer id
* Receive ... | true |
648f5e1baa7cc6f5619443870aaa83de328fc8da | PHP | MangeshTak/Cross-Vendor-Online-Market-Place | /src/models/Item.php | UTF-8 | 1,356 | 3.265625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: huyvo
* Date: 12/2/17
* Time: 12:48 PM
*/
// Service & Product
class Item
{
// id from database that is created
protected $id;
protected $title;
protected $description;
protected $image_url;
protected $price;... | true |
4c1954fbae69730ecf02e24a103b0351cf44c975 | PHP | PG-Momik/MVC-Framework | /core/Application.php | UTF-8 | 1,395 | 3 | 3 | [] | no_license | <?php
namespace momik\simplemvc\core;
use momik\simplemvc\models\User;
class Application
{
public static string $ROOT_DIR;
public Request $request;
public Response $response;
public Router $router;
public static Application $app;
public Controller ... | true |
18168323a7a7cf124efedcc63c67062640a897b1 | PHP | eclickhu/PHPClasses | /httpparams.php | UTF-8 | 647 | 3.03125 | 3 | [] | no_license | <?php
include_once "nameformatter.php";
class HttpParams extends ArrayObject
{
public function __construct($params = array())
{
parent::__construct(array());
$this->addAll($params);
}
public function addAll($params)
{
foreach($params as $key => $value)
$this->$key = $value;
}
public function __se... | true |
060523c092e0346b0a79df2e3abd2ea01a1e0595 | PHP | danielbradley/Viva | /page/_Libraries/Viva/Controllers/PasswordController.php | UTF-8 | 2,370 | 2.96875 | 3 | [] | no_license | <?php
class PasswordController extends Controller
{
function __construct()
{}
function first( $array )
{
if ( count( $array ) ) return $array[0];
}
/*
* Returns boolean
*/
function perform( $session, $request, $debug )
{
$ret = False;
$debug->println( "<!-- PasswordController::perform() start -... | true |
b9b170d4e5d0f0e61f4b8fab822f83271f0df3e7 | PHP | hach-que/Omni | /src/shell/Chain.php | UTF-8 | 8,013 | 2.703125 | 3 | [] | no_license | <?php
final class Chain
extends Phobject
implements PipelineOrChainInterface {
private $left;
private $op;
private $right;
public function __construct($left, $op, $right) {
$this->left = $left;
$this->op = $op;
$this->right = $right;
}
public function getLeft() {
return $this->left... | true |
7fb149506eb7bcebbaf6b94b3ad03d3f1812d880 | PHP | indmind/dasi | /db/session.php | UTF-8 | 2,441 | 2.96875 | 3 | [] | no_license | <?php
require '../db/database.php';
$db = new Database();
class Session {
public static function setHandler()
{
session_set_save_handler(
array('session', 'open'),
array('session', 'close'),
array('session', 'read'),
array('session', 'write'),
... | true |
5090a0154889f329b982aa5dfe39e1a621d738e0 | PHP | Legit-Development/Credit-System | /src/LegitDev/CreditSystem/Main.php | UTF-8 | 29,952 | 2.578125 | 3 | [] | no_license | <?php
namespace LegitDev\CreditSystem;
use DateTime;
use pocketmine\Server;
use pocketmine\Player;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Config;
use pocketmine\utils\UUID;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\utils\TextFormat as color;... | true |
14f478f50f5f45df99aec8a45b1ce20306661112 | PHP | supa-creation/zend-spw | /src/SPW/Validator/Url.php | UTF-8 | 299 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace SPW\Validator;
class Url extends \Zend\Validator\Regex
{
protected static $defaultPattern = "#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#iS";
public function __construct() {
parent::__construct(self::$defaultPattern);
}
}
?>
| true |
484c1d4b0fb4eaa5dba3607f847a4d749c126639 | PHP | nilBora/konstruktor | /app/Plugin/Api/Model/ApiTimeline.php | UTF-8 | 32,212 | 2.625 | 3 | [] | no_license | <?php
/**
* файл модели ApiTimeline
*
* LICENSE: MIT
*
* @category API
* @package Api
* @version Release: 1.0
* @author Alexander B <answer3ster@gmail.com>
*/
App::uses('AppModel', 'Model');
App::uses('User', 'Model');
App::uses('Group', 'Model');
App::uses('GroupCategory', 'Model');
App::uses('Article', ... | true |
b5334d08d24bd6affc0e84e23a28a33e4d0f2b18 | PHP | abhishek94sonone/wjyqttKu | /database/seeds/VehicleMakeTableSeeder.php | UTF-8 | 367 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Models\VehicleMakes;
class VehicleMakeTableSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run(){
$models = ['Jeep','Ford','Dodge','Toyota'];
foreach($models AS $model){
VehicleMakes::firstOrCreate([
... | true |
c21dc49b8640ec845026ac0ab16972150a679911 | PHP | honzour/backpropagation | /web/2.3/examples/sinus3/index.php | UTF-8 | 313 | 2.8125 | 3 | [] | no_license | <?
include '../../util.php';
example("Long sinus sequence", "Training set is a sequence of sinus(k * 0.1) and the network task is to predict the next value from previous nine. So for example if you put sinus(0.05), sinus(0.15), ... and sinus(0.85), you should get sinus(0.95). It seems that it works well.");
?>
| true |
5ffa2b50da795972a052fa59a9ede57d8d61131d | PHP | LarainGG/emailvalidate | /src/Command/EmailValidateCommand.php | UTF-8 | 2,460 | 2.875 | 3 | [] | no_license | <?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use App\Validator\EmailValidator;
class EmailValidateCommand extends Command
{
pr... | true |
aa8a3705e4efb217af0fc3da0deb080e66410dc4 | PHP | michaelwood/uGeneration | /classes/utils.class.php | UTF-8 | 892 | 2.640625 | 3 | [] | no_license | <?php
//require_once('./classes/site_config.class.php');
//$site_config = new site_config;
class utils {
public static function check_logged_in() {
//check to see if a user is logged in or not
if ($_SESSION[loggedin] == true) {
return 1;
} else { return 0; }
}
public static function logout() {
//session_nam... | true |
76ba87bf4f611b555383d6be33714744ec48b41a | PHP | nuwave/lighthouse-ws | /src/WebSocket/ContextManager.php | UTF-8 | 4,210 | 2.609375 | 3 | [] | no_license | <?php
namespace Nuwave\Lighthouse\Subscriptions\WebSocket;
use Closure;
use Nuwave\Lighthouse\Subscriptions\WebSocket\Context\PassportContext;
use Nuwave\Lighthouse\Subscriptions\WebSocket\Context\SubscriberContext;
class ContextManager
{
/**
* The application instance.
*
* @var \Illuminate\Founda... | true |
c35fc0af19c7ba9506dcf42d8c48083636a3dc2f | PHP | muathuvang95/thietkenoithat.loc | /wp-content/plugins/unyson/framework/extensions/social/extensions/social-twitter/class-fw-extension-social-twitter.php | UTF-8 | 2,485 | 2.53125 | 3 | [
"GPL-3.0-only",
"MIT",
"GPL-2.0-or-later"
] | permissive | <?php if ( ! defined( 'FW' ) ) {
die( 'Forbidden' );
}
class FW_Extension_Social_Twitter extends FW_Extension {
/**
* @internal
*/
public function _init() {
$this->add_filters();
}
private function add_filters() {
add_filter( 'fw_ext_social_tabs', array( $this, '_filter_fw_ext_social_tabs' ) );
}
/**... | true |
f5cba311074bcbfee2ad75793d7e66a3d2ef725e | PHP | sdicpam44/Twig-extensions | /lib/Twig/Extensions/Extension/Text.php | UTF-8 | 3,470 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @author Henrik Bjornskov <hb@peytz.dk>
*/
class Twig_Extensions_Extension_Text extends Twig_Extension
{
... | true |
847cb48066446f7fa24a11cad5b9e662a534547f | PHP | LucasViniciusDev/Laravel-Github | /app/Repositories/UsersRepository.php | UTF-8 | 384 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Interfaces\IUsersRepository;
use App\Helpers\Http\HttpRequest;
class UsersRepository implements IUsersRepository
{
public function getAll()
{
return HttpRequest::instance()->get('users');
}
public function getByName(string $userName)
{
re... | true |
bcb26c222a3d10b140aa56468062d380a09351d8 | PHP | javanile/vtiger | /upgrade/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema.php | UTF-8 | 8,768 | 3.09375 | 3 | [
"MIT",
"LGPL-2.0-or-later",
"LicenseRef-scancode-rsa-md4",
"HPND-sell-variant",
"Zlib",
"LicenseRef-scancode-generic-trademark",
"LicenseRef-scancode-zeusbench",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"Beerware",
"LicenseRef-scancode-prop... | permissive | <?php
/**
* Configuration definition, defines directives and their defaults.
*/
class HTMLPurifier_ConfigSchema {
/**
* Defaults of the directives and namespaces.
* @note This shares the exact same structure as HTMLPurifier_Config::$conf
*/
public $defaults = array();
/**
* The defa... | true |
1d4c708f8c0e42af73ea3e9676b98bbe4fd644b2 | PHP | zjj2wry/shopcar | /products.php | UTF-8 | 1,744 | 2.671875 | 3 | [] | no_license | <?php
require("db.php");
require("functions.php");
$validid = pf_validate_number($_GET['id'], "redirect", $config_basedir);
require("header.php");
// 从数据库中选取于网页get到的id一致的分类下所有商品 并将取到的结果赋给变量$numrows
$prodcatsql = "SELECT * FROM products WHERE cat_id = " . $_GET['id'] . ";";
$prodcatres = mysqli_query($db, $pr... | true |
d77e5eae5e97942fbe1eb82ba3701751a77dcc4c | PHP | StrelkovIgor/test | /models/login.php | UTF-8 | 302 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
class login extends Model{
public $name;
public $password;
public function rules() {
return [
[['name','password'], 'required','message'=>"Обязательное поле"]
];
}
} | true |
2c2632e3ab4944da8a2243ad1eb07b050afb84f7 | PHP | cryptobuks/moex | /app/Console/Commands/CurrencyRate.php | UTF-8 | 1,286 | 2.75 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Models\Currency;
use GuzzleHttp\Client;
use Illuminate\Console\Command;
class CurrencyRate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'currency:rate';
/**
* The... | true |
7c9325518b58971d75b948b4df2281bc6cbf00cf | PHP | mikemudge/adventofcode18 | /puzzle10/puzzle.php | UTF-8 | 2,286 | 2.65625 | 3 | [] | no_license | <?php
$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . "input";
$data = file_get_contents($filename);
$lines = explode("\n", $data);
$particles = [];
foreach ($lines as $line) {
preg_match('/position=<\\s*(-?\d+),\\s*(-?\d+)> velocity=<\\s*(-?\d+),\\s*(-?\d+)>/', $line, $matches, PREG_OFFSET_CAPTURE);
$partic... | true |
36342721b5c25e1aa46530d8e9bb852fc26d6b59 | PHP | hrach/fimu-pv254-blog-post-recsys | /mahout/www/index.php | UTF-8 | 927 | 2.703125 | 3 | [] | no_license | <?php
function cmd_exec($cmd, &$stdout, &$stderr)
{
$outfile = tempnam(".", "cmd");
$errfile = tempnam(".", "cmd");
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("file", $outfile, "w"),
2 => array("file", $errfile, "w")
);
$proc = proc_open($cmd, $descriptors... | true |
32af0815f6741b3259814852fdc2c9170c5a2631 | PHP | kuatbekkazhytai/product-app | /app/Http/Helpers/ProductHelper.php | UTF-8 | 324 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Helpers;
class ProductHelper
{
public static function getColors() : array
{
return ['black', 'white', 'green', 'yellow','red', 'blue'];
}
public static function getCities() : array
{
return ['Moscow', 'Almaty', 'London', 'Berlin','Milan', 'Madrid'];
... | true |
b7755ecf5135ac560860d0ff14bde794449a78f8 | PHP | ivanovbg/Planets-Game-SoftUni | /Services/MailerService.php | UTF-8 | 1,712 | 2.875 | 3 | [] | no_license | <?php
namespace AppBundle\Services;
use Symfony\Component\DependencyInjection\Container;
class MailerService
{
private $conteiner;
private $swift;
public function __construct(\Swift_Mailer $swift_Mailer, Container $container)
{
$this->conteiner=$container;
$this->... | true |
aab2c1130af9a20f47b5de31b4ec3b921c985c77 | PHP | guerinm/tp2016 | /example/facebook/exofacebook.php | UTF-8 | 1,069 | 3.234375 | 3 | [] | no_license | <?php
abstract class Social {
protected $msg;
public function __construct($msg)
{
$this->msg = $msg;
}
public abstract function getMsg();
}
class Facebook extends Social {
public function getPost() {
return $this->msg;
}
public function getMsg()
{
return ... | true |
65957fbeea6e6ee0507258be45b7b28b69d1e612 | PHP | MikeRzhevsky/php-curl | /src/source.php | UTF-8 | 492 | 2.671875 | 3 | [] | no_license | <?php
$a = $_GET['a'];
$b = $_GET['b'];
if($a || $b) {
echo $a + $b;
}else {
$arr = array(
array(
"region" => "Moscow",
"price" => "10000"
),
array(
"region" => "Kaluga",
"price" => "500"
),
arr... | true |
63576a8e378863e3b06a9b414c845797797d9485 | PHP | benjaco/Highway | /src/benjaco/Highway/Parser.php | UTF-8 | 5,322 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace benjaco\Highway;
class Parser
{
private static $options = [
"int" => "\d+",
"other_then_slash" => "[^\/]+"
];
/**
* @param $name string Name of the placeholder patten
* @param $regexPatten string The regular expression for the patten, no need for outer grouping.... | true |
5a44d6e7f6721dadf145a7cebceabe567facc7ff | PHP | run417/sbwms | /src/Model/Employee/Shift.php | UTF-8 | 909 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace sbwms\Model\Employee;
class Shift {
private $shiftStart;
private $shiftEnd;
private $breakStart;
private $breakEnd;
public function __construct(array $args) {
$this->shiftStart = $args['shiftStart'];
$this->shiftEnd = $args['shiftEnd'];
$this->breakStart =... | true |
a481701ff79d13b11260c200cac6e0edb3ff4063 | PHP | norwingc/laravel-init | /app/Http/Controllers/UserController.php | UTF-8 | 702 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class UserController extends Controller
{
public function login(Request $request)
{
$credentials = $request->only('email', 'password');
if (Auth::attempt($credentials)) {
re... | true |
4dc1bf1ceaef60461bfb913d0916257168b74920 | PHP | smartsolutionsitaly/cakephp-purifier | /src/Shell/PurifierShell.php | UTF-8 | 3,155 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* cakephp-purifier (https://github.com/smartsolutionsitaly/cakephp-purifier)
* Copyright (c) 2019 Smart Solutions S.r.l. (https://smartsolutions.it)
*
* HTML Purifier for CakePHP
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE
* Redistributions o... | true |
c03e837917444be7343dc13d2ada76fdfda686a0 | PHP | pechischev-old/PMP | /src/AppBundle/Entity/UserHistory.php | UTF-8 | 2,305 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Владимир
* Date: 24.12.2017
* Time: 19:48
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="userHistory")
*/
class UserHistory
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(str... | true |
ec21afbaeb0ca85d437720c5d68fa02679702453 | PHP | liwenchiou/Newpalace_WorkFlow | /tool/dbconfig.php | UTF-8 | 1,025 | 2.6875 | 3 | [] | no_license | <?php
//連接帳號資料表,檢查帳密是否正確
// $db_server = "sql200.web.youp.ga:3306"; //資料庫主機位置
$db_user = 'sa'; //資料庫的使用帳號
$db_password = 'esum'; //資料庫的使用密碼
$db_name = 'NPG'; //資料庫名稱
//PDO的連接語法
try {
//$pdo = new PDO("mysql:host=$db_server;dbname=$db_name", $db_user, $db_password);
//測試用
$pdo = new PDO("sqlsrv:Server=192.1... | true |
3edba3afcd7226c75200780b8841281eeda36e2b | PHP | KapiX/vsm | /app/Model/PasswordToken.php | UTF-8 | 1,152 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
App::uses('AppModel', 'Model');
class PasswordToken extends AppModel {
public $primaryKey = 'token';
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id'
)
);
public function createToken($user_email) {
$user... | true |
38b106182ec927aec1aad07b730940d7a6b0b386 | PHP | gilang0601/kalkuphp | /kalku.php | UTF-8 | 1,996 | 2.828125 | 3 | [] | no_license | <html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-w... | true |
c0243ab0cd1277c22c1ced1799fda7873ea7054e | PHP | 922/design-patterm | /prototype.php | UTF-8 | 586 | 3.171875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hp
* Date: 2015/5/14
* Time: 0:41
*/
//抽象接口
interface Prototype{public function copy();}
//具体原型
class ConcretePrototype implements Prototype{
private $name;
function __construct($name){$this->name=$name;}
public function copy(){
return... | true |
067dc044c7984f443c56ec8bf6b1d2a2f8363a1e | PHP | purjahini/backendsipak | /admina/cetak_sertifikat.php | UTF-8 | 3,102 | 2.515625 | 3 | [] | no_license | <?php
include('config.php');
include('fpdf/fpdf.php');
date_default_timezone_set('Asia/Jakarta');// change according timezone
$currentTime = date( 'd-m-Y h:i:s A', time () );
$id_client = $_POST['id_client'];
// $id_client =3;
$query_event=mysqli_query($db,"SELECT * FROM event_tb");
$pecah_event = mysqli_fetch_array... | true |
a90fd088b9743a170de7637ab1a82354a18c9e71 | PHP | chabby-hao/laravel_admin | /app/Logics/StatLogic.php | UTF-8 | 6,532 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Logics;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
class StatLogic extends BaseLogic
{
/**
* 日活跃
* @param $keypre string 渠道|客户|场景
* @param $id
* @param $data
*/
public static function setDailyActive($data, $keypre, $id)
{
$cacheTime = Ca... | true |
6973fdc67dc3faf3fe715ff2d04db9a375df9cb2 | PHP | RolandSamidu/IWT | /crud/db.php | UTF-8 | 1,087 | 2.9375 | 3 | [] | no_license | <?php
function createdb(){
$severname = "localhost";
$username = "root";
$password = "";
$dbname = "TrainerManage";
//connection
$connection = mysqli_connect($severname,$username,$password);
//check connection
if(!$connection){
die("connection Failed:" .mysqli_con... | true |
234b06012c82df763f4b2e1330b0fcfb2480b385 | PHP | corpus47/linkmob | /public/p.php | UTF-8 | 369 | 3.1875 | 3 | [] | no_license | <?php
abstract class alap {
public $class_name;
public function __construct(){
}
public function setname() {
$this->class_name = __CLASS__;
}
}
class peldany extends alap {
public function __construct() {
$this->setname();
var_dump($this->class_name);
... | true |
4ff1f62a60a0a74dd683d517652ffc956cc5fcd7 | PHP | pierresilva/baseline-fb | /database/seeders/DogsTableSeeder.php | UTF-8 | 628 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Schema;
class DogsTableSeeder extends Seeder
{
/**
* Run the database seeders.
*
* @return void
*/
public function run()
{
Schema::disableForeignKeyConstraints();
$faker = Faker\Factory::create();
... | true |
107b2bd08314724562a53384880d78222ad34dde | PHP | mollie/Shopware | /Components/Attributes.php | UTF-8 | 2,658 | 2.671875 | 3 | [] | no_license | <?php
namespace MollieShopware\Components;
class Attributes
{
/**
* @var \Shopware\Components\Model\ModelManager
*/
protected $modelManager;
/**
* @var \Shopware\Bundle\AttributeBundle\Service\CrudServiceInterface
*/
protected $crudService;
/**
* Attributes constructor
... | true |
785d3ec6947bd7acf638f7c811c598973b8e9152 | PHP | ducga1998/nckh-managerstudent-laravel-reactjs | /app/Listeners/ListenerBase.php | UTF-8 | 488 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Services\Statut;
class ListenerBase
{
/**
* The Statut instance.
*
* @var App\Services\Statut
*/
protected $statut;
/**
* Create the event listener.
*... | true |
4cd197bd3476e00f1ae49571db6fc2279990d312 | PHP | BagusJK/latihan2 | /application/controllers/Home.php | UTF-8 | 1,086 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Home extends CI_Controller{
public function index(){
echo "Saya Lagi Belajar Codeigniter !";
}
public function about($nama,$kelas){
echo "Nama Saya: $nama, Kelas:$kelas";
}
public function math($bilangan){
if($bilangan % 2 =... | true |
63cd518df8e7767d08200795d7de1a70e2e65902 | PHP | sasd13/website-original | /Pages_libres/Commentaires.php | ISO-8859-1 | 5,060 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if (isset($_SESSION['login']))
{
$statut = "En ligne";
}
else
{
$statut = "Hors ligne";
}
$db = pg_connect("host=localhost dbname=projet user=postgres password=samir") or die('Connexion impossible!!!');
$query_allcomments = pg_query($db, "SELECT id_comment, login_comment, date... | true |
65d4fcdcfa455c1008bb683ded7da876178f476a | PHP | nairi-abgaryan/event | /src/AppBundle/Service/Manager/UserManager.php | UTF-8 | 1,439 | 2.796875 | 3 | [] | no_license | <?php
namespace AppBundle\Service\Manager;
use AppBundle\Entity\User;
use AppBundle\Repository\UserRepository;
use Doctrine\ORM\EntityManager;
class UserManager
{
/**
* @var UserRepository
*/
private $repository;
/**
* @var EntityManager
*/
private $em;
/**
* UserManage... | true |
2e268220203f21b0913659a9bbf281d80ed88634 | PHP | webeweb/core-library | /src/quadratus/Model/Proprete/ArticlesPrevention.php | UTF-8 | 1,729 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the core-library package.
*
* (c) 2018 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Library\Quadratus\Model\Proprete;
/**
* Articles prevention.
*
* @author webeweb <ht... | true |
e2ae0d3ab1525006be7372b6d5433864f484ad6d | PHP | beeblub/asciimega | /ref/userslog.php | UTF-8 | 2,479 | 2.859375 | 3 | [] | no_license | <?php
//if not included yet
include_once("tracker.php");
$list = get_userlist();
echo "Users Online: ".count($list);
echo "<br><br>";
$visitors = array ();
foreach ($list as $ident => $item)
{
if ( isset($visitors[$item[1]]) == false)
$visitors[$item[1]] = 1;
else
$visitors[$item[1]] += 1;
}
echo "<table>";
... | true |
8fd496a688cf420f1cb7a63765b86c81baf81873 | PHP | ahmedesa/Gawebny | /app/Http/Controllers/SiteSettingController.php | UTF-8 | 934 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\SiteSetting;
use Illuminate\Http\Request;
class SiteSettingController extends Controller
{
public function index()
{
$settings = SiteSetting::all();
return view('dashbord.sitesetting' , compact('settings'));
}
public function update(Request $request , SiteSetting... | true |
39cade3a47f3ca955e57bf08073db036ae9d483b | PHP | pimpmypixel/confirmit-authoring | /src/StructType/Page.php | UTF-8 | 10,090 | 2.59375 | 3 | [] | no_license | <?php
namespace Confirmit\Authoring\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for Page StructType
* @subpackage Structs
*/
class Page extends QuestionnaireNode
{
/**
* The Order
* Meta informations extracted from the WSDL
* - use: required
* @var st... | true |