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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0d44994bef45f5943e160da65b4932bdd8ac29a2 | PHP | Orion9723/ProjetPHP | /models/Member.class.php | UTF-8 | 2,325 | 3.046875 | 3 | [] | no_license | <?php
class Member
{
private $_member_id;
private $_pseudo;
private $_name;
private $_forename;
private $_number;
private $_email;
private $_address;
private $_bank;
private $_password;
private $_photo;
public function __construct($member_id,$pseudo,$name, $forename, $numbe... | true |
db1c8f2aa8efa2f20ab7b95e695a3340697d8d98 | PHP | songyichao/laravel | /app/model/Teacher.php | UTF-8 | 2,526 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: MIOJI
* Date: 2016/12/12
* Time: 上午10:12
*/
namespace App\model;
use Illuminate\Database\Eloquent\Model;
class Teacher extends Model
{
//指定表名
protected $table = 'teacher';
//指定主键
protected $primaryKey = 'id';
//自动维护时间
public $timestamps = true;
//允许批量赋值的字段
... | true |
cbe034f56127a801bf6d133e68a45c013e802756 | PHP | rattios/proyTecprecincCompras | /tecprecincComprasAPI/app/Mensaje.php | UTF-8 | 1,028 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Mensaje extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'mensajes';
// Eloquent asume que cada tabla tiene una clave primaria con una columna llamada id.
// Si éste n... | true |
9eae49cfd00b1911bbdb23220091ce2ce87e7f82 | PHP | WalentinG/service-bus | /src/Infrastructure/MessageSerialization/Symfony/Extensions/PropertyNameConverter.php | UTF-8 | 1,357 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* PHP Service Bus (publish-subscribe pattern implementation)
* Supports Saga pattern and Event Sourcing
*
* @author Maksim Masiukevich <desperado@minsk-info.ru>
* @license MIT
* @license https://opensource.org/licenses/MIT
*/
declare(strict_types = 1);
namespace Desperado\ServiceBus\Infrastructure\... | true |
ea1bc7aa8961e27b26f31854913433be37737312 | PHP | phphacks/zend-entitymapper | /src/Db/Sql/Factory/Select/SelectFactory.php | UTF-8 | 2,796 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Zend\EntityMapper\Db\Sql\Factory\Select;
use Zend\Db\Sql\Select;
use Zend\EntityMapper\Config\Container\Container;
use Zend\EntityMapper\Db\Sql\Parsing\SelectParser;
/**
* SelectFactory
*
* @package Zend\EntityMapper\Db\Sql\Factory\Select
*/
class SelectFactory implements SelectFactoryInterface
{... | true |
756a58fe835f158ea5536486ad6e90424e95c073 | PHP | andrewyohanes123/dispar | /app/Http/Controllers/FacilitiesController.php | UTF-8 | 5,960 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Site;
use App\SiteType;
use App\Facility;
use App\SitePicture;
class FacilitiesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index... | true |
bec36b7e1e88ed0a5fabc3dff85f23a4b5e8e4da | PHP | Desch/EmuDevstore | /community/wcf/lib/action/StatusSaveAction.class.php | UTF-8 | 1,040 | 2.75 | 3 | [] | no_license | <?php
// wcf imports
require_once(WCF_DIR.'lib/action/AbstractAction.class.php');
require_once(WCF_DIR.'lib/system/session/UserSession.class.php');
/**
* Saves the status of a specific page element. e.g. a closable list.
*
* @author Marcel Werk
* @copyright 2001-2009 WoltLab GmbH
* @license GNU Lesser General Pu... | true |
3b8061b7469bd920eb70c829a4868741a26b5e21 | PHP | HamidXoliqov/agency | /modules/structure/models/DepAddress.php | UTF-8 | 4,149 | 2.515625 | 3 | [] | no_license | <?php
namespace app\modules\structure\models;
use app\models\BaseModel;
use app\modules\manuals\models\Regions;
use Yii;
use yii\db\ActiveQuery;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "dep_address".
*
* @property int $id
* @property int|null $physical_region
* @property string|null... | true |
fd59c57222ae36ea2e15302262977b2a9394c9f4 | PHP | JPry/helpscout-api-php | /src/Conversations/Threads/Attachments/Attachment.php | UTF-8 | 3,838 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace HelpScout\Api\Conversations\Threads\Attachments;
use HelpScout\Api\Assert\Assert;
use HelpScout\Api\Entity\Extractable;
use HelpScout\Api\Entity\Hydratable;
class Attachment implements Extractable, Hydratable
{
/**
* @var int
*/
private $id;
/**
*... | true |
e7211e1e642cdfa3e28c34bca4b7051539c00c0a | PHP | marcguyer/mezzio-doctrine-oauth2-example | /src/Data/Entity/OAuthClient.php | UTF-8 | 3,777 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Data\Entity;
use Doctrine\ORM\Mapping as ORM;
use League\OAuth2\Server\Entities\ClientEntityInterface as OAuthClientInterface;
use Mezzio\Authentication\UserInterface as MezzioUserInterface;
#[ORM\Table(name: "oauth_clients")]
#[ORM\Entity(repositoryClass: \Data\Repository\OA... | true |
81f97797106141026266e9db164c34937dff233d | PHP | i4web/wp-i4web-lms | /includes/class-i4-wpcw.php | UTF-8 | 20,320 | 2.640625 | 3 | [] | no_license | <?php
/**
* i-4Web WPCW Shortcodes
*
* This class handles creating shortcodes and functions that utilize WPCW data
*
* @package I4Web_LMS
* @subpackage Classes/WPCW
* @since 1.0.0
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
/**
* I4_LMS_EMAILS Class
*
* @since 1.0
*/
... | true |
2019d26d30981ab5ab525d446299a4d9e5a8ecb0 | PHP | horaceweng/AI-Course | /PHP/訂便當/bd-dblink.php | UTF-8 | 1,749 | 2.65625 | 3 | [] | no_license | <?php
$host = '127.0.0.1:8889';
$user = 'root';
$passwd = 'root';
$database = "AI05";
$connect = new mysqli($host, $user, $passwd, $database);
if ($connect->connect_error)
die('連線失敗: '.$connect->connect_error);
//else {
// echo '連線成功<BR>';
//}
?>
<?php
function get_account($connect)
{
$connect... | true |
0ba4cdd3d9f84d6aa3b995c6223cf6bbbde557a0 | PHP | shcloudservices/agiletourreg | /src/SHCloud/Bundle/RegisterBundle/Service/RegistroService.php | UTF-8 | 1,225 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace SHCloud\Bundle\RegisterBundle\Service;
use SHCloud\Bundle\RegisterBundle\Entity\Usuario;
use SHCloud\Bundle\RegisterBundle\Exception\RegisterException;
class RegistroService {
protected $entityManager;
protected $mailer;
public function __construct(\Doctrine\ORM\EntityManager $entityMan... | true |
173aa86f58c14f589101f88e2b420ca9cfd4f55c | PHP | mwmachingura/subscriptions | /adduser.php | UTF-8 | 1,703 | 2.65625 | 3 | [] | no_license | <?php
$servername = 'localhost';
$username = '';
$pword = '';
$dbname = 'subscriptions_db';
//Create the connection
$conn = new mysqli($servername, $username, $pword, $dbname);
//Connection Check
if ($conn->connect_error) {
die("Connection error: ". $conn->connect_error);
}
//Check form for completenes... | true |
13d75bcf2e0a3a348884c08281c1e30b9618fb65 | PHP | y-ohgi/spajam_2016 | /fuel/app/classes/controller/guides.php | UTF-8 | 2,780 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class Controller_Guides extends Controller_Base
{
/**
* 案内一覧、案内詳細
*
* [GET] /guides => 案内一覧
* [GET] /guides? => 案内一覧絞込
* [GET] /guides/:id => 案内詳細
*
* $this->param; => :id
*/
public function get_index(){
$res = array(
"status" => 200,
... | true |
3c12154bde3c172bf0476127f4472fd74ca51a2f | PHP | Siri0008/Online-book-reading- | /LoginA.php | UTF-8 | 4,394 | 2.953125 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
// Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
header("location: Welcome.php");
exit;
}
// Include config file
require_once "Db.php";
// Define variable... | true |
89d71e97f2ff1064b65dfe9ccc1a5132530d3bce | PHP | dirkwinkhaus/widi-sortit | /test/Unit/Option/AscendingTest.php | UTF-8 | 889 | 2.671875 | 3 | [] | no_license | <?php
namespace Widi\SortIt\Option;
use PHPUnit\Framework\TestCase;
/**
* Class AscendingTest
* @package Widi\SortIt\Option
*/
class AscendingTest extends TestCase
{
/**
* @dataProvider dataProvider
* @test
*/
public function itShouldCompareAsc(array $data)
{
$asc = new Ascen... | true |
3a49789cb332f7a548e9888da175525f27861ec9 | PHP | PapooSoftware/PapooCMS | /plugins/messeverwaltung/lib/messeverwaltungplugin_class.php | UTF-8 | 18,726 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* #####################################
* # CMS Papoo #
* # (c) Dr. Carsten Euwens 2008 #
* # Authors: Carsten Euwens #
* # http://www.papoo.de #
* # Internet #
* #####################################
* # PHP Version >4.2 ... | true |
6200f67ec694a2122b5b511a79161bf713579cfc | PHP | igor42/sabretooth | /api/ui/sample_view.class.php | UTF-8 | 2,619 | 3.015625 | 3 | [] | no_license | <?php
/**
* sample_view.class.php
*
* @author Patrick Emond <emondpd@mcmaster.ca>
* @package sabretooth\ui
* @filesource
*/
namespace sabretooth\ui;
/**
* widget sample view
*
* @package sabretooth\ui
*/
class sample_view extends base_view
{
/**
* Constructor
*
* Defines all variables which ne... | true |
f2ce91f6e0b8dbe68e9822a3c9b309aaf32ca773 | PHP | TEnders64/OnlineLamp_Lectures | /Week2_Advanced/gng/index.php | UTF-8 | 1,176 | 3.453125 | 3 | [] | no_license | <?php session_start();
if (!isset($_SESSION['number'])){
$_SESSION['number'] = rand(1,100);
}
var_dump($_SESSION);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Great Number Game</title>
<style media="screen">
.red{
color: red;
}
.green{
color:... | true |
915ae9ca0416e964bdf4d4e84c976d4fb028d834 | PHP | akuldaev/log_php | /src/Stdout.php | UTF-8 | 156 | 2.796875 | 3 | [] | no_license | <?php
class Stdout extends Logger
{
static function StdoutFunc ($msg) {
echo "STDOUT:\n";
fwrite(STDOUT, self::logFunc($msg));
}
}
| true |
e62d5edffcd4d6d79c2fef46071017806a6cdc51 | PHP | Jwarfield815/php-class-projects | /final_project_excercise/index.php | UTF-8 | 8,749 | 2.953125 | 3 | [] | no_license | <!--
- This project allows the user to register multiple students for school.
-
- Names: Nathanael Nading
- Aaron Adams
- Zakariya Sh-Adam
- Date: April 15, 2020
-->
<html>
<head>
<link rel="stylesheet" href="index.css">
<title>Student Registration Form</title>
</head>
<body... | true |
4fe1a87a55deca19b1e4710bc6525075aea89833 | PHP | antwigambrah/laravel-api-starter | /app/Account/Domain/Repositories/Contracts/BaseRepositoryInterface.php | UTF-8 | 249 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Account\Domain\Repositories\Contracts;
Interface BaseRepositoryInterface
{
/**
* Create a new resource
*
* @param array $resource
* @return mixed
*/
public function create(array $resource);
} | true |
61b76758bc2a89f61325708388b9228f8cc75967 | PHP | soachishti/My-Web-Projects | /smschimp/view/viewsubscriber.php | UTF-8 | 3,220 | 2.578125 | 3 | [] | no_license | <ol class="breadcrumb">
<li><a href="index">Home</a></li>
<li><a href="list">List</a></li>
<li class="active">View Subscriber</li>
</ol><hr />
<?php
if (!isset($_GET['id']) && empty($_GET['id'])) {
header("Location: list");
die();
}
use PrettyDateTime\PrettyDateTime;
if (isset($_GET['remove']) && !empt... | true |
3bef0b85413d97831e7f5c4d543bd140c328f4d8 | PHP | tomir/q | /engine/libraries/Enp/Tool/Numbers.php | UTF-8 | 459 | 3.3125 | 3 | [] | no_license | <?php
namespace Enp\Tool;
/**
* @category Enp
* @package Enp_Tool
* @author Artur Świerc
*/
class Numbers
{
/**
* return true if both $from and $to are null
*
* @param float|null $from
* @param float|null $to
* @param float $value
*/
public static function isBetween($from, $to, $value)
{
if... | true |
403df8705c7d6764a1571dac5fb4b879aeed1b13 | PHP | mackilroy007/CF-PHP-Day1-Bumberger | /index.php | UTF-8 | 3,398 | 3.171875 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.mi... | true |
1bd53b4061c80ae22fdc0b8d6093bd7263145aa1 | PHP | networq/networq-cli | /src/Command/LinkCommand.php | UTF-8 | 1,836 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Networq\Cli\Command;
use RuntimeException;
use Networq\Cli\AutoGraphLoader;
use Networq\Loader\PackageLoader;
use Networq\Model\Graph;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Componen... | true |
7d99dd50c137a154965fd677c9b84eaf25dab108 | PHP | hemasharshar/cart_task | /app/Repositories/ProductsRepository.php | UTF-8 | 773 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Products;
use App\Repositories\BaseRepository;
/**
* Class UserRepository
* @package App\Repositories
*/
class ProductsRepository extends BaseRepository
{
/**
* @var array
*/
protected $fieldSearchable = [
'name',
'description',
... | true |
470dded5a0186ea878c00560caa86132755c2463 | PHP | getcandy/candy-api | /src/Installer/Runners/LanguageRunner.php | UTF-8 | 1,008 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace GetCandy\Api\Installer\Runners;
use DB;
use GetCandy\Api\Installer\Contracts\InstallRunnerContract;
class LanguageRunner extends AbstractRunner implements InstallRunnerContract
{
/**
* @var \Illuminate\Support\Collection
*/
protected $availableLanguages;
public function __const... | true |
07967b8d1dcb0b188af08a83014f99deae5d85f6 | PHP | TimeToogo/Pinq | /Source/Providers/DSL/Compilation/Processors/Structure/StructuralExpressionProcessor.php | UTF-8 | 1,764 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Pinq\Providers\DSL\Compilation\Processors\Structure;
use Pinq\Expressions as O;
use Pinq\PinqException;
use Pinq\Providers\DSL\Compilation\Parameters;
use Pinq\Providers\DSL\Compilation\Parameters\ResolvedParameterRegistry;
use Pinq\Queries\Functions\IFunction;
/**
* Base class of the structural exp... | true |
16aa4ddfa91eaf352cac5ddbcfc8d14fbe890927 | PHP | maintaina-com/Db | /lib/Horde/Db/Adapter/Oracle/TableDefinition.php | UTF-8 | 2,798 | 2.671875 | 3 | [] | permissive | <?php
/**
* Copyright 2013-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (BSD). If you
* did not receive this file, see http://www.horde.org/licenses/bsd.
*
* @author Jan Schneider <jan@horde.org>
* @category Horde
* @license http://www.horde.org/licen... | true |
a96279e027d73b95a989f8b5d2f39fc343129784 | PHP | fingerman/PHP_fund | /HW2_FlowControl/1_SquareRootSum.php | UTF-8 | 677 | 3.234375 | 3 | [] | no_license | <html>
<body>
<table border="1">
<tr>
<th>Number</th>
<th>Square</th>
</tr>
<?php
$i = 0;
$x = 0;
$total = 0;
while ($i<=100) { ?>
<tr>
<td width="5">
<?php
echo $i;
$i = $i+2;
?>
</td>
<td w... | true |
893638f9c9ffc43422aba0f679c4e94660a169c5 | PHP | nmred/sf1 | /swan/markdown/sw_markdown.class.php | UTF-8 | 10,031 | 2.640625 | 3 | [] | no_license | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
// +---------------------------------------------------------------------------
// | SWAN [ $_SWANBR_SLOGAN_$ ]
// +---------------------------------------------------------------------------
// | Copyright $_SWANBR_COPYRIGHT_$
// +-... | true |
c69c03bf2792603041148a015279ae36b95c50d0 | PHP | keltuo/jsonschema-php-generator | /src/Model/Property/LengthItems.php | UTF-8 | 614 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace JsonSchemaPhpGenerator\Model\Property;
use JetBrains\PhpStorm\ArrayShape;
/**
* Class LengthItems
*
* @package JsonSchemaPhpGenerator\Model\Property
*/
class LengthItems extends Length implements \JsonSerializable, \Stringable
{
#[ArrayShape(['minItems' => "int|null",... | true |
a72cb9829df51e90a914e4cf0e82182986f81c80 | PHP | innoriseent/IssueTracking | /src/Http/Requests/Resources/ResourceRequest.php | UTF-8 | 935 | 2.671875 | 3 | [] | no_license | <?php
namespace Codeex\RoleAssignment\Http\Requests\Resources;
use App\Http\Requests\BaseRequestValidator;
use Codeex\RoleAssignment\Models\Resource;
use Validator;
class ResourceRequest extends BaseRequestValidator
{
public function validate(array $properties){
$validator = Validator::make($properties, ... | true |
e9eb94e02a9da0b3ecda92d894208d94d8efaa98 | PHP | Lexkane/Php | /Drupal/HW6/homework/connect.php | UTF-8 | 438 | 2.578125 | 3 | [] | no_license | <?php
$settings = [
'host' => 'mariadb',
'dbname' => 'drupal_lab',
'user' => 'drupal_lab',
'password' => 'drupal_lab',
];
try{
$pdo = new PDO("mysql:host=" .$settings['host'] . ";dbname=" .$settings['dbname'], $settings['user'], $settings['password']);
$pdo->setAttribute(PDO::ATTR_ERRMO... | true |
90f20712d047f401589ecb214dabfb654c4006c1 | PHP | mchellamuthu/dexter-vue | /app/Http/Resources/EventsCollection.php | UTF-8 | 813 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class EventsCollection extends ResourceCollection
{
/**
* Transform the resource collection into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toAr... | true |
f5502a0aad671570ca694715c2cd28ff688442f6 | PHP | llliuyang/LearnPHP | /get_IP/getip.php | UTF-8 | 1,995 | 2.6875 | 3 | [] | no_license | <?php
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set("PRC");
$ip = $_SERVER['REMOTE_ADDR'];
$citystr = file('city.txt');
function get_real_ip(){
$ip=FALSE;
//客户端IP 或 NONE
if(!empty($_SERVER["HTTP_CLIENT_IP"])){
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
//多重代理服务器下的客户端真实I... | true |
e26eb31eaf5d01c268a8919ffea923d9fcedf5a5 | PHP | Awesome-Kirill/kb-12 | /test.php | UTF-8 | 737 | 2.75 | 3 | [] | no_license | <?php
include "core.php";
const TEST_FAIL = "Test Faild";
const TEST_OK = "Test OK ";
$testDate = [
["data_set" => [12,10,9,7,4,3,2], "true_result"=>1],
[ "data_set" => [1, 6, 11, 5], "true_result"=>1],
[ "data_set" => [5,8,13,27,14], "true_result"=>3],
];
foreach ($testDate as $oneKeys) {
$resu... | true |
f5cdcd2c365047f426baa9232872fc94ac73c83a | PHP | kaushalbhavsar/scripts | /search.php | UTF-8 | 5,230 | 2.609375 | 3 | [] | no_license | <?php ini_set('max_execution_time', 300); ?>
<html>
<head>
<script Language="javaScript">
<!--
function Blank_TextField_Validator()
{
// Check the value of the element named text_name from the form named text_form
if (findform.val.value == "")
{
// If null display and alert box
document.write('<p style="color:red... | true |
db269bc4f0a67bc5c7fe4fff254ebbd760b09b00 | PHP | Fring02/OnlineCinema | /style.php | UTF-8 | 334 | 2.53125 | 3 | [] | no_license | <?php
header("Content-type: text/css");
require_once "database.php";
$res = mysqli_query($connection, "SELECT film_name from films");
$row = mysqli_fetch_all($res, MYSQLI_ASSOC);
$i = 1;
foreach($row as $film):
?>
#img<?=$i++?>:hover:after{
content: <?php echo "'".$film['film_name']."';";?>
}
<?php
endforeach;... | true |
39a7e502b38f516dffa4351eccf02ceb5b4daf06 | PHP | nmfzone/get-pejer-web | /app/Models/Concerns/HasCreator.php | UTF-8 | 653 | 2.875 | 3 | [] | no_license | <?php
namespace App\Models\Concerns;
use App\Models\User;
trait HasCreator
{
/**
* Constrain the given query by the provided creator.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param mixed $creator
* @return \Illuminate\Database\Eloquent\Builder
*/
public fun... | true |
1a8293a708145685a204546c7d137ab82fc463b8 | PHP | nguyenvannghiand/PHPCODECLASS | /session14/vd4.php | UTF-8 | 256 | 2.90625 | 3 | [] | no_license | <?php
class SinhVien{
public function __construct($hoten)
{
echo "<h1>Ham tao tu dong goi</h1>";
echo "<h1>$hoten</h1>";
}
}
// Co the goi thang class sinhvien ma khong can gan vao mot bien doi tuong
new SinhVien("Nguyen Van A");
?>
| true |
c20735fbf2dea0d37a6eb8cf43fc79494cb0d67b | PHP | sayanmohsin/emptag | /application/views/pages/calculate.php | UTF-8 | 1,838 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
$server = "localhost";
$username = "root";
$password = "";
try {
$con = new PDO("mysql:host=$server;dbname=courses", $username, $password);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
echo "Connection failed: " . $e->getMessage();
}
$course = ... | true |
17b6e52bd747631f849be4b3f0248d07b23dd7f3 | PHP | tuananhnva/film | /libraries/functions/support_sql.php | UTF-8 | 1,923 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: hung
* Date: 14/01/17
* Time: 01:16
*/
if (!function_exists('generate_sql_batch_insert'))
{
/**
* Created by : BillJanny
* Date: 01:17 - 14/01/17
* Function tao ra mot chuoi dung de insert
* @param string $table : ten table can insert
* @param ... | true |
8a0baaf23072c04e0f9dad56b4acd7ff3ccc88d4 | PHP | NFLinz/buchungstool | /php api/buchung/create.php | UTF-8 | 5,134 | 2.53125 | 3 | [] | no_license | <?php
// required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-... | true |
6af6bc3aadc89ea1840e9a87a0a317bbbe74d008 | PHP | saborpl/portfolio | /php-sql/smarty/php/inc/edit_sprzedaz.php | ISO-8859-1 | 3,327 | 2.609375 | 3 | [] | no_license | <?
$link = mysql_connect($server, $db_user, $db_pass);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db ($db_name);
//if (isset($_FILES['image']) && $_FILES['image']['size'] > 0) {
if (isset($_REQUEST['edit'])) {
$query = "SELECT id FROM ksiazki";
$res = mysql_query($query) or die(... | true |
3120b6c376595bcb5f3482b591a77febc1aef8c8 | PHP | cduddy/JunkAway | /RecoverPassword.php | UTF-8 | 933 | 2.765625 | 3 | [] | no_license | <?php
/*
* Following code will validate a users given credentials
*/
include 'db_connect.php';
// check for post data
if (isset($_POST['FirstName'])&& isset($_POST['LastName'])&& isset($_POST['Email']))
{
$FirstName=$_POST['FirstName'];
$LastName=$_POST['LastName'];
$email=$_POST['Email'];
$sql = "SELECT ... | true |
37cb263683588a63083216fafb52ad7cf60a5211 | PHP | Anh-Kiet-VO/BDW1-Projet | /php/photo.php | UTF-8 | 4,923 | 3.09375 | 3 | [] | no_license | <?php
/* Récupère les chemins de toutes les images */
function getImagesPaths($link)
{
$query = "SELECT P.nomFich FROM Photo P";
$pathsList = array();
foreach ($link->query($query) as $row) {
$pathsList[] = $row['nomFich'];
}
return $pathsList;
}
/* Récupère les chemins des images de la ca... | true |
1f3e67d529d879455b91bbff537ae7985ff3ee26 | PHP | bmcculley/user_controller | /examples/forgot.php | UTF-8 | 1,818 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Page for users reset forgotten passwords
*/
session_start();
require_once('../user_controller.php');
$login = new Login();
if (isset($_POST['Submit'])) {
$login->forgot_password($_REQUEST['email']);
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[i... | true |
9768de59a3f8114c15054d7299bd53f3061bac33 | PHP | Hetal2425/auto-loads-web-yii2 | /backend/controllers/migration/AdminController.php | UTF-8 | 4,516 | 2.75 | 3 | [] | no_license | <?php
namespace backend\controllers\migration;
use common\models\Admin;
use Yii;
/**
* Class AdminController
*
* This controller is responsible for migrating administrators
*
* @package backend\controllers\migration
*/
class AdminController extends MigrateController
{
use MigrationTrait;
const KLASE_A... | true |
6bc5113f4242f6926ad6935ef0bccd0b1727e0ff | PHP | kislota/soc-comment | /core/social/AbstractAdapter.php | UTF-8 | 2,023 | 2.9375 | 3 | [] | no_license | <?php
namespace core\social;
use core\lib\Request;
/**
* Class AbstractAdapter
* @package core\lib\social
*/
abstract class AbstractAdapter
{
/**
* Social Client ID
*
* @var string null
*/
protected $appId = null;
/**
* Social Client Secret
*
* @var string null
... | true |
4c69f05fef791242670dcecb3545a6039ae8a757 | PHP | techagentng/loan_app | /application/models/My_wallet.php | UTF-8 | 4,962 | 2.625 | 3 | [] | no_license | <?php
class My_wallet extends CI_Model
{
/*
Determines if a given item_id is an item kit
*/
function exists($wallet_id)
{
$this->db->from('wallets');
$this->db->where('wallet_id', $wallet_id);
$query = $this->db->get();
return ($query->num_rows() == 1);
... | true |
c0d15144df754456b15208d13066f6474b45ca2a | PHP | unfoldedRoses/POS-Management-System-PHP-MYSQL-MVC-pattern | /Entire Point of sale php mysql mvc/ajax/datatable-products.ajax.php | UTF-8 | 3,375 | 2.578125 | 3 | [] | no_license | <?php
require_once "../controllers/products.controller.php";
require_once "../models/products.model.php";
require_once "../controllers/categories.controller.php";
require_once "../models/categories.model.php";
class productsTable{
/*=============================================
SHOW PRODUCTS TABLE
... | true |
0005127d630752ad3b624d257752f059bb144651 | PHP | JustJon/MarvelSongs | /classes/marvel.php | UTF-8 | 2,237 | 3.03125 | 3 | [
"CC0-1.0"
] | permissive | <?php
/**********************************************************************************
marvel.php
This class is for accessing the Marvel API - currently only getting character info
Copyright Jonathan Lazar 2015
**********************************************************************************/
class Marvel
{
priv... | true |
68c2e278b2376dabac1128cee1120aa9bc53e616 | PHP | ginanjarademulyana/pw2021_153040116 | /Praktikum/Tugas4/Latihan4a/index.php | UTF-8 | 2,193 | 2.515625 | 3 | [] | no_license | <?php
// Ginanjar Ade Mulyana
// 153040116
// https://github.com/ginanjarademulyana/pw2021_153040116
// Praktikum Jum'at 10:00 - 11:00 WIB
$conn = mysqli_connect("localhost", "root", "");
mysqli_select_db($conn, "pw_tubes_153040116");
$db_k = mysqli_query($conn, "SELECT * FROM kategori");
$db_p = mysqli_query($conn,... | true |
ae03cd587fa2405192191a48e1f255d62c60a16f | PHP | anhtuan150787/security | /module/Application/src/Application/Service/Model.php | UTF-8 | 265 | 2.703125 | 3 | [] | no_license | <?php
namespace Application\Service;
class Model {
private $services;
public function __construct($services)
{
$this->services = $services;
}
public function getModel($model)
{
return new $model($this->services);
}
} | true |
068b46a6732e6e37e7b0ad200923505873cc8773 | PHP | Rekhaperiasamy/Magento-Codebase | /app/code/Colissimo/Label/Model/Config/Source/Size.php | UTF-8 | 994 | 2.546875 | 3 | [] | no_license | <?php
/**
* Colissimo Label Module
*
* @author Magentix
* @copyright Copyright © 2017 Magentix. All rights reserved.
* @license https://www.magentix.fr/en/licence.html Magentix Software Licence
* @link https://colissimo.magentix.fr/
*/
namespace Colissimo\Label\Model\Config\Source;
use Magento\Framewo... | true |
e2eacaf22e115dd3587b42775a84d81051e0e9d6 | PHP | giairomauro/ProgettoVenditaPiccolaNegozianti | /Implementazione/MVCOnline/application/models/admin.php | UTF-8 | 2,921 | 3.40625 | 3 | [] | no_license | <?php
/**
* Class Admin Classe che gestisce la connessione
* alla tabella "amministratore"
*/
class Admin
{
/**
* @var Connection variabile della connessione
*/
private $connection;
/**
* Admin constructor Contruttore che imposta la connessione
*/
public function __construct()
... | true |
da1321aee8ca6e24f92868334c1d4df0aa9cfee1 | PHP | tomrusiecki/podcast-site-example | /app/Services/PodcastFeedService.php | UTF-8 | 3,470 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Episode;
use App\Show;
use DOMDocument;
use getID3;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Http\Request;
/**
* Class PodcastFeedService
*
* Service class for generating podcast rss feeds
*
* @package App\Services
*/
class PodcastFeedService
{
/**
... | true |
f9cbde887e596f05b476d759577b2fb3d47d8fe5 | PHP | alexandreaco/drupal-theming | /themes/classic2Responsive/templates/semanticviews-view-unformatted--Athletics-Team-Content--node-content-1.tpl.php | UTF-8 | 1,000 | 2.859375 | 3 | [] | no_license | <?php
// $Id: semanticviews-view-unformatted.tpl.php,v 1.1.2.3 2009/09/19 22:33:48 bangpound Exp $
/**
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
/* set initial record variables */
$team_wins = 0;
$team_losses = 0;
$team_t... | true |
8d43afb22731b1e71d9e9af3257a9cb5380b0039 | PHP | AlexPitTech/test-coupons | /src/ParsingJob.php | UTF-8 | 1,404 | 2.609375 | 3 | [] | no_license | <?php
namespace ClickTest\Coupons;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Exception;
class ParsingJob implements ShouldQueue
{
use Dispatchable, Inte... | true |
5ccbe52d62fc8dca47e5d6ef969236d69b96aaa8 | PHP | andrecurvello/checker | /probe/functions.php | UTF-8 | 7,127 | 2.703125 | 3 | [] | no_license | <?php
error_reporting(0);
header("content-type: application/json");
include 'VersionParser.php';
function read_file($file)
{
if(!file_exists($file))
return false;
return @file_get_contents($file);
}
function get_nodes($nodes)
{
$node_count = count($nodes);
$curl_arr = array();
$master... | true |
2b683d396ce2c1d66c58994b4d4f81a4406ec4ba | PHP | holalluis/magicosona | /mkm.php | UTF-8 | 5,981 | 2.96875 | 3 | [] | no_license | <?php
/** Api configuration */
$api = "https://www.mkmapi.eu/ws/v1.1";
$appToken = "FTiBvXliIVGJYVWM";
$appSecret = "SOp2VZwl5KRvGZ4d5yAkObRz99HSaN1m";
$accessToken = "82QknOtVb57k9IEERVJHEig337GM5t3m";
$accessSecret = "cSNjy850YUlEoWvjUMEXe53ak86MAbSO";
$url="$api/user/holalluis";
/** Authe... | true |
ae94c8ee12db257c366eada9dd2bf3da05606545 | PHP | Luishegaro/ventasgar | /models/dao/DetalleDAO.php | UTF-8 | 1,964 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models\dao;
use Yii;
use yii\db\mssql\PDO;
use app\models\DetalleForm;
class DetalleDAO extends \yii\base\Object{
/*public function delete(ClienteForm $cliente){
return Yii::$app->db->createCommand()->delete('cliente',
['id_cliente' => $cliente->id_cliente])->execute();
}*/
/*pu... | true |
c4a2a63efc79decd61382ced4ba856c017f2ee46 | PHP | graytalltone/beer-game-1 | /Character/gameView.php | UTF-8 | 1,987 | 2.5625 | 3 | [] | no_license | <?php
require_once("db.php");
require_once("gameModel.php");
?>
<head>
<title>Beer-game</title>
<style>
table {
width: 100%;
border-spacing: 0px;
border: 1px solid;
}
caption {
text-align: left;
padding-bottom: .25em;
font-size: 1.5em;
}
thead th... | true |
235fbce69455738659919bb595576bf6edca86b7 | PHP | CocoMC98000/vAMSYS | /database/migrations/2015_02_08_143907_add_pireps_columns.php | UTF-8 | 1,143 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddPirepsColumns extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('pireps', function(Blueprint $table)
{
$table->integer('landing_rate');
$tab... | true |
7e0773823bf3748259ed9c9a85e614ecec30df33 | PHP | ppgis/ppgisdev | /PPGISdev/test_input.php | UTF-8 | 1,695 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: beth
* Date: 14/12/17
* Time: 6:52 PM
*/
function walk_test_input(&$value,$key)
{
$value=test_input($value);
}
function test_input($data) {
if (is_string($data)) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($d... | true |
7ee1c173dd9e14f807b6ad0ea3181ec5a9a03085 | PHP | SimonKempf/UQAM_ProgWeb_TP | /tp3/liste.php | UTF-8 | 491 | 3.109375 | 3 | [] | no_license | <?php
function ouvrage(){
// Lire les lignes du fichier biblio.txt,
// appliquer "rtrim" sur chaque ligne et les regrouper par ensembles de 11 lignes.
if (file_exists('biblio.txt')){
$ouvrages = array_chunk(array_map('rtrim', file('./biblio.txt')), 11);
// trier les ouvrages en ordre croissant de nom.
u... | true |
9ea8725b2dad3a4ffe8223cb0105c6db6213047f | PHP | natrommes/etic-contact-manager | /core/Controller.php | UTF-8 | 730 | 3.203125 | 3 | [] | no_license | <?php
//Controlador base e herdem todas as abilidades com a Class controller.
abstract class Controller {
protected function render($view, $data = null) { //metodo render qual a view vai mostra e quais os dados pode mostrar
if (!is_null($data)) {
extract($data);
}
... | true |
0ac747c9c64e479f467fb5c09a3424731593b9db | PHP | mdestafadilah/payroll | /app/libraries/htmlhelpers.php | UTF-8 | 10,690 | 2.53125 | 3 | [] | no_license | <?php
Class HTMLHelper{
public static function calculate($timeIn, $timeOut,$dayType,$day,$aLate){
if($dayType !=2){
if(str_replace(':','.', $timeIn) == 0 && str_replace(':','.', $timeOut) == 0){
return $data = array('total' => Config::get('constants.HOURS_PER_DAYS'), 'ot' =>... | true |
5bac4c2a56a73814d23c9f82ac443e6a06f848ba | PHP | max-kut/AmoCRM | /src/Models/CustomField/Value.php | UTF-8 | 541 | 2.640625 | 3 | [] | no_license | <?php
namespace AmoPRO\AmoCRM\Models\CustomField;
use AmoPRO\AmoCRM\Data\Attribute;
use AmoPRO\AmoCRM\Data\Obj;
/**
* @property mixed $value
* @property int $enum идентифиакатор ENUM значения поля
* @property string $subtype - only for address field type
*/
final class Value extends Obj
{
public function sch... | true |
c43f2cd9fda72e7ff7b048f02064bb210910a562 | PHP | ElCapitanSalinas/colombian | /eng/admin/templates/pirep_log.php | UTF-8 | 343 | 2.6875 | 3 | [
"CC-BY-NC-SA-3.0",
"CC-BY-4.0",
"LicenseRef-scancode-cc-by-nc-sa-3.0-us",
"CC-BY-3.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause"
] | permissive | <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<h2>Log for <?php echo $report->code.$report->pirepid?></h2>
<div style="overflow: scroll; height: 300px">
<?php
# Simple, each line of the log ends with *
# Just explode and loop.
$log = explode('*', $report->log);
foreach($log as $line)
{
echo $line... | true |
51b2ef4d22eab0ca3ee820493f32c33efe087b88 | PHP | incredibleash/https---github.com-incredibleash-newPhp | /application/views/view_add_student.php | UTF-8 | 4,043 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang = "en">
<head>
<meta charset = "utf-8">
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<title>Add Student</title>
<!--inlcuding bootstrap stylesheet-->
<link href="/CodeIgniter/bootstrap3/css/bootstrap.min.css" rel=... | true |
edf973b2de22786878e7d14f60c9a470d58513ca | PHP | KolomiecValeriy/viazushki | /src/ViazushkiBundle/Emails/SendForgotPasswordEmail.php | UTF-8 | 929 | 2.6875 | 3 | [] | no_license | <?php
namespace ViazushkiBundle\Emails;
use ViazushkiBundle\Entity\User;
class SendForgotPasswordEmail
{
private $sendEmail;
private $templating;
private $viazushkiEmail;
public function __construct(\Twig_Environment $templating, $viazushkiEmail, SendEmail $sendEmail)
{
$this->sendEmail ... | true |
766d314c08e4de4d12c7276fb7d00c6812d0cb07 | PHP | thegazou/Tsuro-Online | /tsuro/app/Http/Controllers/SocketController.php | UTF-8 | 1,422 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Request;
use LRedis;
class SocketController extends Controller {
public function __construct()
{
$this->middleware('guest');
ini_set('session.cookie_lifetime', 60 * 60 * 24 * 7); // 7 day cookie lifetime
se... | true |
4bef557c6e7f6d45e1d4ed1dd6d6010c0cd89549 | PHP | ghaithtroudi/GRH-GL3-MasterRace | /app/Model/Attendance.php | UTF-8 | 454 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Attendance extends Model
{
protected $table = 'attendances';
protected $fillable = array('employee_id', 'date', 'in_time');
public function employees()
{
return $this->belongsTo("App\\Model\\Employee",'emplo... | true |
979f442848f5de870b511a7fea33cd798a1b8de4 | PHP | knuckleswtf/scribe | /src/Tools/ErrorHandlingUtils.php | UTF-8 | 1,381 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Knuckles\Scribe\Tools;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
class ErrorHandlingUtils
{
public static function dumpExceptionIfVerbose(\Throwable $e, $completelySilent = false): void
{
if ($completelySilent) {
... | true |
84a7040037f66388499447e3c9545218ac4bd3cc | PHP | arsArtD/ARTS | /algorithm/arts_week43_20201123/20201126/testSolution.php | UTF-8 | 1,239 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ThinkPad
* Date: 2020/11/26
* Time: 9:00
*/
require_once '../../../vendor/autoload.php';
require_once 'Solution.php';
use PHPUnit\Framework\TestCase;
class testSolution extends TestCase
{
private $cls;
public function __construct()
{
$this->cls = new ... | true |
50094d14acb76057eef4f2221ba3ceefff03cccb | PHP | ignatenkovnikita/parserYandexWeather | /src/ParseXml.php | UTF-8 | 2,715 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: ignatenkov
* Date: 23.08.15
* Time: 4:51
*/
namespace YaWeather;
use YaWeather\Models\City;
use YaWeather\Models\Day;
use YaWeather\Models\Detail;
class ParseXml {
private $xml;
private $city;
/**
* @param $fileName
*/
public function __co... | true |
253352d9443d48bff8fb5bd0f8ac2c0eecf48b1a | PHP | c410echo/echo-php | /edit-tag.php | UTF-8 | 2,709 | 2.609375 | 3 | [] | no_license | <?php
/**
* Edit tag page
*
* Allows a registered user to create or edit a tag
*
* @author Crystal Carr
* @since 0.1.0
*
* @todo Validate input fields
*/
global $the_title;
$the_title= 'Edit a Tag';
include_once('header.php');
global $tag;
$tag_id = (int)$_REQUEST['tag_id'];
$tag = get_tag($tag_id);
$tag_nam... | true |
2ce621408ed1e0e2a150cc7a7d278f007869ea5e | PHP | euskadi31/sitemap-php | /src/Euskadi31/Component/Sitemap/Writer/AbstractWriter.php | UTF-8 | 1,856 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Sitemap
* @author Axel Etcheverry <axel@etcheverry.biz>
* @copyright Copyright (c) 2015 Axel Etcheverry (https://twitter.com/euskadi31)
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @namesp... | true |
567535b140dd0506b760c96ec3bc1ae6b49f6208 | PHP | arron9/qiruitest | /app/Models/Position.php | UTF-8 | 769 | 2.75 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Position extends Model
{
protected $table = 'position';
public static function getPositions()
{
$items = [];
$categories = Position::all();
foreach($categories as $category) {
$items[$category->... | true |
a98f8e0dd2fad4e81b1a19703b5adf8fad8c9fed | PHP | bdlabs/ManageVariables | /ManageVariables.php | UTF-8 | 697 | 3.359375 | 3 | [] | no_license | <?
class ManageVariables
{
private static $MEMORY = array();
public static function set($namevariables, $value)
{
self::$MEMORY[$namevariables] = $value;
}
public static function get($namevariables)
{
return self::$MEMORY[$namevariables];
}
public static function exist($... | true |
6088b5b4749b91065f05f757ae6ea18aa2257763 | PHP | rezky1710/UTS_RezkyKurniawan | /model/database.php | UTF-8 | 1,031 | 2.734375 | 3 | [] | no_license | <?php
class database{
var $host = "localhost";
var $uname = "root";
var $pass = "";
var $db = "rezky_1tia";
var $con;
function __construct(){
$this->con = mysqli_connect($this->host, $this->uname, $this->pass, $this->db);
mysqli_select_db($this->con,$this->db);
}
function tampil_data(){
$data = mysql... | true |
1fe19d00d2f5aa52ef740ccd20bd142fab40b36d | PHP | MartzolfTom/BetisierPhp | /include/pages/rechercherCitation.inc.php | UTF-8 | 2,151 | 2.984375 | 3 | [] | no_license | <?php
$db = new Mypdo();
$managerCitation = new CitationManager($db);
$managerPersonne = new PersonneManager($db);
$listeSalarie = $managerPersonne->getListSalarie();
?>
<?php
if (empty($_POST['cit_date_debut'])) {
?>
<h1>rechercher une citation</h1>
<form method ="post" action ="#">
Salarie : <select ... | true |
29ff141860c490183387cba44424e0d3f229c5fe | PHP | ArgGab/crud_usuarios | /editar.php | UTF-8 | 6,854 | 2.53125 | 3 | [] | no_license | <?php
require './scripts/usuario.class.php';
$usuario = new Usuario;
if(isset($_POST['cadastro'])){
header("Location: index.php");
}
if(isset($_GET['excluir'])){
$usuario_id = addslashes($_GET['usuario_id']);
$result = $usuario->excluirUsuario($usuario_id);
if($result){
echo "<script>alert('U... | true |
c206acfcf524aed8c5bf868f35dd9907a720565c | PHP | CRomanZamitiz/cleanarc_laravel | /myApp/Application/UseCases/Response.php | UTF-8 | 1,507 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
namespace MyApp\Application\UseCases;
class Response {
public const RESPONSE = [0,1];
public const RESPONSE_FAIL = 0;
public const RESPONSE_OK = 1;
protected $response;
protected $message;
protected $data;
public function __construct() {
$this->setResponse(self::RESPONSE[0])... | true |
65df1d18a40165e2b893e1b666c6f731137c9614 | PHP | alifma/BelajarPHP | /intro1/task3.php | UTF-8 | 250 | 3.75 | 4 | [] | no_license | <?php
function printSegitiga($num) {
if (getType($num) != "integer") {
echo ("Data Harus Integer");
}
for ($i = $num; $i > 0 ; $i--) {
for($j = 1; $j <= $i; $j++) {
echo("$j ");
}
echo("<br/>");
}
}
printSegitiga(5); | true |
4d30b5f20694f848f957b11852a3f3c103525189 | PHP | jdesamero/Geko | /plugins/geko_core/library/Geko/Wp/Hooks.php | WINDOWS-1252 | 6,517 | 2.71875 | 3 | [] | no_license | <?php
/*
* "geko_core/library/Geko/Wp/Hooks.php"
* https://github.com/jdesamero/Geko
*
* Copyright (c) 2013 Joel Desamero.
* Licensed under the MIT license.
*
* add more useful hooks
*/
//
class Geko_Wp_Hooks
{
protected static $bCalledInit = FALSE;
protected static $bIsBuffering = FALSE;
protected static... | true |
0a9408d5f8ec7d5ff7559888d1f06fc67dd23f22 | PHP | ohjack/newErp | /order.valsun.cn/lib/sdk/ebay/UploadSiteHostedPicturesByUrl.php | UTF-8 | 1,942 | 2.609375 | 3 | [] | no_license | <?php
require_once WEB_PATH."/lib/sdk/ebay/EbayBase.php";
class UploadSiteHostedPicturesByUrl extends EbayBase{
private $verb = 'UploadSiteHostedPictures';
private $xmlHeader = "";
private $xmlBody = "";
private $xmlFooter = "";
private $xmlRequest = "";
private $bodyData = array();
public function __construct... | true |
276c2cfa849f6a6bd29d0a9cf2b69d09099861ce | PHP | sudo-make-me-a-sandwich/Hack2012 | /framework/Model/List.inc.php | UTF-8 | 2,700 | 3.140625 | 3 | [] | no_license | <?php
/**
* Base class for model lists
*
* @package LSF
* @subpackage Model
* @version $Id$
* @copyright 2010-2011
*/
abstract class LSF_Model_List extends LSF_DB_ActiveRecord_Base implements Countable, ArrayAccess
{
private
$_items = array();
/**
* (non-PHPdoc)
* @see Countable::c... | true |
e909142935908820232bcd55d7b05f3c85c9801e | PHP | DanielAlk/VertigoDesign | /environment/mailer.php | UTF-8 | 1,768 | 2.8125 | 3 | [] | no_license | <?php
class Mailer {
private $settings;
protected $mailer;
public function __construct($settings = null) {
if (!$settings) return;
require '../extensions/mailer/class.phpmailer.php';
require '../extensions/mailer/class.smtp.php';
$this->settings = $settings;
$this->mailer = new PHPMailer();
... | true |
6a571e692014a8ae57979096efcef2e9263cd8e4 | PHP | githubjeka/lanViewer | /models/InputDevice.php | UTF-8 | 1,246 | 2.78125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "Input_Device".
*
* The followings are the available columns in table 'Input_Device':
* @property integer $id
* @property integer $comp_id
* @property string $Keyboard
* @property string $PointingDevice
*
*/
class InputDevice extends ComputerForm
{
/**
* ... | true |
3307e4c8556458a1e9146eda7f74066b98fe987b | PHP | brazhinskyserhei/ProductAPILaravel | /app/User.php | UTF-8 | 1,620 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Support\Facades\Storage;
class User extends Authenticatable implements JWTSubject
{
use Notif... | true |
43b88060d7ccd48c133cc6661710de17a8d2fb07 | PHP | ManushriDave/visionaryservices | /app/Enums/ApproxDuration.php | UTF-8 | 280 | 2.734375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace App\Enums;
use BenSampo\Enum\Enum;
/**
* @method static static One()
* @method static static TwoToThree()
* @method static static FourPlus()
*/
final class ApproxDuration extends Enum
{
const One = 0;
const TwoToThree = 1;
const FourPlus = 2;
}
| true |
eaef25cec6a98ceb6ee4af100904b1eb2ad1021f | PHP | philip/WritingImprovementTools | /duplicate.php | UTF-8 | 1,200 | 2.828125 | 3 | [] | no_license | <?php
$opts = getopt('p:h:e:');
if (isset($opts['h'])) {
usage();
}
if (empty($opts['p'])) {
echo "\nERROR:\n - A path to your files is required\n";
usage();
}
if (!is_dir($opts['p'])) {
echo "\nERROR:\n - Please pass in a real directory, unlike this mysterious '$opts[p]'\n";
usage();
}
$exts = array('xml','txt'... | true |
42c0639900b537570c883aa91d81d0d27908e089 | PHP | libin1993swt/ateam-test | /app/Http/Controllers/AuthController.php | UTF-8 | 2,809 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Session;
use App\Models\User;
use Hash;
class AuthController extends Controller {
/**
* Write code on Method
*
* @return response()
*/
pub... | true |
6a49647d8481b8429e4336e88260ed0ea01c1635 | PHP | maobunthon/news | /Packages/Application/WE.News/Classes/WE/News/Domain/Repository/NewsRepository.php | UTF-8 | 819 | 2.515625 | 3 | [] | no_license | <?php
namespace WE\News\Domain\Repository;
/* *
* This script belongs to the TYPO3 Flow package "WE.News". *
* *
* ... | true |
b7716fe153dde54f7fd06ec444d0befc82c23546 | PHP | bACE-WebHack/jungvely | /main_board.php | UTF-8 | 2,010 | 2.59375 | 3 | [] | no_license | <?php
session_start();
$host = "localhost";
$username = "web";
$password = "web";
$db = "web";
$conn = new mysqli($host, $username, $password, $db);
$result = $conn->query("select * from board;")->fetch_all();
$conn->close();
if(!isset($_SESSION['id'])){
echo "로그인이 되어있지 않습니다.";
var_dump($_SESSION);
?>
<!DOCTY... | true |