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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
28c1b0731ac8c8b7c5f483c03c71c4fc6cf9f644 | PHP | SimonAmade/E-comWF3 | /admin/messages.php | UTF-8 | 2,526 | 2.609375 | 3 | [] | no_license | <?php
session_start();
include_once('../bdd.php');
$resultat = $connexion->query('SELECT * FROM messages');
$messages = $resultat->fetchAll();
if(!empty($_GET)){
if(isset($_GET['id']) && is_numeric($_GET['id'])){
$delete = $connexion->prepare('DELETE FROM messages WHERE id = :id');
$delete->bindVa... | true |
9a4be01684fdf928152c5829177e3162696c0042 | PHP | franiglesias/milhojas | /src/Milhojas/Domain/Contents/Events/PostWasPublished.php | UTF-8 | 711 | 3.015625 | 3 | [] | no_license | <?php
namespace Milhojas\Domain\Contents\Events;
use Milhojas\Messaging\EventBus\Event;
/**
* A Post was published from a date
*/
class PostWasPublished implements Event
{
private $id;
private $publication;
private $expiration;
public function __construct($id, \DateTimeImmutable $publication, \DateTimeImmutable... | true |
99cdc87d46eb05b0917e0ab8e8858089e10aa702 | PHP | leandro-merlo/poo-avancado | /src/IRepository.php | UTF-8 | 196 | 2.515625 | 3 | [] | no_license | <?php
namespace Source;
interface IRepository {
public function all();
public function create();
public function read();
public function update();
public function delte();
}
| true |
dddeeacc3af5a2c246b97ebda2e0dd4b95f179c8 | PHP | jacobemerick/web | /collector/image/AlbumCollector.class.inc.php | UTF-8 | 1,057 | 2.546875 | 3 | [
"MIT"
] | permissive | <?
Loader::load('collector', 'Collector');
final class AlbumCollector extends Collector
{
public static function getPhotoListForAlbum($album)
{
$query = "
SELECT
`photo`.`name`,
`photo_category`.`name` AS `category`,
`photo`.`description`,
`photographer`.`name` AS `photographer`,
`photo`.`... | true |
860a270b276cfdf7371e46ee236012b7754c60e5 | PHP | globin/tpp | /api/src/Mayflower/TPPBundle/Entity/Task.php | UTF-8 | 3,835 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mayflower\TPPBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Task
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Mayflower\TPPBundle\Entity\TaskRepository")
*/
class Task
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\Generat... | true |
4a44a027e0317eb05355bc6e0abb3029a7670a0e | PHP | 995933447/ddd-custom-service | /domain/Model/IssueReply/IssueReplyContent.php | UTF-8 | 1,269 | 3.015625 | 3 | [] | no_license | <?php
namespace Domain\Model\IssueReply;
use Domain\AbstractValueObject;
class IssueReplyContent extends AbstractValueObject
{
const TEXT_TYPE = 0;
const IMAGE_TYPE = 1;
protected $type;
protected $content;
protected function __construct(int $type, $content)
{
$this->type = $type;
... | true |
f86b2d19dac599f8ba8cbc562f533a03d551095e | PHP | teocteles/apilaravelveiculos | /app/Http/Controllers/VeiculoController.php | UTF-8 | 2,682 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Veiculo;
class VeiculoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$veiculos = Veiculo::all();
ret... | true |
104a61e34346cb3f7684da894b4c40bc19aab781 | PHP | malraux/Essai1 | /indexTp1-2.php | ISO-8859-1 | 623 | 2.859375 | 3 | [] | no_license | <?php
$dsn='mysql:host=localhost;dbname=cinema';
$utilisateur='root';
$motdepasse='';
$ok=true;
try{
$bd=new PDO($dsn,$utilisateur,$motdepasse);
}
catch(PDOException $e){
$ok=false;
}
if($ok)
{echo "connexion russie !!";}
else
{echo "erreur de connexion la base de donnes !!";
die;}
$bd->setAttribute(PDO::ATTR... | true |
d7ab307c37c448499c6d57d61f2ff8ca1e38c8b9 | PHP | Kshitizambast/demo_markoverse | /app/Library/InvestmentModel.php | UTF-8 | 2,130 | 3.21875 | 3 | [] | no_license | <?php
namespace App\Library;
/**
* Find the current asset price.
* Asset price is <500 or >500.
* Associated class is there.
* Based on class. We assign number o f investors.
* We design some tasks to increase the asset price of shop.
* Current Asset Price - Past Asset Price = Profit.
* Repeat the process.
*/... | true |
7e7b45073075e36677f4672e40bc159f158f030e | PHP | K3nnyGC/SPPARH | /Service/Models/Archetype/User.class.php | UTF-8 | 393 | 2.546875 | 3 | [] | no_license | <?php
/**
*
*/
class User extends Model {
#Only mandatory
//public $id_user;
public $name;
public $lastname;
public $dni;
public $phone;
public $email;
public $password;
public $id_role;
//public $edited_date;
//public $created_date;
function __construct(){
parent::__construct();
}
public fun... | true |
a6b2f5e589d8ebc620fa93d04d4f70927c2a7063 | PHP | codestruck/octopus | /includes/classes/Minify/Strategy/Src.php | UTF-8 | 1,678 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Minification strategy that uses '_src' at the end of a filename to indicate
* the unminified version of a file, and returns either the 'src' version or
* the non-'src' version depending on which mod time is more recent.
* @copyright (c) 2012 Codestruck, LLC.
* @license http://opensource.org/licenses/m... | true |
acee9ea05c893d32ebc13de13d1391013a5514e1 | PHP | chuano/dvd_rental | /src/Modules/Rental/RentalOrder/Application/UserRentalOrders/UserRentalOrdersResponse.php | UTF-8 | 706 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Modules\Rental\RentalOrder\Application\UserRentalOrders;
use App\Modules\Rental\RentalOrder\Domain\RentalOrder;
class UserRentalOrdersResponse
{
private array $rentalOrders;
public function __construct(array $rentalOrders)
{
$this->rentalOrders = $re... | true |
34162e85efd1ad9fc511ad1949f1bd68a9659c83 | PHP | fahmidev013/lumen-api-boilerplate | /tests/Test/TestJWTService/TestJWTService.php | UTF-8 | 1,089 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\TestJWTService;
use App\Services\JWT\JWTService;
/**
* Class TestJWTService
*
* @package Test\TestJWTService
*/
class TestJWTService extends JWTService
{
/**
* @var bool
*/
private $expiredTimeStamps = false;
/**
* @param bool $expiredTimeStamps
*
* @re... | true |
df82b7019a28bf39da2772b27415607e8417c2ce | PHP | bwconner/comicCollector | /scripts/getprofiledatasql.php | UTF-8 | 1,575 | 2.78125 | 3 | [] | no_license | <?php
//Connect To Database
$hostname="localhost";
$username="bwconner_test";
$password="dbtest123";
$dbname="comic_collector";
//Turn posted attributes into variables
$post_userID= $_POST["userID"];
//Insert the new profile into the user profiles table in DB
$link = mysqli_connect($hostname,$username, $pas... | true |
bf6b06e312f83ad56743406a84796fa07e316194 | PHP | dees040/laravel-auth-extra | /src/ConfigManager.php | UTF-8 | 2,833 | 2.796875 | 3 | [] | no_license | <?php
namespace dees040\AuthExtra;
use Illuminate\Config\Repository;
use dees040\AuthExtra\Exceptions\ConfigNotFoundExceptions;
class ConfigManager
{
/**
* The application instance.
*
* @var \Illuminate\Foundation\Application
*/
private $config;
/**
* ConfigManager constructor.
... | true |
dae7ecf92326bf13ddc5cac4f583e3c5ee6d0fd4 | PHP | ChrisBarberRiley/SelfDestroyingMessageApp | /index.php | UTF-8 | 3,319 | 2.921875 | 3 | [] | no_license | <?php
$title = null;
$message = null;
$email = null;
$errors = [];
$success = false;
$db = new PDO("mysql:host=127.0.0.1;dbname=messageApp;", "root", "");
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if(!empty($_POST)){
if(isset($_POST['title'])){ $title = htmlentities($_POST['title']); } else { $... | true |
a2d0ee4e0c3326e6eaeb1cf53b12a9ce151ee0de | PHP | zbzalex-work/php-microframework | /src/Component/Templating/Template.php | UTF-8 | 841 | 2.9375 | 3 | [] | no_license | <?php
namespace Xand\Component\Templating;
/**
* Class Template
*
* @author Sasha Broslavskiy <sasha.broslavskiy@gmail.com>
*/
class Template
{
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $engine;
/**
* @param string $name
* @param string $engine
*/
public function... | true |
9763c96c52bad4a6d535c69a327d7b7367297205 | PHP | Rozana-github/NSU_masters_thesis | /project code/stdproject/result.php | UTF-8 | 6,358 | 2.65625 | 3 | [] | no_license | <?php require_once('Connections/conStdPoject.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$the... | true |
7f44df47b16c90ac62e0f7512d40534629c180b6 | PHP | markyz89/trewsoftheworld | /template-parts/small-stories.php | UTF-8 | 952 | 2.609375 | 3 | [] | no_license | <!-- Custom Query for two main stories -->
<!-- Consider using tags to choose the main stories in future -->
<?php $args = array(
'posts_per_page' => 2,
'offset' => get_query_var('offset_value')
) ?>
<?php $main_stories = new WP_Query($args);
if ($main_stories->have_posts() ) : ?>
<div class="smal... | true |
8a8b887f8721008de061b4ce92e89eaafa2ad19e | PHP | skipperno/NmeaApplication | /www_testFiler/TcpClient.php | UTF-8 | 8,086 | 3.125 | 3 | [] | no_license | <?
//**!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//**TCP_CLIENT_CLASS_DEFINITION***********************************************
//** The TcpClient class encapsulates most networking communication details
//** into an easy-to-use wrapper. Connections are not persistant.
cla... | true |
d000f1ad69a3547d453a2506abeb1b4c4d844221 | PHP | dkd/typo3-ext-cmis-service | /Classes/Analysis/Detection/ExtractionMethodDetector.php | UTF-8 | 5,463 | 2.734375 | 3 | [] | no_license | <?php
namespace Dkd\CmisService\Analysis\Detection;
use Dkd\CmisService\Analysis\ColumnAnalyzer;
use Dkd\CmisService\Analysis\TableConfigurationAnalyzer;
use Dkd\CmisService\Extraction\BodyContentStreamExtraction;
use Dkd\CmisService\Extraction\ExtractionInterface;
use Dkd\CmisService\Factory\ObjectFactory;
/**
* Cl... | true |
931d272d73d6b89aad8e5192589924ca33c22ea3 | PHP | roblib/php_listeners | /soap_server/soap_serv.php | UTF-8 | 10,484 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @file this file is to provide soap services.
*/
/**
* read a config file of soap to determin the location of microservices.
*/
$data = get_listener_config_data();
$location = $data['location'];
//add the home of the microservices listeners so we can call php files
//from non web accesible directorys.... | true |
d7847efb763c9d68b90030db334054ab61d3e269 | PHP | j92/scheduler | /src/Schedule/ScheduleInterface.php | UTF-8 | 271 | 2.609375 | 3 | [] | no_license | <?php
namespace j92\Scheduler\Schedule;
use j92\Scheduler\Event\EventInterface;
interface ScheduleInterface
{
/**
* @return EventInterface[]
*/
public function getEvents();
/**
* Run the scheduled events
*/
public function run();
} | true |
4be74e54cb43b35c4588e381a9ac1c8f3afca50a | PHP | tom-delteil/tournoi | /controller/joueur.php | UTF-8 | 145 | 2.578125 | 3 | [] | no_license | <?php
// Nous crรฉons une classe ยซ Personnage ยป.
class Joueur
{
public int $id;
public string $name;
public int $tournoi_id;
}
?>
| true |
3ea4ed26b9f92dcea334c6a1779a2c6f8db0bac2 | PHP | chrifmellouli/3elle | /models/authorization.model.php | UTF-8 | 2,129 | 3.390625 | 3 | [] | no_license | <?php
/**
* Class Authorization
*/
class Authorization
{
/**
* @var int
*/
private int $_id_user;
/**
* @var int
*/
private int $_id_privilege;
/**
* @var int
*/
private int $_permission;
/**
* Authorization constructor.
* @param int $_id_user
... | true |
ebf3d21c51e487aef9b3877aa7a5b863d79f8a26 | PHP | Saaze/core | /src/Interfaces/TemplateParserInterface.php | UTF-8 | 415 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Saaze\Interfaces;
interface TemplateParserInterface
{
/**
* Render a template
*
* @param string $template
* @param array $data
* @return string
*/
public function render($template, $data = []);
/**
* Determine if a template exists
*
* @param st... | true |
a5f54a070620cc32b87532a13ae99513c58a5e85 | PHP | antoniospap/rideout | /API/weapons.php | UTF-8 | 803 | 2.71875 | 3 | [] | no_license | <?php
// Create connection
$conn = new mysqli("localhost","root","mysql","rideout");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}else {
$result = $conn->query("SELECT wp_name, level, image_url FROM weapons ORDER BY level ASC");
$response = arra... | true |
c9eddbfb2a302aef487bc3279947462946c65d65 | PHP | PawelUrbanowski/PWI | /strona skoลczona/Hashowanie_hasel.php | UTF-8 | 1,006 | 2.78125 | 3 | [] | no_license | <?php
require_once "connect.php";
$polaczenie = @new mysqli($host,$db_user,$db_password,$db_name);
if($polaczenie->connect_errno!=0)
{
echo "Error: ".$polaczenie->connect_errno;//." Opis ".$polaczenie->connect_error;
}
else
{
$rezultat = $polaczenie->query("SELECT * FROM admin");
if(!$rezultat)
{
thro... | true |
90dba27c42e1c745a715272aed02e6904bb66723 | PHP | jimmyjoshi/sun-stream | /app/Models/Charge/Charge.php | UTF-8 | 779 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models\Charge;
/**
* Class Charge
*
* @author Anuj Jaha er.anujjaha@gmail.com
*/
use App\Models\BaseModel;
use App\Models\Charge\Traits\Attribute\Attribute;
use App\Models\Charge\Traits\Relationship\Relationship;
class Charge extends BaseModel
{
use Attribute, Relationship;
/**
*... | true |
39cadd85b1246d804ae759968b593fc87e5bfca0 | PHP | redesitos/Git | /zf2-tutorial-calendar/module/Album/src/Album/Model/Song.php | UTF-8 | 2,248 | 2.5625 | 3 | [] | no_license | <?php
namespace Album\Model;
use Doctrine\ORM\Query,
Doctrine\ORM\Query\Expr\Join,
Album\Entity\Song as SongEntity,
Loculus\Model\AbstractModel,
Loculus\Log;;
class Song extends AbstractModel
{
public function getSongs($hydrate = Query::HYDRATE_OBJECT)
{
$songs = $this->getEntityManag... | true |
c042b84004b4d01240c84611c4658cc5f8032c2b | PHP | yanpeipan/giterman | /protected/extensions/letter/Letter.php | UTF-8 | 12,868 | 2.65625 | 3 | [] | no_license | <?php
class Letter{
/**
* ๆฃๆฅpt_action่กจ
*/
public function ChkAction()
{
//ๅ ้ค{{v_tv}}่กจis_del=1็ๆฐๆฎ
Letter::DeleteAction();
$values = array(
':table_name'=>'v_list',
':is_del'=>'1',
);
$sql = "SELECT vid,action FROM {{action}} WHER... | true |
d9265aa6c7ef92cd9cca872287de50d36a5df114 | PHP | quartzy/courier | /src/ConfirmingCourier.php | UTF-8 | 295 | 2.84375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Courier;
use PhpEmail\Email;
interface ConfirmingCourier extends Courier
{
/**
* Get the receipt from the latest.
*
* @param Email $email
*
* @return string
*/
public function receiptFor(Email $email): string;
}
| true |
a7829b86426d805a3234d9ccf5fb9c4fc731f786 | PHP | jkga/dbcon | /dbconUnitTesting/dbcon/mysqli/mysqliTest.php | UTF-8 | 1,190 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace DBConTest\MySQLi;
require_once('vendor/autoload.php');
use \DBCon\MySQLi\mysqli as MySQLi;
##this part was defined on mysqlTest
#define('HOST','localhost');
#define('USERNAME','root');
#define('PASSWORD','');
#define('PORT','');
#define('DBNAME','test');
class mysqliTest extends \PHPUnit_Framework_T... | true |
c80d1532ac327290b2feee1aa9958cbeba2652a5 | PHP | wxinheb/uenty | /vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php | UTF-8 | 2,112 | 2.65625 | 3 | [] | no_license | <?php
/*
* This file is part of the PHPUnit_MockObject package.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class PHPUnit_Framework_MockObject_Matcher_InvokedCount extends PHP... | true |
8e82925164562154dc3c73a7d1048fa01d104ade | PHP | marcogmed/AdministracionDeCondominio | /database/migrations/2018_11_29_235954_create_events_table.php | UTF-8 | 1,404 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('events', functio... | true |
1fc5e31c49c67ca69cb844fb4c1a6a9529e4e6a5 | PHP | faceless105/book-amp | /ch6 - objects/class.dishwasher.php | UTF-8 | 791 | 3.03125 | 3 | [] | no_license | <?php
class dishwasher extends appliance{
public $capacity;
//create a constructor method. This will just receive some initial variables when we create this class
public function __construct($power=false, $on=false, $name='', $capacity=''){
$this->hasPower = $power;
$this->turnedOn = $on;
$this->name = $na... | true |
6e908c1ebebc4b778353fa2988213cb391840fed | PHP | B1naryStudio/asciit | /app/Services/Notifications/Contracts/NotificationServiceInterface.php | UTF-8 | 179 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Services\Notifications\Contracts;
interface NotificationServiceInterface
{
/**
* @param array $data
*/
public function send(array $data);
} | true |
e1d8c3662486ec76b77377b1e1dd097745af4e24 | PHP | rodrigo12663/rodrigo12663.github.io | /sites/multi/MULTITEC/guanabara/ano.php | UTF-8 | 263 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>jkndikd</title>
<?php
$i=17;
if ($i<16) {
echo "nรฃo vota ";
}else{
if ($i>16 && $i<18) {
echo "opcional";
}else{
echo "obrigatรณrio";
}
}
?>
</head>
<body>
</body>
</html> | true |
e099cb612497bbadd5e87f27c5759bf5315445c0 | PHP | angyvolin/phpinspectionsea | /src/test/resources/fixtures/lang/op-assign-short-syntax.php | UTF-8 | 1,131 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
<weak_warning descr="Can be safely refactored as '$i += 2'">$i = $i + 2</weak_warning>;
<weak_warning descr="Can be safely refactored as '$i -= 2'">$i = $i - 2</weak_warning>;
<weak_warning descr="Can be safely refactored as '$i *= 2'">$i = $i * 2</weak_warning>;
<weak_warning descr="Can be safely refactored as ... | true |
2b5ef32d823738c4acec61deebe23e0dfbf7cbe2 | PHP | RanieleSilva/php | /ex10.php | UTF-8 | 232 | 3.34375 | 3 | [] | no_license | <html>
<head>
<title>Exemplo 10</title>
</head>
<body bgcolor=#984656>
<center>
<h1>Estrutura de Repetiรงรฃo WHILE</h1>
<?php
$num=1;
while ($num<=10) {
echo "<b> Nรบmero: $num</b><br>";
$num++;
}
?>
</center>
</body>
</html>
| true |
f34a7fdf06c0c22ee1919c1084ddd5d056d82515 | PHP | nds-git/myapp | /db/QueryBuilder.php | UTF-8 | 2,853 | 3.15625 | 3 | [] | no_license | <?php
class QueryBuilder {
protected $pdo; // ะทะดะตัั ะผะพะถะฝะพ ะธัะฟะพะปัะทะพะฒัะฐั private ะฐ ัะพะณะดะฐ ััะพ ะปัััะต??
/*
* ััะพะฑั ะฝะต ะฟะตัะตะดะฐะฒะฐัั ะฟะพััะพัะฝะฝะพ $pdo ะฒ ััะฝะบัะธัั
ะฟัะธ ะธะทะฒะปะตัะตะฝะธะธ
* ะธัะฟะพะปัะทัะตะผ ะบะพะฝััััะบัะพั, j-ัะน ะฐะฒัะพะผะฐัะธั. ะฑัะดะตั ะฒัะทัะฒะฐัััั
*/
public function __construct($pdo) {
$this -> pdo = $pdo;
}
/*
* ะะทะฒะปะต... | true |
9ed5cd4b870f683d9d4d0b31bbf94fbf75bfea42 | PHP | AlexanderBierton/PhpProject | /PhpProject1/index.php | UTF-8 | 2,076 | 2.546875 | 3 | [] | no_license | <?php
// load up your config file
require_once("resources/config.php");
require_once("resources/service/phpFuncs.php");
require_once(TEMPLATES_PATH . "/header.php");
require_once("resources/service/createFile.php");
?>
<div id="container">
<div id="content">
<!-- content -->
... | true |
1ad0873a0ce23d829d81fe163d29407ff689fcd4 | PHP | zzh1/php_interview | /2-5flowControl/demo1.php | UTF-8 | 2,334 | 3.703125 | 4 | [] | no_license | <?php
/**
* ็้ข๏ผ่ฏทๅๅบ3็งPHPๆฐ็ปๅพช็ฏๆไฝ็่ฏญๆณ๏ผๅนถๆณจๆๅ็งๅพช็ฏ็ๅบๅซ
*
* ่็น๏ผ
* PHP็้ๅๆฐ็ป็ไธ็งๆนๅผๅๅ่ชๅบๅซ
* ๅปถไผธ๏ผๅๆฏ็ปๆ
*
*
* PHP็้ๅๆฐ็ป็ไธ็งๆนๅผๅๅ่ชๅบๅซ
* ไฝฟ็จforๅพช็ฏ(ๅ
ๆฌwhile do...while)
* ไฝฟ็จforeachๅพช็ฏ
* ไฝฟ็จwhileใlist()ใeach()็ปๅๅพช็ฏ
*
* ๅบๅซ๏ผ
* forๅพช็ฏๅช่ฝ้ๅ็ดขๅผๆฐ็ป๏ผforeachๅฏไปฅ้ๅ็ดขๅผๅๅ
ณ่ๆฐ็ป๏ผ่
* ๅไฝฟ็จlist()ใeach()ๅwhileๅพช็ฏๅๆ ทๅฏไปฅ้ๅ็ดขๅผๅๅ
ณ่ๆฐ็ปใ
*... | true |
8db00d679991144a8bf14618e52ce41da4e387c1 | PHP | typecho/plugins | /Avartar.php | UTF-8 | 2,648 | 2.71875 | 3 | [] | no_license | <?php
/**
* ๅคดๅไปฃ็ไฟฎๆนๆไปถ
*
* @package Avartar
* @author loftor
* @version 1.0.0 Beta
* @link http://loftor.com/
*/
class Avartar implements Typecho_Plugin_Interface
{
/**
* ๆฟๆดปๆไปถๆนๆณ,ๅฆๆๆฟๆดปๅคฑ่ดฅ,็ดๆฅๆๅบๅผๅธธ
*
* @access public
* @return void
* @throws Typecho_Plugin_Exception
*/
public s... | true |
072ae98ef8b7588d7fecc9c1654428efe341aa1b | PHP | afaramin/portail_fournisseur | /fourretout/tp6a.php | ISO-8859-1 | 847 | 2.78125 | 3 | [] | no_license | <HTML>
<HEAD>
<title>Reponse</title>
</HEAD>
<BODY bgcolor="00FF00">
<?php
// dclaration des variables
$date = " ";
// la connexion la BDD
include("connexDB2.php");
//la requete
$requete= "CALL DATETIME (?)";
// le prepare et le bind des variables
$stmt =... | true |
74569a7daba328e77e605b0655bf594fc1c2976a | PHP | daniellelambert/shoppingPlanner | /insertMealPlan.php | UTF-8 | 2,390 | 2.734375 | 3 | [] | no_license | <?php
session_start();
#start date
include "db_connect.php";
if (!isset($_SESSION['email'])){
?><meta http-equiv = "REFRESH" content="0;url=login.html"><?php }
$plan = $_POST;
$insertPlan = "INSERT INTO meal_plan VALUES (null, CURDATE(), 'placehodler')";
$result_insert_plan =mysqli_... | true |
cfd7dfd120f27a9a8ce233a26954fdb0458421aa | PHP | fernandosena/aperfeicoando_no_php | /02-iniciando-do-zero-com-php/02-10-requisicao-de-arquivos/index.php | UTF-8 | 966 | 2.53125 | 3 | [] | no_license | <?php
require __DIR__ . '/../../fullstackphp/fsphp.php';
fullStackPHPClassName("02.10 - Requisiรงรฃo de arquivos");
/*
* [ include ] https://php.net/manual/pt_BR/function.include.php
* [ include_once ] https://php.net/manual/pt_BR/function.include-once.php
*/
fullStackPHPClassSession("include, include_once", __LINE__... | true |
94de5cbff1ed96bd07af2a759916c45772b737fa | PHP | rehanaction/akademik | /siakad/siakad/leftright.php | UTF-8 | 3,325 | 2.578125 | 3 | [] | no_license | <?php
include('../includes/adodb5/adodb.inc.php');
$conn = ADONewConnection('postgres8');
$conn->Connect('172.16.88.21:5432', 'esademo', 'esademo', 'akademik');
$conn->SetFetchMode(ADODB_FETCH_ASSOC);
// $conn->debug = true;
//echo "via";die();
// kalau kodeunit sudah mencerminkan urutan
/* $tmp = 0;
$unit = ... | true |
4a4caddf4577303fd245dadb92e7c7229caa3aa4 | PHP | VikThor13/DZ | /2/ex1.php | UTF-8 | 300 | 3.21875 | 3 | [] | no_license | <?php
function revertChars($str){
$arr = explode(' ',$str);
$res = [];
foreach ($arr as $s)
$res[] = strrev($s);
return implode(' ', $res);
}
assert(revertChars('') === '');
assert(revertChars(' A fun little challenge! ') === ' A nuf elttil !egnellahc ');
echo 'Done'.PHP_EOL; | true |
b6e4a80e9420d74bb429f8f5bc3934e05a782314 | PHP | 760524mkfa00/afg | /app/Services/Tasks/trackingTasks.php | UTF-8 | 855 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace AFG\Services\Tasks;
use AFG\Services\InvoiceTrait;
use AFG\Services\Repositories\Tracking\TrackingRepository;
/**
* Class trackingTasks
* @package AFG\Services\Tasks
*/
class trackingTasks
{
use InvoiceTrait;
protected $tracking;
public function __construct(TrackingRepository $track... | true |
f820c00fa1e54416c707eb7cf8b57fb3f23d4d5c | PHP | muhammadsheraz/zce7prep | /basics/strings.php | UTF-8 | 2,791 | 3.203125 | 3 | [] | no_license | <?php
echo "<pre>";
// echo strcmp(12345, '12345');
// PHP Conditional Statememnt
// if (12345 == '12345') {
// echo "greater";
// } else {
// echo "less";
// }
// $str = '12345';
// $result = sscnnf($str, '%1d%1d%1d%1d%1d');
// list($serial) = sscanf("SN/2350001", "SN/%d");
// echo '<pre>';
// print_R($res... | true |
1bfa977d4e0d8e4be78084c633f722fa4e1cef70 | PHP | EduardoBrito32/crud-flexpeak-php | /professor/update_professor.php | UTF-8 | 4,673 | 2.546875 | 3 | [] | no_license | <?php ob_start(); ?>
<?php
require '../banco/banco.php';
$id = null;
if ( !empty($_GET['id_professor']))
{
$id = $_REQUEST['id_professor'];
}
if ( null==$id )
{
header("Location: index_professor.php");
}
if ( !empty($_POST))
{
... | true |
2e7284311518e7c97c4856d88ed5d46f537ec638 | PHP | jeffstumpf1/dsudev | /service/report-GetSalesByCustomer.service.php | UTF-8 | 3,469 | 2.5625 | 3 | [] | no_license | <?php
/* Sales by Customer , Used in Ajax call
/service/report-GetSalesByCustomer.service.php
*/
$debug = 'Off';
require_once '../db/global.inc.php';
// Start logging
include '../log4php/Logger.php';
Logger::configure('../logconfig.xml');
$log = Logger::getLogger('myLogger');
spl_autoload_register(fun... | true |
b6e885b52b77011b8c085fb5985f6f4c2f2b5af7 | PHP | Kenzhe94/LokaverkefniOnn3 | /dbcon.php | UTF-8 | 2,976 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
$servername ="tsuts.tskoli.is";
$username ="0510942049";
$password ="mypassword";
$dbname ="0510942049_lokaverkefni";
/*$name = $_POST['Name'];
$price = $_POST['Price'];
$description = $_POST['Description'];
$picture = $_POST['Picture'];
*/
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn... | true |
2ee4e27ac6f88cc2974500004440c6e14543e7fc | PHP | williammoterle10/apigility | /module/Teste/src/Teste/V1/Rest/Teste/TesteResource.php | UTF-8 | 1,845 | 2.6875 | 3 | [] | no_license | <?php
namespace Teste\V1\Rest\Teste;
use ZF\ApiProblem\ApiProblem;
use ZF\Rest\AbstractResourceListener;
class TesteResource extends AbstractResourceListener
{
protected $service_espaco;
public function __construct($service_espaco)
{
$this->service_espaco = $service_espaco;
}
/**
* ... | true |
355b4de331aa70eecb31edfd3230164ee9df7273 | PHP | sirensoft/dhdc2 | /common/config/thai_date.php | UTF-8 | 6,449 | 2.671875 | 3 | [] | no_license | <?php
function getNowDateFw() {
$yy = date('Y');
$mm = date('m');
$dd = date('d', strtotime("+1 day"));
return $dd.'/'.$mm.'/'.$yy;
}
function splitDate2Db($date) {
list($dd, $mm, $yy) = split('[/.-]', $date);
return $yy.'-'.$mm.'-'.$dd;
}
function thDate($date) {
list($yy, $mm, $dd)... | true |
7b98a733c195516115a249a66b6b8f4eb6a1a1d1 | PHP | tmachinya/eshop | /app/Http/Controllers/InspectionController.php | UTF-8 | 722 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Inspection;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class InspectionController extends Controller
{
/**
*
* @param Request $request
* @return JsonResponse
*/
public function insert(Request $request)
{
$inspect... | true |
c45d2e59e693bd811eab68495171dfba3ee74e9f | PHP | reeganaga/mahen | /print.php | UTF-8 | 452 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once __DIR__ . '/vendor/autoload.php';
// handle post
if (isset($_POST['process-spp'])) {
echo "<pre>";
// var_dump($_POST); // to display all POST data
echo "</pre>";
//include content pdf
ob_start();
require 'content.php';
require 'print2.... | true |
04a2b1af304dadada4ea4972282157adfc25afc7 | PHP | filipegar/MaxiPago | /src/Gateway/Operations/Registration/Entities/PaymentInfo.php | UTF-8 | 1,161 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Filipegar\Maxipago\Gateway\Operations\Registration\Entities;
use Filipegar\Maxipago\Gateway\Interfaces\OutputsVariables;
use Filipegar\Maxipago\Gateway\Traits\ExposesVariables;
class PaymentInfo implements OutputsVariables
{
use ExposesVariables;
private $cardInfo;
private $chargeTotal;
... | true |
92a3dbe76956335433604394057d8e95dbd4c96b | PHP | amen123456/InovoSmart_2A6 | /law-firm-website-template/controller/articleA.php | UTF-8 | 4,800 | 2.859375 | 3 | [
"CC-BY-4.0"
] | permissive | <?php
include "../config.php";
class ArticleA
{
function afficherarticle($article){
echo "id_article: ".$article->getid_article()."<br>";
echo "titre: ".$article->gettitre()."<br>";
echo "description: ".$article->getDescription()."<br>";
... | true |
35416459975141b8426ca3031ddf3d160c4328b5 | PHP | enomotodev/gitlabci-composer-update-mr | /src/Command.php | UTF-8 | 4,458 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Enomotodev\GitLabCIComposerUpdateMr;
use Exception;
use DateTime;
use Gitlab\Client;
class Command
{
/**
* @return void
*/
public static function main()
{
$command = new static;
$command->run($_SERVER['argv']);
}
/**
* @param array $argv
* @r... | true |
4c23ea7527b8ce8572b662a7a80fe9b35c078f8f | PHP | Sophie-Williams/Do-an-Sar- | /forum/admin/sources/classes/like/composite.php | UTF-8 | 59,387 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @file composite.php Provides classes to manage the like system
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mmecham $
* @since 11th October 2010
* $LastChangedDate: 2013-08-14 0... | true |
75aee72a684025b9afa66b154bb66bbdff295161 | PHP | MaDickal/WebLabPhpExercises | /arraySorting.php | UTF-8 | 315 | 3.625 | 4 | [] | no_license | <?php
// Write a function that sorts the items of an array.
$arr = [];
function VlowHigh($arr) {
asort($arr);
return $arr;
}
function VhighLow($arr) {
arsort($arr);
return $arr;
}
function KlowHigh($arr) {
ksort($arr);
return $arr;
}
function KhighLow($arr) {
krsort($arr);
return $arr;
}
?>
| true |
1218c5ef3f77d4512c5f1d02206c101ab16bead9 | PHP | The-Rabak/blog_project1 | /func.php | UTF-8 | 3,193 | 2.828125 | 3 | [] | no_license | <?php
require_once "consts.php";
if(!function_exists("db_connect")){
function db_connect(){
if($link = mysqli_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PWD,MYSQL_DB)){
return $link;
}
else{
die("DB connection has failed");
}
}
}
if(!function_exists('... | true |
70e05a640be21b89132ab48e6313de88cde16f41 | PHP | bauhausphp/service-resolver | /private/Discoverer/DependencyLoader/LoadableDependency.php | UTF-8 | 2,039 | 2.625 | 3 | [
"JSON",
"MIT"
] | permissive | <?php
namespace Bauhaus\ServiceResolver\Discoverer\DependencyLoader;
use LogicException;
use Psr\Container\ContainerInterface as PsrContainer;
use Psr\Container\NotFoundExceptionInterface as PsrNotFoundException;
use ReflectionParameter as RParam;
/**
* @internal
*/
final readonly class LoadableDependency
{
pr... | true |
0e271fe08a4c22a6865e9a119c0f825fc8f3cf01 | PHP | YamashitaSho/Train_back | /app/Services/QuestLogic.php | UTF-8 | 3,338 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Illuminate\Database\Eloquent\Model;
use App\Models\QuestModel;
/**
* [Class] ใฏใจในใๅฎ่กใฏใฉใน
* ใใใซใ็บ่กใใใใใซใฎๅฎๅฆ็ใฏBattleใฏใฉในใซ็งป่ญฒใใ
*/
class QuestLogic extends Model
{
public function __construct($user_id)
{
$this->model = new QuestModel($user_id);
}
/**
* [API... | true |
167cdc78ff4c99fb540191bdb22906d00dc17332 | PHP | 00dav00/marcadores-minimal | /app/Http/Requests/EstadioRequest.php | UTF-8 | 1,355 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class EstadioRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
*... | true |
d51d84043f1d9ef60403f16b954682cd448f3e20 | PHP | SiegfriedChapotin/counterLouvre | /tests/Services/PriceCalculationTest.php | UTF-8 | 2,753 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Tests\Services;
use App\Entity\Booking;
use App\Entity\Ticket;
use App\Services\PriceCalculator;
use PHPUnit\Framework\TestCase;
class PriceCalculationTest extends TestCase
{
protected $visitDate;
public function setUp()
{
// CREATION DE MA DATE DE VISITE
$now = new \D... | true |
e7c8f2d65e462295876a8f3417c040ef142916ba | PHP | sablesoft/phalcon-weather | /project/weather/app/components/Service.php | UTF-8 | 5,600 | 2.84375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Weather\Component;
use SableSoft\OpenWeather\Response;
use SableSoft\OpenWeather\Service as Api;
use Weather\Model\City;
use Weather\Model\CityAlias;
/**
* Class Service
* @package Weather\Components
*/
class Service {
const PARAM_FETCH_LIMIT = 'fetchLimit';
/**
... | true |
91f7cd10dc16cbfafe09c5cc243936f64b7df5e2 | PHP | ChurchCRM/CRM | /src/MemberRoleChange.php | UTF-8 | 4,432 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*******************************************************************************
*
* filename : MemberRoleChange.php
* last change : 2003-04-03
* website : http://www.churchcrm.io
* copyright : Copyright 2001-2003 Deane Barker, Lewis Franklin
*
************************************************... | true |
c0f3aa800a892f6ec557546b8b7904f8f2234b6a | PHP | toutoundiaye/php-avance | /05di/Newsletter.php | UTF-8 | 392 | 2.828125 | 3 | [] | no_license | <?php
namespace di;
class Newsletter
{
private $subject;
private $mailer;
public function setMailer(Mailer $mailer)
{
$this->mailer = $mailer;
}
public function setSubject(string $subject)
{
$this->subject = $subject;
}
public function publishCampaign()
{
... | true |
c68be2cbe8de11f1aa3eee10315c558c1bc0e54b | PHP | thelab-org-au/labms | /application/views/forms/baseform.php | UTF-8 | 5,585 | 2.59375 | 3 | [] | no_license | <span class="red">* (required)</span>
<div class="element">
<label for="fname">Your first name <span class="red">*</span></label>
<input id="fname" name="fname" class="text err" required />
<span id="fnameVal" style="display: none; color: red; font-size: 14px;"> First name is requir... | true |
d477db2c0eba8266db11a21bb5e7d0a8350295a0 | PHP | yedpay/php-library | /examples/ExamplePrecreateClient.php | UTF-8 | 2,043 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
use Yedpay\Client;
use Yedpay\Response\Success;
use Yedpay\Response\Error;
class TestPreCreateClient
{
const STAGING = 'staging';
const PRODUCTION = 'production';
const ACCESS_TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbJSUzI1NiIsImp0aSI6IjY1NjhkOGM2MjZhNTYzMjFkNMndSH8rPBwIZn1OJK1pbi6QvQ3A4mbnNFNje9qNZJBpMFkEzEDv... | true |
f265c7bbcb2489deaacb585aface913b7d33a83a | PHP | olgenur/test_tasks | /connect.php | UTF-8 | 682 | 2.546875 | 3 | [] | no_license | <?php
$con = mysqli_connect("127.0.0.1", "root", "");
mysqli_select_db($con,"chat") or die(mysql_error());
if ($con->connect_errno) {
echo "ะะต ัะดะฐะปะพัั ะฟะพะดะบะปััะธัััั ะบ MySQL: (" . $con->connect_errno . ") " . $con->connect_error;
}
else {
$con->query('SET NAMES utf8;');
}
function str_esc_post($name){
global $co... | true |
60db95093396f0faaa995aabd4afcbe88dbd7c8e | PHP | domingos-rodrigues/apiCrud | /input_form.php | UTF-8 | 3,343 | 2.609375 | 3 | [] | no_license | <?php
/**
* User: domingos
*/
?>
<div class="container">
<h1>Category with id: <?php echo $id; ?> </h1>
<div class="card">
<div class="card-header">
<h3>
<?php if ($category['id']):
$newCat = false;
?>
Update categ... | true |
fd2a7f84e3a4bd178497b951e17279a9b4ed25f4 | PHP | HardCodingX/buzer | /app/Http/Middleware/redirectAfterLogin.php | UTF-8 | 563 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Session;
class redirectAfterLogin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$re... | true |
f0c1cc6dcd493c0988221ecf37d1c7313d1fe8d8 | PHP | kancart/Zencart-Web-API-service-by-Kancart.com-Mobile | /code/kancartplugin/crypto/CryptoUtil.php | UTF-8 | 2,895 | 2.53125 | 3 | [] | no_license | <?php
/**
* KanCart
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http:
* If you did not receive a copy of the license and are unable to
... | true |
51c3f78439478374905edf0dd972763c8a7f4a37 | PHP | leandrocostalti/Introdu-o-ao-PHP | /media/loop.php | UTF-8 | 2,028 | 3.0625 | 3 | [] | no_license | <!doctype html>
<html lang="pt_br">
<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="css/bootstrap.min.css">
<title>Loop -While e For!</title>
</head>
<body>
<form met... | true |
983e8271616196fe98d302f3153c2d5938692a17 | PHP | enhavo/enhavo | /src/Enhavo/Bundle/DoctrineExtensionBundle/Util/AssociationFinder.php | UTF-8 | 7,841 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Enhavo\Bundle\DoctrineExtensionBundle\Util;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
class AssociationFinder
{
private array $incomingAssociationMapCache = [];
private array $outgoingAssociationMapCache = [];
/**
* DoctrineAssociationFinder co... | true |
b29e0b557de02edc6c3e8ed95e66e41d755ccbfd | PHP | UmidYunisov/onetech | /app/Category.php | UTF-8 | 575 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\Sluggable;
class Category extends Model
{
public $fillable = ['cat_title','slug','parent_id'];
use Sluggable;
public function sluggable()
{
return [
'slug' => [
'source' => 'cat_title'
]
];
}
public ... | true |
d1c83902563f0cdd2c7f70a1280df740e8136b84 | PHP | priyanka2907/PHP | /PHP_array.php | UTF-8 | 697 | 3.90625 | 4 | [] | no_license | <?php
//array in php
// deine array
$array_Name=array(2,5,1,7,3,4,8);
print_r($array_Name);
// output: Array ( [0] => 2 [1] => 5 [2] => 1 [3] => 7 [4] => 3 [5] => 4 [6] => 8 );
// array lenght;
$array_lenght=count($array_Name);
echo "Lenght Of Array Is:".$array_lenght;
// output : Lenght Of Array Is:7;
// disp... | true |
63a9a862674d9363924f04dc78e9941a3e7530c5 | PHP | svetchalex/origin | /Task07.php | UTF-8 | 251 | 3.21875 | 3 | [] | no_license | <?php
/**
* @param $names
* @param $prefix
*
* @return array|string
*/
function addPrefix($names, $prefix)
{
$newName = [];
foreach ($names as $key => $name) {
$newName[$key] = $prefix . ' ' . $name;
}
return $newName;
}
| true |
e02fecee7cc722cbed14dfa120561de4b5072a3c | PHP | anisimovDanil/database_system_security | /index.php | UTF-8 | 7,694 | 2.625 | 3 | [] | no_license | <?php
session_start();
require_once 'include/db_connect.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Shop</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
if(isset($_POST['submit'])) {
$username = htmlspecialchars( trim($_POST['input_login']) );
$pass = htmlspecialchar... | true |
b6326e22964b6ea09964d410bf03ff57993ecd2f | PHP | matry-ny/250121 | /chat/components/Storage.php | UTF-8 | 463 | 2.984375 | 3 | [] | no_license | <?php
namespace components;
use helpers\ArraysHelper;
class Storage
{
private array $data;
public function __construct(array $data = [])
{
$this->data = $data;
}
public function set(string $key, mixed $value): self
{
$this->data[$key] = $value;
return $this;
}
... | true |
b89fcb93948dbe50350693168209d9f034502921 | PHP | ProjetoIncluirUFMG/AdminApp | /application/models/Periodo.php | UTF-8 | 4,376 | 2.953125 | 3 | [] | no_license | <?php
class Application_Model_Periodo {
private $id_periodo;
private $identificacao_periodo;
private $data_inicial;
private $data_final;
private $valor_liberacao;
private $frequencia_min_aprovacao;
private $total_pts_periodo;
private $min_pts_aprovacao;
private $quantidade_alimento... | true |
5b958f170ad2caed1360099182eb0a4b43e1c47a | PHP | haxcode/CMS | /symfony/src/Planing/Infrastructure/CommandHandler/UpdateReleaseHandler.php | UTF-8 | 1,892 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Planing\Infrastructure\CommandHandler;
use App\Common\Event\EventBus;
use App\Common\CQRS\CommandHandler;
use Symfony\Component\Uid\Uuid;
use App\Common\Exception\NotFoundException;
use App\Planing\Infrastructure\Repository\ReleaseRepository;
use App\Planing\Application\Command\UpdateRelease;
use ... | true |
6379c6519bcc0c6dca97395ef485858e6322ab48 | PHP | TDEBRITO/testCalculator | /src/Entity/Calculator.php | UTF-8 | 1,320 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CalculatorRepository")
*/
class Calculator
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
... | true |
b0b6fdffe7988e45da1e95e31fd29e60c1f150dd | PHP | nedim1511/csis270project | /caffeteria/image.php | UTF-8 | 557 | 2.734375 | 3 | [] | no_license | <?php
if(isset($_GET["img"])) {
$file_extension = strtolower(substr(strrchr($_GET["img"],"."),1));
$ctype = "";
switch($file_extension) {
case "gif":
$ctype="image/gif";
break;
case "png":
$ctype="image/png";
... | true |
a1fd8d12e8b7172aeac93a7fb38b8d686df03f9e | PHP | superphs333/challenger_ | /upload_file.php | UTF-8 | 767 | 2.546875 | 3 | [] | no_license | <?php
$upfile_path = "/upload/"; // ํ์ผ์
๋ก๋ ๋๋ ํ ๋ฆฌ ๊ถํ์ 707 ์ด์ฌ์ผ ํฉ๋๋ค.
$tmp_file = $_FILES[upfile][tmp_name]; // ์
๋ก๋๋ ํ์ผ์ ์์์ด๋ฆ
$filename = $_FILES[upfile][name]; // ์
๋ก๋ ํ๋ คํ ํ์ผ๋ช
(์๋ ์ด๋ฆ)
$filepath = urlencode($filename); // ํ๊ธํ์ผ๋ช
์ ๋๋นํด urlencode ๋ก ๊ฐ๋๋ค.
$dest_file = $upfile_path ."/". $filepath; // ํ์ผ ์์น์ ํ์ผ๋ช
์ ์ง์
if(is_uploade... | true |
2dc4e0434d5e25ff075da20d0324a7a2ffeecc3b | PHP | FLMartins/portalwoobe | /app/Post.php | UTF-8 | 2,285 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Post extends Model
{
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
/**
* Get the User for this post.
*/
public function user()
{
return $this->belongsTo('App\User')-... | true |
5e6fa912bece3bff74de5133487a35460c87a8cd | PHP | manuc/silex-cops | /app/cops/Cops/Controller/BookController.php | UTF-8 | 3,390 | 2.609375 | 3 | [
"WTFPL"
] | permissive | <?php
/*
* This file is part of Silex Cops. Licensed under WTFPL
*
* (c) Mathieu Duplouy <mathieu.duplouy@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cops\Controller;
use Silex\ControllerProviderInterface... | true |
e0ce0766655ae2d4debdbdb80965e459b19be324 | PHP | rafaelcastelani/Newsletter | /public_html/teste.php | UTF-8 | 415 | 2.625 | 3 | [] | no_license | <?php
header("content-type:text-plain;");
$string = explode("\n",file_get_contents("categorias.csv"));
foreach($string as $i=>$line){
$line = explode(";",$line);
if(trim($line[1]) == ""){
if($i){
echo "</optgroup>\n";
}
echo "<optgroup label=\"".trim($line[0])."\">\n";
}else {
echo "\t<opt... | true |
4fb6b6a1f71b0064efd3812aac6664a7da78ebc6 | PHP | javimoya33/Ronneby | /wp-content/themes/ronneby/inc/vc_custom/dfd_vc_addons/modules/dfd_news_slider.php | UTF-8 | 2,407 | 2.59375 | 3 | [] | no_license | <?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
/*
* Add-on Name: News slider module
*/
if(!class_exists('Dfd_News_Slider') && class_exists('News_Page_Slider')) {
class Dfd_News_Slider{
function __construct(){
add_action('init',array($this,'dfd_news_slider_init'));
add_shortcode('dfd_news_slider',array($this,'df... | true |
784d3e8c960cddca098e0a1de34c4409387321dd | PHP | ramsharan0230/easybus | /database/migrations/2020_01_08_041606_create_sub_destinations_table.php | UTF-8 | 869 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSubDestinationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sub_des... | true |
bb03d897c748808e83ad1292970e616487495c72 | PHP | cawolf/behat-cucumber-formatter | /src/Node/Suite.php | UTF-8 | 822 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Vanare\BehatCucumberJsonFormatter\Node;
class Suite
{
/**
* @var string
*/
private $name = '';
/**
* @var array
*/
private $features = [];
public function getName(): string
{
return $this->name;
}
public function ... | true |
8cb461f4e76a5db20097845f8995708dc23d0622 | PHP | viniciusnw/linx-microvix | /src/Reader/Factories/AbstractRequestFactory.php | UTF-8 | 3,224 | 2.75 | 3 | [] | no_license | <?php
namespace Mobly\LinxMicrovix\Reader\Factories;
use Mobly\LinxMicrovix\Reader\Configuration;
/**
* Class AbstractRequestFactory
* @package Mobly\LinxMicrovix\Reader\Factories
*/
abstract class AbstractRequestFactory
{
/**
* @var Configuration
*/
protected $configuration;
/**
* @va... | true |
88ed911dfd8537bf5869ff15a4c480d75523c50c | PHP | AdhamWynston/projeto | /app/Http/Controllers/UserController.php | UTF-8 | 1,521 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Facades\JWTAuth;
class UserController extends Controller
{
public function signup(Request $request)
{
$this->validat... | true |
a4e870cbaa665e10c9bbdeb3283dbaae7b0dfa64 | PHP | RETFU/RREST | /tests/units/Response.php | UTF-8 | 8,862 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace RREST\tests\units;
require_once __DIR__.'/boostrap.php';
use atoum;
use RREST\Router\Silex;
use Silex\Application;
class Response extends atoum
{
/**
* @var Silex
*/
public $router;
/**
* @var \stdClass
*/
public $data;
public function beforeTestMethod($meth... | true |
0c9f7688767fa99ce19708591da174baec3770ad | PHP | kumpultugas17/Database-mySQL | /mahasiswa.php | UTF-8 | 1,590 | 2.765625 | 3 | [] | no_license | <?php
include 'config/koneksi.php';
$result = mysqli_query($conn, "SELECT * FROM mahasiswa");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h3>Data Mahasiswa</h3>
<a hr... | true |
149a2f614f10c4e476b2d15b3a3cfc81fe62f6e3 | PHP | ilyatokaev/diplom_faq | /templates/admin_desktop.php | UTF-8 | 10,354 | 2.59375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of admin_desktop
*
* @author ะะปัั
*/
class admin_desktop
{
private $templateName = "admin_desktop";
... | true |