query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Assumed hidden because no label given and columns not shown
public function testAssumedHiddenButExplicitlyVisible() { // by default, but explicitly visible because 'hide' is false. $testName = 'MyField'; $fieldSetting = array('hide' => false); $field = new Application_Model_Field($testName, $fieldSetting); // Test all methods that don't have unmet preconditions. $this->assertTrue($field->isVisible()); $this->_assertNoMetaInfo($field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function getIsLabelHidden(): bool;", "public functio...
[ "0.6714097", "0.6714097", "0.6543514", "0.64336693", "0.6431051", "0.635621", "0.635621", "0.633958", "0.63314825", "0.62764096", "0.6248063", "0.62172085", "0.615114", "0.6077067", "0.60562605", "0.6043824", "0.6017542", "0.5940232", "0.5931653", "0.5923974", "0.5923974", ...
0.0
-1
'last_name' is not required, but recommended
public function testRecommendedField() { $table = new Application_Model_DbTable_Table('ramp_auth_users'); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'last_name'; $fieldSetting = array('recommended' => true); $field = new Application_Model_Field($whichField, $fieldSetting, $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isRequired()); $this->assertTrue($field->isRecommended()); $this->assertFalse($field->isDiscouraged()); // User does not HAVE to provide this value. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function last_name() {\n $element = new Text('last_name');\n $element->setLabel('Last Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' ...
[ "0.74346834", "0.7356797", "0.71386904", "0.7063418", "0.70119244", "0.70119244", "0.6980671", "0.69520694", "0.6933484", "0.68823195", "0.6882018", "0.68815815", "0.68181944", "0.68151027", "0.6813842", "0.6811844", "0.67246693", "0.6717102", "0.6703306", "0.67023003", "0.67...
0.0
-1
'id' is required and primary key (and autoincremented)
public function testFieldIsRequiredAndAutoIncremented() { $tableName = 'ramp_auth_users'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'id'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertTrue($field->isPrimaryKey()); $this->assertTrue($field->isAutoIncremented()); $this->assertNull($field->getDefault()); // User does not have to provide this value; system will provide it. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id($id = null);", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "public function create($id)\n {\n\n }", "public function create($id)\n {\n\n }", "public function create($id)\n {\n \n }", ...
[ "0.6781595", "0.65998596", "0.65998596", "0.65998596", "0.65556526", "0.65556526", "0.6552452", "0.65382147", "0.65170515", "0.65108055", "0.6494839", "0.64570594", "0.64081407", "0.6350009", "0.6333238", "0.6316914", "0.62763727", "0.6247275", "0.6224604", "0.6224604", "0.62...
0.0
-1
'gender' is required but not primary key; has a default
public function testFieldIsRequiredAndHasDefault() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'gender'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertFalse($field->isPrimaryKey()); $this->assertFalse($field->isAutoIncremented()); $this->assertSame('Unknown', $field->getDefault()); // User does not have to provide this value; default will serve. $this->assertFalse($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gender()\n {\n return $this->belongsTo('App\\Gender', 'gender_id', 'id');\n }", "public function gender()\n {\n return $this->belongsTo('Poketracker\\Model\\Gender', 'gender_id');\n }", "public function genderID()\n {\n return $this->belongsTo(Lookups::class, 'gender...
[ "0.6369725", "0.6201123", "0.610377", "0.6097473", "0.6038414", "0.5955394", "0.5931999", "0.57520205", "0.5707818", "0.5682033", "0.5573807", "0.5571645", "0.5563719", "0.55358887", "0.5498666", "0.53888345", "0.53607166", "0.53215164", "0.53172004", "0.5282661", "0.52764624...
0.6580803
0
'status' is required but has no default
public function testFieldIsRequiredAndHasNoDefault() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'status'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isRequired()); $this->assertFalse($field->isPrimaryKey()); $this->assertFalse($field->isAutoIncremented()); $this->assertNull($field->getDefault()); // User must provide this value. $this->assertTrue($field->valueNecessaryForAdd()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function set_status()\n {\n }", "public static function status($status) {}", "abstract public function getStatus();", "public function getStatus()\n {\n }", "public function testIfCreationIsCorrect(){ \n \n $this->assertEquals(-1, $this->status->getStatusI...
[ "0.65385103", "0.6506961", "0.64292663", "0.63982046", "0.6349078", "0.6293667", "0.6293667", "0.6274138", "0.62537736", "0.62516266", "0.62516266", "0.62476987", "0.6220195", "0.6216161", "0.6205582", "0.6192368", "0.6186977", "0.6186977", "0.6186977", "0.6186977", "0.618697...
0.6102602
44
Test isEnum, enum data type & values, and default.
public function testEnumDataType() { $tableName = 'ramp_enumTesting'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'gender'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertTrue($field->isEnum()); $this->assertSame("enum('Unknown','M','F')", $field->getDataType()); $this->assertSame(array('Unknown','M','F'), array_keys($field->getEnumValues())); $this->assertSame('Unknown', $field->getDefault()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEnumField()\n {\n $field = $this->table->getField('yeahnay'); // An enum column\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Enumerated',\n $field);\n $enumValues = $field->getValues();\n $this->assertCount(2, $enum...
[ "0.66813856", "0.6616936", "0.658729", "0.6516475", "0.6394785", "0.6283025", "0.62467676", "0.6185788", "0.61654186", "0.615975", "0.6111784", "0.6082374", "0.602988", "0.6029672", "0.5976864", "0.5963048", "0.5950302", "0.5904844", "0.58995205", "0.5874721", "0.5867007", ...
0.7388066
0
Nonenum type (varchar); length specified
public function testDataTypeWithLengthSpecified() { $tableName = 'ramp_tabletest1'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'name'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isEnum()); $this->assertSame("varchar", $field->getDataType()); $this->assertSame("100", $field->getLength()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function varchar() {}", "public static function varchar($length = 255)\n {\n return self::stringField('varchar', $length);\n }", "public function supportsVarcharWithoutSize();", "public static function data_type() {\n\n\t\treturn 'string';\n\t}", "abstract protected function get_...
[ "0.7276224", "0.68211335", "0.6504398", "0.6438382", "0.63323194", "0.6257705", "0.6161649", "0.61152023", "0.6079603", "0.6072259", "0.6034292", "0.6034292", "0.6034292", "0.600851", "0.6005649", "0.5952356", "0.593948", "0.59284836", "0.59284836", "0.59207183", "0.59085214"...
0.62565917
6
Nonenum type (int); length not specified
public function testDataTypeWithLengthNotSpecified() { $tableName = 'ramp_tabletest1'; $table = new Application_Model_DbTable_Table($tableName); $metaInfo = $table->info(Zend_Db_Table_Abstract::METADATA); $whichField = 'id'; $field = new Application_Model_Field($whichField, array(), $metaInfo[$whichField]); $this->assertTrue($field->isInTable()); $this->assertTrue($field->isInDB()); $this->assertFalse($field->isEnum()); $this->assertSame("int", $field->getDataType()); $this->assertNull($field->getLength()); $this->_assertWholelyLocal($field); $this->_assertMetaInfoValues($tableName, $whichField, $field); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getType(): int {}", "public function getType() : int {\n return 0100000;\n }", "public function type() : int;", "abstract public function getType(): int;", "abstract public function type(): int;", "public function getMaxTokenType(): int;", "public function type(): int\n ...
[ "0.70498985", "0.6784735", "0.6760611", "0.6665104", "0.65001804", "0.6384957", "0.622568", "0.6084077", "0.59358937", "0.5894921", "0.58925074", "0.5866581", "0.5864164", "0.58635396", "0.5820456", "0.5820456", "0.58115286", "0.5811234", "0.58067596", "0.5779794", "0.5772501...
0.5797565
19
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $id_test = $request->id_test; $id_question = DB::table('questions')-> insertGetId(array( 'id_test' => $request->id_test, 'pertanyaan' => $request->question, )); $count= 0; foreach ($request->opsi as $key => $value) { if ($count == $request->isTrue) { $opsi = new OpsiJawaban; $opsi->id_question = $id_question; $opsi->isi_opsi = $value; $opsi->is_true = 1; $opsi->save(); }else{ $opsi = new OpsiJawaban; $opsi->id_question = $id_question; $opsi->isi_opsi = $value; $opsi->is_true = 0; $opsi->save(); } $count +=1; } $test = Test::find($request->id_test); $test->jumlah_soal += 1; $test->save(); $question = Question::where('id_test',$request->id_test)->get(); foreach ($question as $key => $value) { $value['opsi'] = OpsiJawaban::where('id_question',$value->id)->get(); } $section = SectionTraining::find($test->id_section_training); if ($section->id_type == 1) { return view('add-question') ->with('id_test', $id_test) ->with('questions',$question) ->with('time',$request->time) ->with('id_training',$request->id_training); }else{ return view('add-question-post-test') ->with('id_test', $id_test) ->with('questions',$question) ->with('time',$request->time) ->with('id_training',$request->id_training); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.63416...
0.0
-1
Display the specified resource.
public function show(Question $question) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit($id_question) { $question = Question::find($id_question); $question['opsi'] = OpsiJawaban::where('id_question',$id_question)->get(); return view('edit-question')->with('question',$question); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $question = Question::find($request->id_question); $question->pertanyaan = $request->id_test; $question->pertanyaan = $request->question; $question->save(); //delete saved option $opsi = OpsiJawaban::where('id_question',$request->id_question)->get(); $jawaban_trainee = JawabanTrainee::where('id_question',$request->id_question)->get(); foreach ($jawaban_trainee as $key => $value) { DB::table('jawaban_trainees')->delete($value->id); } foreach ($opsi as $key => $value) { DB::table('opsi_jawabans')->delete($value->id); } //save new option $count= 0; foreach ($request->opsi as $key => $value) { if ($count == $request->isTrue) { $opsi = new OpsiJawaban; $opsi->id_question = $request->id_question; $opsi->isi_opsi = $value; $opsi->is_true = 1; $opsi->save(); }else{ $opsi = new OpsiJawaban; $opsi->id_question = $request->id_question; $opsi->isi_opsi = $value; $opsi->is_true = 0; $opsi->save(); } $count +=1; } $test = Test::find($question->id_test); $section = SectionTraining::find($test->id_section_training); $training = Training::find($section->id_training); return redirect()->action( 'TrainingController@view', ['id' => $training->id] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy( $id_question ) { $opsi_jawabans = OpsiJawaban::where('id_question', $id_question)->get(); $jawaban_trainee = JawabanTrainee::where('id_question',$id_question)->get(); foreach ($jawaban_trainee as $key => $value) { DB::table('jawaban_trainees')->delete($value->id); } foreach ($opsi_jawabans as $key => $value) { DB::table('opsi_jawabans')->delete($value->id); } $question = Question::find($id_question); $test = Test::find($question->id_test); $test->jumlah_soal = $test->jumlah_soal - 1; $test->save(); $section = SectionTraining::find($test->id_section_training); $training = Training::find($section->id_training); DB:: table('questions')->delete($id_question); return redirect()->action( 'TrainingController@view', ['id' => $training->id] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853"...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236"...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $user = \Auth::user(); $product = Product::find($request->product_id); $review = new Review(); $review->comment = $request->comment; $review->star = $request->star; $review->user()->associate($user); $review->product()->associate($product); $review->save(); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", ...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(Review $review) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Start Setters Set/check the Grouping page id
private function setId($id = NULL) { $this->id = isset($id) && is_numeric($id) && $id > 0 ? (int) $id : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function SetUpStartGroup() {\n\t\tglobal $deals_details;\n\n\t\t// Exit if no groups\n\t\tif ($this->DisplayGrps == 0)\n\t\t\treturn;\n\n\t\t// Check for a 'start' parameter\n\t\tif (@$_GET[EWRPT_TABLE_START_GROUP] != \"\") {\n\t\t\t$this->StartGrp = $_GET...
[ "0.6990773", "0.6703438", "0.65744865", "0.64260316", "0.62781715", "0.6122495", "0.60126436", "0.600566", "0.5939144", "0.5939144", "0.5909153", "0.58438694", "0.5794296", "0.5728743", "0.5701655", "0.5695755", "0.5688037", "0.56738806", "0.56320894", "0.5621844", "0.5611895...
0.0
-1
Set/check the Grouping page category id
public function setCategoryId($categoryId = NULL) { $this->categoryId = isset($categoryId) && is_numeric($categoryId) && $categoryId > 0 ? (int) $categoryId : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setID($cid) { if($cid == faq_build_clean_input($cid,\"id\")) $this->category_id = $cid; }", "public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category...
[ "0.6389425", "0.62440205", "0.61312634", "0.611618", "0.61040056", "0.6093258", "0.60395426", "0.5995992", "0.5971191", "0.59101564", "0.5862698", "0.5820373", "0.5820373", "0.5820373", "0.58076614", "0.57860816", "0.576567", "0.5749754", "0.5740324", "0.5727003", "0.5699438"...
0.0
-1
Set the Grouping page accesory id
public function setAccessory($accessory = NULL) { $this->accessory = (int) $accessory; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function set_accordion_id() {\n\t\t\t$this->current_accordion_slug++;\n\t\t}", "protected function setPage_id($value)\n\t{\n\t\t$this->page_id = $value;\n\t}", "public function ...
[ "0.66401815", "0.64890414", "0.64887595", "0.6336313", "0.62302494", "0.6117533", "0.582784", "0.57982343", "0.57714945", "0.563884", "0.5581581", "0.5564963", "0.5564963", "0.5558127", "0.55443394", "0.5525002", "0.5506345", "0.5502464", "0.542897", "0.54235756", "0.5418394"...
0.0
-1
Set the Grouping page image description
public function setDescriptionImage($descriptionImage = "") { $this->descriptionImage = !empty($descriptionImage) ? trim($descriptionImage) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "protected func...
[ "0.5968117", "0.59102964", "0.58638966", "0.5598367", "0.55927694", "0.5518645", "0.54982185", "0.53999734", "0.53789943", "0.5377425", "0.53565586", "0.5338423", "0.5338003", "0.5305669", "0.53005415", "0.5300302", "0.5296377", "0.5291237", "0.5273274", "0.5261732", "0.52586...
0.54011196
7
Set the Grouping page image template
public function setImageTemplate($imageTemplate = "") { $this->imageTemplate = isset($imageTemplate) ? trim($imageTemplate).'-banner' : 'basic-banner'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_template($group) {\n if (isset($this->config[$group])) {\n $this->template = $this->config[$group];\n } else {\n show_error('The \"' . $group . '\" template group does not exist. Provide a valid group name or add the group first.');\n }\n $this->initia...
[ "0.6239835", "0.5879001", "0.56641006", "0.56317323", "0.5625614", "0.56060714", "0.5585708", "0.55652076", "0.55374897", "0.547634", "0.54699427", "0.5466037", "0.53877497", "0.5268026", "0.5248391", "0.5241917", "0.5222106", "0.5190244", "0.5190244", "0.5174351", "0.5130473...
0.52964956
13
Set the Grouping page description text html
public function setDescriptionTextHtml($descriptionTextHtml = "") { $this->descriptionTextHtml = !empty($descriptionTextHtml) ? trim($descriptionTextHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHtml();", "protected function setHtmlContent() {}", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['actio...
[ "0.6442319", "0.6199586", "0.61627513", "0.60541904", "0.60494256", "0.6038114", "0.6001011", "0.5978238", "0.5958126", "0.5924818", "0.59193546", "0.585316", "0.5778183", "0.57723475", "0.5762287", "0.5748233", "0.57308424", "0.5725036", "0.570963", "0.56981546", "0.5691656"...
0.0
-1
Set the Page Grouping descriptionMoreInfoHtml
public function setDescriptionMoreInfoHtml($descriptionMoreInfoHtml = "") { $this->descriptionMoreInfoHtml = !empty($descriptionMoreInfoHtml) ? trim($descriptionMoreInfoHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['des...
[ "0.67480886", "0.60148144", "0.5888587", "0.5723601", "0.568397", "0.56631184", "0.56386054", "0.54860467", "0.5457825", "0.5443679", "0.5334175", "0.5334175", "0.53106445", "0.5308413", "0.53028333", "0.5297064", "0.526465", "0.5248049", "0.5245327", "0.5242192", "0.52301085...
0.6606442
1
Set the Page Grouping specialHeaderClassName
public function setSpecialHeaderClassName($specialHeaderClassName = "") { $this->specialHeaderClassName = !empty($specialHeaderClassName) ? trim($specialHeaderClassName) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSpecialHeaderClassName() { return $this->specialHeaderClassName; }", "public function setHeaderClass($class) {\r\n $this->headerClass = \"class=\\\"$class\\\"\";\r\n }", "public function setHeaderClass($class) {\n $this->headerClass = \"class=\\\"$class\\\"\";\n }", "fu...
[ "0.67822284", "0.6517376", "0.64062715", "0.6094492", "0.57520664", "0.56397563", "0.5452493", "0.5432467", "0.5396821", "0.5377883", "0.537453", "0.52890724", "0.52877814", "0.528752", "0.52807635", "0.5233675", "0.52175856", "0.5202263", "0.51882803", "0.51798403", "0.51656...
0.66253924
1
Set the Page Grouping interSupplementHtml
public function setIntroSupplementHtml($interSupplementHtml = "") { $this->interSupplementHtml = !empty($interSupplementHtml) ? trim($interSupplementHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHtml();", "protected function setHtmlContent() {}", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "static public function setHTML() {\n\t\tself::$page_type = 0;\n\t}", "function bg_AddSettingsSectionHtml() { }", "function ski...
[ "0.5925031", "0.57408214", "0.5567896", "0.55672425", "0.5290671", "0.52672905", "0.5205604", "0.5075773", "0.5057879", "0.50419146", "0.5039823", "0.5029677", "0.50221014", "0.5010038", "0.49881518", "0.49711356", "0.49711356", "0.49711356", "0.49711356", "0.49601343", "0.49...
0.5034726
11
Set the Page Grouping popuphtml
public function setPopupHtml($popupHtml) { $this->popupHtml = !empty($popupHtml) ? trim($popupHtml) : NULL; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "function showPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl;\n\t\t\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSetti...
[ "0.6819107", "0.6083646", "0.60477173", "0.60070455", "0.5897682", "0.5888431", "0.57270575", "0.5703938", "0.56887025", "0.5608395", "0.5563202", "0.5562023", "0.5556081", "0.55283016", "0.5495903", "0.54637223", "0.53889304", "0.53773504", "0.53636193", "0.5360967", "0.5355...
0.0
-1
Start Getters Get the Grouping page category id
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getIdCategory(){\n return ...
[ "0.699744", "0.699744", "0.699744", "0.6956059", "0.6880029", "0.6851266", "0.6808533", "0.6785461", "0.6735777", "0.6648334", "0.6646559", "0.66035455", "0.6569481", "0.655147", "0.6463467", "0.64557284", "0.63980824", "0.63927686", "0.63569534", "0.63048786", "0.628762", ...
0.0
-1
Get the Grouping page category id
public function getCategoryId() { return $this->categoryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function get_category_id() {\n return...
[ "0.6877269", "0.6877269", "0.6877269", "0.6869199", "0.67473316", "0.6739292", "0.6646153", "0.6641393", "0.6587911", "0.65361965", "0.6514581", "0.6487603", "0.64832276", "0.6472671", "0.6440256", "0.6411691", "0.6372353", "0.63343024", "0.63283277", "0.63283277", "0.6320431...
0.6277783
23
Get the Grouping page Accessory
public function getAccessory() { return $this->accessory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupByPage() {}", "public function getAccessory()\n {\n return $this->get(self::_ACCESSORY);\n }", "function getGroupPerPage() {\n\t\treturn @$_SESSION[EWRPT_PROJECT_VAR . \"_\" . $this->TableVar . \"_grpperpage\"];\n\t}", "function getGroupPerPage() {\n\t\treturn @$_SESSION[...
[ "0.70130825", "0.6479401", "0.61660874", "0.61660874", "0.6115554", "0.6115554", "0.6115554", "0.6056581", "0.60327446", "0.59312266", "0.58807975", "0.58807975", "0.58807975", "0.58807975", "0.58766025", "0.5823107", "0.58139807", "0.58108073", "0.5810462", "0.57558316", "0....
0.6040952
8
Get the Grouping page image description
public function getDescriptionImage() { return $this->descriptionImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "public functio...
[ "0.63247466", "0.6130827", "0.6121675", "0.61037827", "0.608119", "0.60653335", "0.605454", "0.59207773", "0.59084535", "0.5888933", "0.58692646", "0.58255994", "0.58178234", "0.58129114", "0.58096987", "0.57675207", "0.5737811", "0.57258177", "0.5707907", "0.5690064", "0.568...
0.6395539
0
Get the Grouping page image template
public function getImageTemplate() { return $this->imageTemplate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function GetPageImage()\n {\n $imageID = $this->GetImageFromPageTable();\n ...
[ "0.606352", "0.606352", "0.606352", "0.606352", "0.606352", "0.606352", "0.60310316", "0.60152334", "0.5967853", "0.58967674", "0.58528733", "0.5826934", "0.57025737", "0.5688037", "0.5671982", "0.56544805", "0.5644574", "0.5632341", "0.5596304", "0.55674213", "0.556342", "...
0.69365734
0
Get the Grouping page description html
public function getDescriptionTextHtml() { return $this->descriptionTextHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li...
[ "0.6860222", "0.6604339", "0.6468313", "0.62626487", "0.6182901", "0.61619353", "0.6144719", "0.6134719", "0.61183083", "0.60266286", "0.601974", "0.5926971", "0.5909231", "0.59025943", "0.5886668", "0.5876637", "0.586275", "0.584269", "0.58301663", "0.5811701", "0.58019257",...
0.0
-1
Get the Grouping page description of more info html
public function getDescriptionMoreInfoHtml() { return $this->descriptionMoreInfoHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = \"Displays group events\";\n\t\t$txt['html'] = '<p>Displays group events.</p>';\n\t\t$txt['html'] = '<p>Examples:</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li><code>[[Groupevent(number=3)]]</code> - Displays the next three group events</li...
[ "0.65902627", "0.62305623", "0.6092215", "0.6064208", "0.6004666", "0.59977794", "0.59437317", "0.5936913", "0.5925137", "0.58859575", "0.5874702", "0.58557254", "0.5845434", "0.5817111", "0.5805628", "0.5800575", "0.5799283", "0.57827085", "0.5751813", "0.5749961", "0.573418...
0.66243196
0
Get the Grouping page special header class name
public function getSpecialHeaderClassName() { return $this->specialHeaderClassName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function voyage_mikado_header_class($classes) {\n\t\t$header_type = voyage_mikado_get_meta_field_intersect('header_type', voyage_mikado_get_page_id());\n\n\t\t$classes[] = 'mkdf-'.$header_type;\n\n\t\treturn $classes;\n\t}", "public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n ...
[ "0.683053", "0.6637812", "0.65224344", "0.64930576", "0.6322837", "0.6313183", "0.6256681", "0.61974657", "0.6134622", "0.61165714", "0.6082234", "0.6048214", "0.602517", "0.598934", "0.59839225", "0.5978656", "0.5940422", "0.5926847", "0.591176", "0.589264", "0.5875535", "...
0.70012313
0
Get the Grouping page intro supplement html
public function getIntroSupplementHtml() { return $this->introSupplementHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function getSplashBlock() {\r\n\t\t$html = '<p>Personnel handles the storing & presentation of faculty & staff records.</p>';\r\n\t\t$html .= '<p><b>Available Shortcode:</b><br /><code>[ofa-personnel][/ofa-personnel]</code></p>';\r\n\t\t$html .= '<p...
[ "0.62485236", "0.62111086", "0.6011276", "0.5994408", "0.58516866", "0.58427656", "0.58406705", "0.581698", "0.5804497", "0.57989424", "0.5778012", "0.5756614", "0.57398367", "0.573101", "0.5701372", "0.5694383", "0.56618476", "0.56567687", "0.5638123", "0.5607691", "0.560183...
0.6681547
0
Get the Grouping page popup html
public function getPopupHtml() { return $this->popHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function group_link_popup() {\n $r = '<div id=\"group-link-popup-container\" style=\"display: none\"><div id=\"group-link-popup\">';\n $r .= '<p>' . lang::get('Send this link to other people to allow them to view or join this group.') . '</p>';\n $r .= '<textarea style=\"width: 100%;\" id=\"...
[ "0.6723676", "0.64861923", "0.6319084", "0.6128063", "0.61273724", "0.6080793", "0.59977853", "0.5755861", "0.57258224", "0.56997746", "0.5687457", "0.5664227", "0.5656377", "0.5650595", "0.5648252", "0.5640764", "0.56347835", "0.56125414", "0.55917865", "0.5569221", "0.55649...
0.6543845
1
Used to get listings based off of a location on the page. Example: 'grid' will return all listings on the grouping page grid (aka subcategories)
public function getListings($location) { $stmt = NULL; $results = NULL; switch ($location) { case 'grid': $sql = "SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity, c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename, c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords, c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests, c.sitemap_show AS visibility, c.sitemap_page_priority AS priority, c.sitemap_page_change_frequency AS change_frequency, c.* FROM bs_subcategories c JOIN bs_pagetypes t LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id) LEFT JOIN bs_groupings grp ON (grp.id = c.grouping_id) LEFT JOIN bs_categories cat ON (cat.id = grp.category_id) LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid) WHERE cat.active = TRUE AND grp.active = TRUE AND c.active = TRUE AND grp.id = ? AND t.pagetype = 'subcategory' GROUP BY c.id ORDER BY c.position ASC, c.name ASC"; break; case 'sidebar': $sql = "SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity, c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename, c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords, c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests, c.sitemap_show AS visibility, c.sitemap_page_priority AS priority, c.sitemap_page_change_frequency AS change_frequency, grp.accessory FROM bs_subcategories c JOIN bs_pagetypes t LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id) LEFT JOIN bs_groupings grp ON (grp.id = c.grouping_id) LEFT JOIN bs_categories cat ON (cat.id = grp.category_id) LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid) WHERE cat.active = TRUE AND grp.active = TRUE AND c.active = TRUE AND grp.id = ? AND t.pagetype = 'subcategory' GROUP BY c.id ORDER BY c.name ASC"; break; } $stmt = Connection::getHandle()->prepare($sql); if( $stmt->execute(array ($this->getId())) ) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $results[] = $row; } } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListByLocation()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t//$this->addFilter(\"entity_type\", 6, true); // exclude events from tag cloud\r\n $this->addFilter(\"entity_type\", 2); // get tags for groups Only\r\n\t\t\treturn parent::getL...
[ "0.62172973", "0.607114", "0.5840782", "0.5789351", "0.57889295", "0.57296777", "0.566635", "0.56627524", "0.564338", "0.56263614", "0.555925", "0.55474997", "0.5512467", "0.55071145", "0.5496947", "0.5473101", "0.5467323", "0.54619676", "0.54393935", "0.54306227", "0.5425963...
0.78246146
0
Return the Grouping subcategory id
public function getSubcategoryId() { return $this->subcategoryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId(){\n return $this->_sub_cat_id;\n }", "public function getSubcategory_id()\n {\n return $this->subcategory_id;\n }", "private function getSubCategoryId($subCategoryName)\n {\n if (!isset($this->subCategoryNameToIdMap[$subCategoryName])) {\n $sql...
[ "0.7578464", "0.725984", "0.6531426", "0.6244221", "0.6193593", "0.6187404", "0.60922706", "0.6091951", "0.6091951", "0.6091951", "0.609151", "0.60586905", "0.60439485", "0.6043234", "0.60187167", "0.6005654", "0.5985133", "0.59639734", "0.5959786", "0.5928621", "0.5902886", ...
0.7053136
2
Create an instantiation of GroupingPage()
public static function create($id = NULL) { return new self($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupByPage() {}", "public function createPages() {\n $pageCount = $this->getPageCount();\n $currentPageNumber = $this->getCurrentPage();\n\n $structure = new XGrid_Plugin_Pagination_Structure();\n $structure->setPageCount($pageCount);\n $structure-...
[ "0.65364546", "0.60956913", "0.599549", "0.5894815", "0.5859384", "0.5801534", "0.5790278", "0.5761563", "0.57511973", "0.57402915", "0.5731229", "0.5641599", "0.5638056", "0.5616958", "0.5581516", "0.55720735", "0.5553098", "0.5537832", "0.55330896", "0.55330896", "0.5533089...
0.0
-1
transfer the order comment from the quote object to the order object during the sales_model_service_quote_submit_before event
public function execute(\Magento\Framework\Event\Observer $observer) { /** @var \Magento\Sales\Model\Order $order */ $order = $observer->getEvent()->getOrder(); // $this->logger->info("SalesOrderCustomerSzieFeeObserver===================>".$order->getId()); if ($order->getId()) { /** @var $quote \Magento\Quote\Model\Quote */ $quote = $this->quoteRepository->get($order->getQuoteId()); $customsizefee = $quote->getData('customsizefee'); // $this->logger->info("customsizefee===================>".$customsizefee); $order->setData('customsizefee',$customsizefee); $order->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post_order_comment()\n\t{\n\t\tif ($this->checkLogin('A') != '') {\n\t\t\t$product_id = $this->input->post('product_id');\n\t\t\t$comment_from = $this->input->post('comment_from');\n\t\t\t$commentor_id = $this->input->post('commentor_id');\n\t\t\t$deal_code = $this->input->post('deal_code');\n\t\t\...
[ "0.6169023", "0.6100622", "0.608849", "0.60269946", "0.5985621", "0.5929671", "0.5918604", "0.5904094", "0.58968985", "0.58486146", "0.583656", "0.57130754", "0.5705105", "0.5705062", "0.56935465", "0.56920373", "0.5682307", "0.5678824", "0.5667765", "0.56181437", "0.56068933...
0.0
-1
Define the model's default state.
public function definition() { return [ 'military_rank' => $this->faker->numberBetween(1, 32), 'name' => $this->faker->firstName(), 'surname' => $this->faker->lastName(), 'patronymic' => $this->faker->name(), 'military_position' => $this->faker->jobTitle(), 'information_security' => $this->faker->boolean() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamNa...
[ "0.7775155", "0.72243404", "0.6856852", "0.6793161", "0.67665094", "0.64318955", "0.64076173", "0.6369685", "0.6188302", "0.6186626", "0.6157444", "0.6152224", "0.6150927", "0.6142754", "0.6116051", "0.6107094", "0.6103933", "0.60380876", "0.6038064", "0.602087", "0.5986544",...
0.0
-1
Shortcode output => Get template file and display shortcode.
public function output( $atts, $content = null ) { ob_start(); do_action( 'vcex_shortcode_before', 'vcex_teaser', $atts ); include( vcex_get_shortcode_template( 'vcex_teaser' ) ); do_action( 'vcex_shortcode_after', 'vcex_teaser', $atts ); return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_shortcode_content(){\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue_frontend();\n $this->timepicker_style();\n\n //include the specified file\n require_once(\"$this->plugin_path/page-templates/questionnaire-temp...
[ "0.7330106", "0.729067", "0.7058859", "0.70191", "0.69832873", "0.6894244", "0.68663245", "0.6846297", "0.6584655", "0.65807545", "0.6562797", "0.654471", "0.648997", "0.64553416", "0.64412135", "0.6409177", "0.6407938", "0.6407573", "0.63941586", "0.6376069", "0.6367218", ...
0.5911558
95
Array of shortcode parameters.
public static function get_params() { $params = array( // General array( 'type' => 'textfield', 'heading' => esc_html__( 'Heading', 'total-theme-core' ), 'param_name' => 'heading', 'value' => 'Sample Heading', ), array( 'type' => 'textarea_html', 'holder' => 'div', 'heading' => esc_html__( 'Content', 'total-theme-core' ), 'param_name' => 'content', 'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.', ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Element ID', 'total-theme-core' ), 'param_name' => 'unique_id', 'admin_label' => true, 'description' => vcex_shortcode_param_description( 'unique_id' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Extra class name', 'total-theme-core' ), 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ), 'param_name' => 'classes', ), array( 'type' => 'vcex_visibility', 'heading' => esc_html__( 'Visibility', 'total-theme-core' ), 'param_name' => 'visibility', ), array( 'type' => 'vcex_hover_animations', 'heading' => esc_html__( 'Hover Animation', 'total-theme-core'), 'param_name' => 'hover_animation', ), vcex_vc_map_add_css_animation(), array( 'type' => 'textfield', 'heading' => esc_html__( 'Animation Duration', 'total'), 'param_name' => 'animation_duration', 'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Animation Delay', 'total'), 'param_name' => 'animation_delay', 'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'), ), // Style array( 'type' => 'dropdown', 'heading' => esc_html__( 'Style', 'total-theme-core' ), 'param_name' => 'style', 'value' => array( esc_html__( 'Default', 'total-theme-core' ) => '', esc_html__( 'Plain', 'total-theme-core' ) => 'one', esc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two', esc_html__( 'Boxed Square', 'total-theme-core' ) => 'three', esc_html__( 'Outline', 'total-theme-core' ) => 'four', ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ), 'param_name' => 'bottom_margin', 'value' => vcex_margin_choices(), 'admin_label' => true, 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Shadow', 'total' ), 'param_name' => 'shadow', 'value' => vcex_shadow_choices(), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_text_alignments', 'heading' => esc_html__( 'Text Align', 'total-theme-core' ), 'param_name' => 'text_align', 'std' => '', 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Padding', 'total-theme-core' ), 'param_name' => 'padding', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Background Color', 'total-theme-core' ), 'param_name' => 'background', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Border Color', 'total-theme-core' ), 'param_name' => 'border_color', 'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Border Radius', 'total-theme-core' ), 'param_name' => 'border_radius', 'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ), 'group' => esc_html__( 'Style', 'total-theme-core' ), ), // Heading array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Color', 'total-theme-core' ), 'param_name' => 'heading_color', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_select_buttons', 'heading' => esc_html__( 'Tag', 'total-theme-core' ), 'param_name' => 'heading_type', 'group' => esc_html__( 'Heading', 'total-theme-core' ), 'std' => 'h2', 'choices' => 'html_tag', ), array( 'type' => 'vcex_font_family_select', 'heading' => esc_html__( 'Font Family', 'total-theme-core' ), 'param_name' => 'heading_font_family', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_font_weight', 'heading' => esc_html__( 'Font Weight', 'total-theme-core' ), 'param_name' => 'heading_weight', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_text_transforms', 'heading' => esc_html__( 'Text Transform', 'total-theme-core' ), 'param_name' => 'heading_transform', 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_responsive_sizes', 'target' => 'font-size', 'heading' => esc_html__( 'Font Size', 'total-theme-core' ), 'param_name' => 'heading_size', 'description' => vcex_shortcode_param_description( 'font_size' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Margin', 'total-theme-core' ), 'param_name' => 'heading_margin', 'description' => vcex_shortcode_param_description( 'margin' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ), 'param_name' => 'heading_letter_spacing', 'description' => vcex_shortcode_param_description( 'letter_spacing' ), 'group' => esc_html__( 'Heading', 'total-theme-core' ), ), // Content array( 'type' => 'dropdown', 'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ), 'param_name' => 'content_top_margin', 'value' => vcex_margin_choices(), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Background', 'total-theme-core' ), 'param_name' => 'content_background', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_colorpicker', 'heading' => esc_html__( 'Color', 'total-theme-core' ), 'param_name' => 'content_color', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Margin', 'total-theme-core' ), 'param_name' => 'content_margin', 'description' => vcex_shortcode_param_description( 'margin' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_trbl', 'heading' => esc_html__( 'Padding', 'total-theme-core' ), 'param_name' => 'content_padding', 'description' => vcex_shortcode_param_description( 'padding' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_responsive_sizes', 'target' => 'font-size', 'heading' => esc_html__( 'Font Size', 'total-theme-core' ), 'param_name' => 'content_font_size', 'description' => vcex_shortcode_param_description( 'font_size' ), 'group' => esc_html__( 'Content', 'total-theme-core' ), ), array( 'type' => 'vcex_font_weight', 'heading' => esc_html__( 'Font Weight', 'total-theme-core' ), 'param_name' => 'content_font_weight', 'group' => esc_html__( 'Content', 'total-theme-core' ), ), // Media array( 'type' => 'dropdown', 'heading' => esc_html__( 'Source', 'total-theme-core' ), 'param_name' => 'image_source', 'std' => 'media_library', 'value' => array( esc_html__( 'Media Library', 'total-theme-core' ) => 'media_library', esc_html__( 'External', 'total-theme-core' ) => 'external', ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'attach_image', 'heading' => esc_html__( 'Image', 'total-theme-core' ), 'param_name' => 'image', 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'External Image URL', 'total-theme-core' ), 'param_name' => 'external_image', 'dependency' => array( 'element' => 'image_source', 'value' => 'external' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Alt', 'total-theme-core' ), 'param_name' => 'image_alt', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'image', 'not_empty' => true ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Video link', 'total-theme-core' ), 'param_name' => 'video', 'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\'s built-in oEmbed feature.', 'total-theme-core' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_select_buttons', 'heading' => esc_html__( 'Image Style', 'total-theme-core' ), 'param_name' => 'img_style', 'std' => '', 'choices' => array( '' => esc_html__( 'Auto', 'total-theme-core' ), 'stretch' => esc_html__( 'Stretch', 'total-theme-core' ), ), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_text_alignments', 'heading' => esc_html__( 'Align', 'total-theme-core' ), 'param_name' => 'img_align', 'std' => '', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Border Radius', 'total-theme-core' ), 'param_name' => 'img_border_radius', 'value' => vcex_border_radius_choices(), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ), 'param_name' => 'img_bottom_margin', 'value' => vcex_margin_choices(), 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_image_sizes', 'heading' => esc_html__( 'Image Size', 'total-theme-core' ), 'param_name' => 'img_size', 'std' => 'wpex_custom', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), ), array( 'type' => 'vcex_image_crop_locations', 'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ), 'param_name' => 'img_crop', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), 'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ), 'param_name' => 'img_width', 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ), 'param_name' => 'img_height', 'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ), 'group' => esc_html__( 'Media', 'total-theme-core' ), 'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ), ), array( 'type' => 'vcex_image_filters', 'heading' => esc_html__( 'Image Filter', 'total-theme-core' ), 'param_name' => 'img_filter', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), array( 'type' => 'vcex_image_hovers', 'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ), 'param_name' => 'img_hover_style', 'group' => esc_html__( 'Media', 'total-theme-core' ), ), // Link array( 'type' => 'vc_link', 'heading' => esc_html__( 'URL', 'total-theme-core' ), 'param_name' => 'url', 'group' => esc_html__( 'Link', 'total-theme-core' ), ), array( 'type' => 'vcex_ofswitch', 'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ), 'param_name' => 'url_local_scroll', 'group' => esc_html__( 'Link', 'total-theme-core' ), 'std' => 'false', ), // CSS array( 'type' => 'css_editor', 'heading' => esc_html__( 'CSS box', 'total-theme-core' ), 'param_name' => 'css', 'group' => esc_html__( 'CSS', 'total-theme-core' ), ), ); return apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "private static function ParamList ()\n {\n return array (\n \"a\" => array (\n ...
[ "0.6760509", "0.67428076", "0.6679754", "0.66720974", "0.66237247", "0.6500914", "0.6493657", "0.64737517", "0.6448983", "0.6444302", "0.64024913", "0.6360206", "0.6352497", "0.6301536", "0.6279113", "0.62610877", "0.62238526", "0.6219414", "0.62165016", "0.62165016", "0.6216...
0.65749663
5
Transform value to standart calculations.
private function transX($x) { return ($x - $this->meanValue) / $this->standardDeviation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transform($value);", "abstract protected function calculateValue();", "public function transform($value)\n {\n return $value;\n }", "protected function normalize(): void\n {\n $coordinate = new BaseCoordinate(array(0, $this->value));\n $latitude = (float)$coordin...
[ "0.6336758", "0.62555844", "0.6025224", "0.58538264", "0.5833574", "0.57894933", "0.5758018", "0.56056947", "0.5554127", "0.55469507", "0.5526371", "0.5519989", "0.55185723", "0.55010295", "0.5486529", "0.54742205", "0.54536766", "0.54082537", "0.53880477", "0.5384943", "0.53...
0.50381094
42
method of help soft delete from admin
public function admin_delete($help_id) { if ($this->Auth->user('account_level') != 51) throw new ForbiddenException; $this->autoRender=false; $conditions = array( 'Help.id' => $help_id, 'Help.status'=> 0, ); if ($this->Help->hasAny($conditions)){ $this->Help->delete($help_id); } else { $this->Session->setFlash(__('Can not delete'), 'error_form', array(), 'error'); } if(isset($this->params['url']['redirect_url'])){ return $this->redirect(urldecode($this->params['url']['redirect_url'])); } else { return $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function undeleteAction(){\n\t}", "public function admin_delete($id = false) {\r\n\t\tif($id) {\r\n\t\t\t$this->{$this->modelClass}->delete($id);\t\t\t\r\n\t\t}\r\n\t\tif(isset($this->data)) {\r\n\t\t\t$this->{$this->modelClass}->delete($this->data[$this->modelClass]['id']);\r\n\t\t\t$message = $this->mod...
[ "0.7206121", "0.71060973", "0.70654786", "0.70231533", "0.69690436", "0.6964411", "0.6964134", "0.6957735", "0.69520015", "0.6891051", "0.68468726", "0.6839106", "0.68307066", "0.68208027", "0.680907", "0.680533", "0.680533", "0.67860824", "0.67738336", "0.6760083", "0.671414...
0.6832098
12
method of help active/deactive from admin
public function admin_active($help_id,$active=NULL) { if ($this->Auth->user('account_level') != 51) throw new ForbiddenException; $this->autoRender=false; $conditions = array( 'Help.id' => $help_id, ); if ($this->Help->hasAny($conditions)){ $this->Help->updateAll( array( 'Help.status' =>$active ), $conditions ); $this->Help->afterSave(false); } else { $this->Session->setFlash(__('Can not save'), 'error_form', array(), 'error'); } if(isset($this->params['url']['redirect_url'])){ return $this->redirect(urldecode($this->params['url']['redirect_url'])); } else { return $this->redirect(array('controller' => 'helps', 'action' => 'index', 'admin' => true)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function menu_get_active_help()\n {\n return menu_get_active_help();\n }", "public function helpAction() {}", "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "public function setup_help_tab()\n {\n }", "public function admin()\n {\n $t...
[ "0.67637116", "0.6720985", "0.6514366", "0.6514366", "0.6486435", "0.6416981", "0.63709176", "0.6369762", "0.63072854", "0.6217914", "0.61954725", "0.6134044", "0.6062505", "0.60475945", "0.60307544", "0.6016189", "0.5979386", "0.59650606", "0.59568644", "0.59522694", "0.5952...
0.6669913
2
Przypisanie sciezki do kontrolera
public function bind(string $methodName, string $path, $action) { //sprawdza czy metoda jest dozwolona $this->checkIfMethodAllowed($methodName); //tworzymy bindowanie routingu $route = new AppRouterBinding(); $route->method($methodName); $route->path($path); $route->action($action); $this->routes[] = $route; return $route; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function masodik()\n {\n }", "public function serch()\n {\n }", "function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GL...
[ "0.69011366", "0.6443108", "0.6434743", "0.64181143", "0.63752866", "0.6342618", "0.6310155", "0.62929565", "0.6283741", "0.62501335", "0.6227391", "0.6211188", "0.6203384", "0.619416", "0.6193799", "0.61876225", "0.6175906", "0.61727506", "0.6164882", "0.6154179", "0.6149322...
0.0
-1
Sprawdzamy czy metoda dozwolona
private function checkIfMethodAllowed(string $methodName) { if (!in_array($methodName, $this->allowedMethods)) throw new \Exception('Undefinded method'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function masodik()\n {\n }", "public function getMataPelajaran();", "public function tampilDataGalang(){\n\t\t\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $...
[ "0.6715339", "0.65673023", "0.6241145", "0.6229831", "0.61918586", "0.61260915", "0.6062131", "0.60151136", "0.6000335", "0.59653497", "0.58926266", "0.58115715", "0.57728374", "0.57713336", "0.57631254", "0.57475597", "0.5743206", "0.5734784", "0.5732884", "0.57256764", "0.5...
0.0
-1
Tworzymy obiekt z informacjami jak stworzyc kontroler i jakie metody wywolac
private function createControllerBuilderInfo($action,$additionalVariables) { $data = explode('@', $action); $controllerBuilderInfo = new ControllerBuilderInfoImpl($data[0], $data[1]); foreach ($additionalVariables as $kay=>$value){ $controllerBuilderInfo->addVariable($kay, $value); } return $controllerBuilderInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n ...
[ "0.6672369", "0.6474163", "0.6429142", "0.6280648", "0.6123156", "0.6059062", "0.6056225", "0.6026287", "0.60177565", "0.60066414", "0.59362423", "0.59180117", "0.59161174", "0.58974016", "0.5894266", "0.5869622", "0.58601516", "0.5819736", "0.58151096", "0.5803979", "0.57835...
0.0
-1
Run the database seeds.
public function run() { AboutUs::create([ 'img_path' => 'assets/images/picture.svg', 'body' => '<p>Halaman About Us</p>' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.784195...
0.0
-1
/ Plugin Name: Facebook Share Feed Dialog Plugin URI: Description: This plugin creates a javascript function fb_share_feed_dialog(). You can use this function to let people post directly to their Timeline Version: 1.01 Author: The Anh Author URI:
function ta_share_fb_script() { wp_enqueue_script( 'social-share-fb', plugins_url('js/share-fb.js', __FILE__), array( 'jquery' ), '1.0.0', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function culturefeed_search_ui_add_facebook_share() {\n\n $fb_app_id = variable_get('culturefeed_search_ui_fb_app_id', '');\n if (!empty($fb_app_id)) {\n drupal_add_js(drupal_get_path('module', 'culturefeed') . '/js/facebook_share.js');\n drupal_add_js(array('culturefeed' => array('fbAppId' => $fb_app_id))...
[ "0.7134015", "0.69734704", "0.6950652", "0.68945396", "0.6762442", "0.6704617", "0.66035175", "0.6524725", "0.64954287", "0.64785564", "0.6419238", "0.6357457", "0.6352444", "0.6305331", "0.6249466", "0.6247981", "0.6233407", "0.62130547", "0.62030596", "0.61674535", "0.61103...
0.72939587
0
add_settings_section( $id, $title, $callback, $page )
function register_settings() { add_settings_section( 'main-settings-section', 'Main Settings', array($this, 'print_main_settings_section_info'), 'share-fb-sections-plugin' ); // add_settings_field( $id, $title, $callback, $page, $section, $args ) add_settings_field( 'app_id', 'App ID', array($this, 'create_input_app_id'), 'share-fb-sections-plugin', 'main-settings-section' ); // register_setting( $option_group, $option_name, $sanitize_callback ) register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_main_settings', array($this, 'plugin_main_settings_validate') ); // add_settings_section( $id, $title, $callback, $page ) add_settings_section( 'additional-settings-section', 'Additional Settings & Default Value', array($this, 'print_additional_settings_section_info'), 'share-fb-sections-plugin' ); // add_settings_field( $id, $title, $callback, $page, $section, $args ) add_settings_field( 'render_meta_tag', 'Render Meta Tag', array($this, 'create_input_render_meta_tag'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'title', 'Default Title', array($this, 'create_input_title'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'description', 'Default Description', array($this, 'create_input_description'), 'share-fb-sections-plugin', 'additional-settings-section' ); add_settings_field( 'image_url', 'Default Image URL', array($this, 'create_input_image_url'), 'share-fb-sections-plugin', 'additional-settings-section' ); // register_setting( $option_group, $option_name, $sanitize_callback ) register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_additonal_settings', array($this, 'plugin_additional_settings_validate') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_settings_sections($page)\n {\n }", "public function addSection()\n\t{\n\t\t// Create the setting section with the WordPress Settings Api\n\t\tadd_settings_section(\n\t\t\t$this->section_id,\n\t\t\t$this->section_options['title'],\n\t\t\tarray($this->section_callback, 'callback'),\n\t\t\t$this->...
[ "0.79533756", "0.78925526", "0.7864827", "0.78374994", "0.7810609", "0.76864356", "0.76244366", "0.74595255", "0.7435266", "0.74153584", "0.7328516", "0.7306709", "0.7303976", "0.71077335", "0.71015227", "0.7093092", "0.70522577", "0.7010303", "0.7009345", "0.69956946", "0.69...
0.6952761
20
echo 'Additional Settings Description.';
function print_additional_settings_section_info() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myprefix_settings_section_content() {\n\techo '<p>';\n\t_e('Settings section description.');\n\techo '</p>';\n}", "function PrintSiteDescription()\n\t{\n\t\t$description = GetTitle('parameters/preferences', 3);\n\t\techo $description;\n\t}", "public function render_settings_section() {\n\t\tprintf( __...
[ "0.7822036", "0.7110753", "0.70156485", "0.7004875", "0.6932806", "0.68559355", "0.68168366", "0.676708", "0.6725137", "0.66631156", "0.6641322", "0.6608141", "0.6587587", "0.6520855", "0.6489685", "0.6480666", "0.64625883", "0.64625883", "0.64625883", "0.64509535", "0.644508...
0.6914259
5
config pour le site
public function details_entrepot_site($id) { $entrepot = Entrepot::findOrFail($id); $entrepot_similaire = Entrepot::where('id', '!=', $id) ->where('status', 1) ->take(8) ->get(); $nb_entr = $entrepot_similaire->count(); return view('site.entrepot.details', ['entrepot' => $entrepot]) ->with(['nb_entr' => $nb_entr]) ->with(['entrepot_similaire' => $entrepot_similaire]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function config();", "public function config()\n {\n }", "private function getConfig() {\n // call the GetConfig API\n $args = array('hostname' => $this->hostname);\n $api = new \\xmlAPI('GetConfig', $this->_default_key, 'xml', $args);\n $api->server_url = $this-...
[ "0.7474454", "0.7119541", "0.68543947", "0.68486845", "0.6821353", "0.6787991", "0.67344356", "0.67252624", "0.66885465", "0.66758955", "0.6674771", "0.6672598", "0.66627926", "0.66409606", "0.6633463", "0.6625057", "0.6583522", "0.6583522", "0.6583522", "0.6583522", "0.65835...
0.0
-1
method generate generate random token
public static function generate(){ return Session::put(Config::get('session/token_name'), md5(uniqid())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateRandomToken():string;", "public function generateToken();", "function generateToken()\n {\n return md5(uniqid(rand().time(),true));\n }", "function generate_token()\n\t{\n\t return sha1(base64_encode(openssl_random_pseudo_bytes(30)));\n\t}", "private function generateT...
[ "0.9080293", "0.88415873", "0.8770622", "0.8700579", "0.8596843", "0.85623574", "0.84416276", "0.8421873", "0.84049183", "0.838822", "0.83117235", "0.82696766", "0.8236965", "0.8236089", "0.82347596", "0.82326114", "0.8198594", "0.8161439", "0.8145096", "0.8133805", "0.812818...
0.0
-1
method check checking or token exists and in session have the same token if token exists delete them and return true.
public static function check($token){ $tokenName = Config::get('session/token_name'); if (Session::exists($tokenName) && $token === Session::get($tokenName)) { Session::delete($tokenName); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check($token) {\r\n\t\t$tokenName = Config::get('session/token_name');\r\n\r\n\t\tif (Session::exists($tokenName) && $token === Session::get($tokenName)) {\r\n\t\t\tSession::delete($tokenName);//dont need it any more\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public ...
[ "0.8104914", "0.8099782", "0.8097319", "0.800509", "0.7889978", "0.7459198", "0.74321926", "0.72856367", "0.7197678", "0.71761227", "0.7157418", "0.70978606", "0.7001567", "0.6988043", "0.6958434", "0.6947647", "0.69197774", "0.6891097", "0.6850057", "0.6777711", "0.67703754"...
0.8151756
0
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function generate_currencies() { $this->load->model('Currency_model'); $json = file_get_contents('https://free.currencyconverterapi.com/api/v6/currencies'); $currencies = json_decode($json); foreach ($currencies->results as $currency) { echo json_encode($currency); $this->Currency_model->id_currency = $currency->id; $this->Currency_model->name = $currency->currencyName; if (property_exists($currency, "currencySymbol")) { $this->Currency_model->symbol = $currency->currencySymbol; } else { $this->Currency_model->symbol = null; } $this->Currency_model->insert(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.7654909", "0.7412712", "0.73954225", "0.73159236", "0.72264016", "0.72264016", "0.7188618", "0.7164213", "0.7150304", "0.7143225", "0.7106181", "0.7075943", "0.7074692", "0.7039509", "0.7028076", "0.7028076", "0.7028076", "0.7028076", "0.7028076", "0.69718754", "0.69670206...
0.0
-1
Default "to string" handler Allows pages to _p()/echo()/print() this object, and to define the default way this object would be outputted. Can also be called directly via $objGroupParticipation>__toString().
public function __toString() { return sprintf('GroupParticipation Object %s', $this->intId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n {\n return Text::format(self::DEFAULT_TO_STRING, get_class($this));\n }", "public function __toString()\n\t{\n\t\tswitch ($this->last_called) {\n\t\t\tcase \"Get_Documents_By_Name\":\n\t\t\tcase \"Get_Documents\":\n\t\t\tcase \"Get_Document_List\":\n\t\t\t\treturn $thi...
[ "0.6584186", "0.64531374", "0.6373067", "0.63469106", "0.6318043", "0.63144076", "0.6307043", "0.62735796", "0.6257036", "0.6257036", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0.62569803", "0...
0.7102918
0
Given an array of start and end dates (ordered by start date) Parameter is an array of array of dates: array( array(StartDateForFirstParticipation1, EndDateForParticipation1), array(StartDateForFirstParticipation2, EndDateForParticipation2), array(StartDateForFirstParticipation3, EndDateForParticipation3), array(StartDateForFirstParticipationN, EndDateForParticipationN) );
public static function IsValidDates($dttDateArray) { for ($intIndex = 0; $intIndex < count($dttDateArray); $intIndex++) { // Start Date must be later than previous's Start Date and End Date if ($intIndex > 0) { if ($dttDateArray[$intIndex][0]->IsEarlierThan($dttDateArray[$intIndex-1][0])) return false; if (!$dttDateArray[$intIndex-1][1]) return false; if ($dttDateArray[$intIndex][0]->IsEarlierThan($dttDateArray[$intIndex-1][1])) return false; } // End Date must be later than start date (if applicable) if ($dttDateArray[$intIndex][1]) { if ($dttDateArray[$intIndex][0]->IsLaterThan($dttDateArray[$intIndex][1])) return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leadsInDates($start, $end, $data = []);", "function datePeriod_start_end($begin, $end)\n{\n $begin = new DateTime($begin);\n\n $end = new DateTime($end.' +1 day');\n\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n\n foreach ($daterange as $date) {\n $dat...
[ "0.645774", "0.62865955", "0.6130205", "0.60760057", "0.6015916", "0.5997147", "0.5994429", "0.59929216", "0.59664273", "0.5950139", "0.59144026", "0.5910931", "0.58751", "0.58517", "0.5842366", "0.58401734", "0.5824187", "0.5802125", "0.57976973", "0.5790367", "0.5786731", ...
0.5208887
76
Retrieves an array of array of dates (which can be used for IsValidDates for a given Person, Group and GroupRole
public static function GetParticipationDatesArrayForPersonIdGroupIdGroupRoleId($intPersonId, $intGroupId, $intGroupRoleId) { $objParticipationArray = GroupParticipation::QueryArray(QQ::AndCondition( QQ::Equal(QQN::GroupParticipation()->PersonId, $intPersonId), QQ::Equal(QQN::GroupParticipation()->GroupId, $intGroupId), QQ::Equal(QQN::GroupParticipation()->GroupRoleId, $intGroupRoleId) ), QQ::OrderBy(QQN::GroupParticipation()->DateStart)); $dttArrayToReturn = array(); foreach ($objParticipationArray as $objParticipation) { $dttArrayToReturn[] = array($objParticipation->DateStart, $objParticipation->DateEnd); } return $dttArrayToReturn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getDateRange()\n {\n if (is_null($this->_dateRange)) {\n $this->_dateRange = array();\n $rules = $this->getAttributeObject()->getValidateRules();\n if (isset($rules[self::MIN_DATE_RANGE_KEY])) {\n $this->_dateRange[self::MIN_DATE_RANGE_K...
[ "0.67303383", "0.6722656", "0.67053896", "0.6628759", "0.6536443", "0.65139085", "0.6488055", "0.6434299", "0.6316501", "0.62503844", "0.6237216", "0.61478084", "0.61466473", "0.6119529", "0.60866725", "0.607003", "0.6068347", "0.6063355", "0.6029745", "0.60255253", "0.601679...
0.58764875
29
Returns true if the user requested to serialize the output data (&serialize=1 in the request)
private function shouldSerialize() { $serialize = Common::getRequestVar('serialize', 0, 'int', $this->request); return !empty($serialize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOutputting() {}", "public static function serialized(string $name): bool\n {\n return static::$serialize;\n }", "public function isSerialized()\n {\n if (!isset($this->str[0])) {\n return false;\n }\n\n /** @noinspection PhpUsageOfSilenceOperatorInspection */\n ...
[ "0.6654072", "0.6415039", "0.63699776", "0.6330348", "0.63162905", "0.6225804", "0.6064652", "0.6011371", "0.59884924", "0.594241", "0.5907368", "0.59025705", "0.587237", "0.5847748", "0.5745106", "0.5695224", "0.5662562", "0.56160754", "0.5597635", "0.5592475", "0.5576934", ...
0.76032305
0
Generate a random hash to be used in file names
protected function hash($value) { return md5($value . "_" . rand() . "_" . time()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateHash()\n {\n do {\n $hash = Security::randomString(8);\n } while ($this->exists(['hash' => $hash]));\n\n return $hash;\n }", "private static function create_hash() {\n $hash = md5( rand(0,1000) );\n return $hash;\n }", "private func...
[ "0.8153327", "0.7946584", "0.77458376", "0.76753867", "0.7549161", "0.7540734", "0.753428", "0.7513523", "0.72944635", "0.72496337", "0.7192353", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.7188072", "0.70657784", "0.70547825", "0.70305675", "0.7020737...
0.0
-1
Check if a filename has a certain extensions Returns an integer but 0 is also 'false'
protected function checkExtension($filename, $extension) { return strpos($filename, "." . $extension); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}", "function extension($ext){\r\n\t\tif ($ext == \"jpg\" || $ext == \"jpeg\" || $ext == \"png\") {\r\n\t\t\t$ret = 1;\r\n\t\t} else{\...
[ "0.7608403", "0.7498947", "0.7459561", "0.74049926", "0.72833854", "0.7187359", "0.71502775", "0.71502775", "0.71412355", "0.7132933", "0.71243244", "0.71040756", "0.70507586", "0.69953483", "0.69520056", "0.693726", "0.68297595", "0.68096477", "0.68059677", "0.67763776", "0....
0.69335985
16
View details of an existing user
function actionViewUser($templateVars) { $currentUser = usersGetCurrent(); $currentUser['accessLevelDescription'] = accessLevelsGetDescription($currentUser['accesslevels_id']); $templateVars['currentUser'] = $currentUser; $currentProperty = propertiesGetCurrent(); $templateVars['currentProperty'] = $currentProperty; $currentDivision = divisionsGetCurrent(); if($currentDivision == false) $templateVars['currentDivision'] = false; else $templateVars['currentDivision'] = $currentDivision; $currentDepartment = departmentsGetCurrent(); if($currentDepartment == false) $templateVars['currentDepartment'] = false; else $templateVars['currentDepartment'] = $currentDepartment; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.detail', compact('user'));\n }", "public function viewUserAction()\n {\n \tif($this->getRequest()->getParam('id')){\n \t\t$db = new RsvAcl_Model_DbTable_DbUser();\n \t\t$user_id = ...
[ "0.7448395", "0.74117154", "0.73897153", "0.7251069", "0.7230593", "0.7218003", "0.72036934", "0.71603906", "0.7132444", "0.7097707", "0.70766294", "0.70766294", "0.70734143", "0.7056146", "0.7044638", "0.7035038", "0.70256144", "0.7014415", "0.7014415", "0.7014415", "0.70144...
0.0
-1
Add a new user
function actionAddUser($templateVars) { $property = propertiesNewModel(); if(!empty($_POST) && isset($_POST['newPropertyForm'])) { $validForm = true; $property['name'] = $_POST['name']; if(empty($property['name'])) { $templateVars['nameError'] = 'Please enter a name for this property'; $validForm = false; } if(empty($_FILES['logo']['name'])) { $templateVars['logoError'] = 'Please include a logo for for this property'; $validForm = false; } else { $newLogo = $_FILES['logo']['name']; $newLogoTemp = $_FILES['logo']['tmp_name']; $newLogoType = $_FILES['logo']['type']; if(!in_array($newLogoType, $siteConfig['validLogoTypes'])) { $templateVars['logoError'] = 'Supported logo types are JPEG, GIF or PNG'; $validForm = false; } } if($validForm == true) { propertiesAddRecord($property); $property['id'] = dbLastId(); $property['logo'] = generateLogoFilename($property['id'], $newLogo); //move_uploaded_file($newLogoTemp, APPLICATION_DIR.'/images/logos/'.$property['logo']); propertiesUpdateRecord($property); redirectToPage('settings/properties/listing'); } } $templateVars['property'] = $property; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addUser(){}", "public function addUser(){\n\t}", "public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n ...
[ "0.86650443", "0.8087462", "0.7969738", "0.7914542", "0.788763", "0.7750234", "0.76779085", "0.7672384", "0.76217324", "0.75666213", "0.75666213", "0.75666213", "0.75666213", "0.7555714", "0.75064635", "0.74990875", "0.74563944", "0.74525595", "0.74431837", "0.74252856", "0.7...
0.0
-1
Edit details of an existing user
function actionEditUser($templateVars) { $currentProperty = propertiesGetCurrent(); $currentDivision = divisionsGetCurrent(); $currentDepartment = departmentsGetCurrent(); $currentUser = usersGetCurrent(); if(!empty($_POST) && isset($_POST['editPropertyForm'])) { $validForm = true; $currentUser['firstname'] = $_POST['firstname']; if(empty($currentUser['firstname'])) { $templateVars['userFirstnameError'] = 'Please enter a first name for this user'; $validForm = false; } $currentUser['lastname'] = $_POST['lastname']; if(empty($currentUser['lastname'])) { $templateVars['userLastnameError'] = 'Please enter a last name for this user'; $validForm = false; } $currentUser['email'] = $_POST['emailname']; if(empty($currentUser['email'])) { $templateVars['userEmailError'] = 'Please enter an email for this user'; $validForm = false; } if($validForm == true) { $property['name'] = $newPropertyName; propertiesUpdateRecord($property); redirectToPage('settings/properties/listing'); } } $templateVars['accessLevels'] = accessLevelsGetAll(); $templateVars['currentProperty'] = $currentProperty; $templateVars['currentDivision'] = $currentDivision; $templateVars['currentDepartment'] = $currentDepartment; $templateVars['currentUser'] = $currentUser; return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_edit($user_info)\n {\n }", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\ti...
[ "0.79039866", "0.7870004", "0.78649145", "0.78646636", "0.7843102", "0.78171915", "0.7789055", "0.7749386", "0.77455825", "0.7713012", "0.768158", "0.7653916", "0.76265407", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163", "0.7615163"...
0.0
-1
Soft delete an existing user
function actionDeleteUser($templateVars) { $currentUser = usersGetCurrent(); $currentUser['accessLevelDescription'] = accessLevelsGetDescription($currentUser['accesslevels_id']); $templateVars['currentUser'] = $currentUser; $currentProperty = propertiesGetCurrent(); $templateVars['currentProperty'] = $currentProperty; $currentDivision = divisionsGetCurrent(); if($currentDivision == false) $templateVars['currentDivision'] = false; else $templateVars['currentDivision'] = $currentDivision; $currentDepartment = departmentsGetCurrent(); if($currentDepartment == false) $templateVars['currentDepartment'] = false; else $templateVars['currentDepartment'] = $currentDepartment; if($currentUser['id'] == sessionGetVar('loggedIn')) $templateVars['formError'] = 'Cannot delete the currently logged in user.'; else { if(!empty($_POST) && isset($_POST['deleteUserForm'])) { usersSoftDelete($currentUser['id']); redirectToPage('settings/users/view'); } } return $templateVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function softdelete()\n {\n\n $user = User::findOrFail(request()->id);\n\n $user->first_name = NULL;\n $user->middle_name = NULL;\n $user->last_name = NULL;\n $user->email = NULL;\n $user->...
[ "0.78779006", "0.78747535", "0.72980356", "0.72886956", "0.717335", "0.7161724", "0.7156462", "0.71501535", "0.71449876", "0.7041127", "0.7030999", "0.7013233", "0.70014244", "0.697262", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69690937", "0.69...
0.0
-1
Run the database seeds.
public function run() { DB::table('results')->insert([ 'finish_time' => Carbon\Carbon::now(), 'score' => '8', 'user_id' => '1', 'test_id' => '1', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Change the subscribsion for an contact. Add new subscribers to an automation.
public function handleNewsletterSubscriberSave(Varien_Event_Observer $observer) { $helper = Mage::helper('connector'); $subscriber = $observer->getEvent()->getSubscriber(); $storeId = $subscriber->getStoreId(); $email = $subscriber->getEmail(); $subscriberStatus = $subscriber->getSubscriberStatus(); $websiteId = Mage::app()->getStore($subscriber->getStoreId())->getWebsiteId(); $contactEmail = Mage::getModel('email_connector/contact')->loadByCustomerEmail($email, $websiteId); try{ // send new subscriber to an automation if (! Mage::getModel('newsletter/subscriber')->loadByEmail($email)->getId()) { $this->_postSubscriberToAutomation($email, $websiteId); } // only for subsribers if ($subscriberStatus == Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED) { $client = Mage::helper('connector')->getWebsiteApiClient($websiteId); //check for website client if ($client) { //set contact as subscribed $contactEmail->setSubscriberStatus( $subscriberStatus ) ->setIsSubscriber('1'); $apiContact = $client->postContacts( $email ); //resubscribe suppressed contacts if ( isset( $apiContact->status ) && $apiContact->status == 'Suppressed' ) { $client->postContactsResubscribe( $apiContact ); } } // reset the subscriber as suppressed $contactEmail->setSuppressed(null); //not subscribed } else { //skip if contact is suppressed if ($contactEmail->getSuppressed()) return $this; //update contact id for the subscriber $client = Mage::helper('connector')->getWebsiteApiClient($websiteId); //check for website client if ($client) { $contactId = $contactEmail->getContactId(); //get the contact id if ( !$contactId ) { //if contact id is not set get the contact_id $result = $client->postContacts( $email ); if ( isset( $result->id ) ) { $contactId = $result->id; } else { //no contact id skip $contactEmail->setSuppressed( '1' ) ->save(); return $this; } } //remove contact from address book $client->deleteAddressBookContact( $helper->getSubscriberAddressBook( $websiteId ), $contactId ); } $contactEmail->setIsSubscriber(null) ->setSubscriberStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED); } //update the contact $contactEmail->setStoreId($storeId); if (isset($contactId)) $contactEmail->setContactId($contactId); //update contact $contactEmail->save(); }catch(Exception $e){ Mage::logException($e); Mage::helper('connector')->getRaygunClient()->SendException($e, array(Mage::getBaseUrl('web'))); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_contact_to_list($cat_id, $email, $name) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->add(array(\n 'EmailAddress' => $e...
[ "0.63231033", "0.6291855", "0.59830886", "0.5907746", "0.5660873", "0.56111187", "0.55985105", "0.5594071", "0.55372757", "0.5529192", "0.55182874", "0.5512006", "0.5487869", "0.5479334", "0.5414964", "0.538628", "0.53782666", "0.53731084", "0.5370639", "0.53357893", "0.53183...
0.5633172
5
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649F85E0677 (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE record MODIFY idrecord INT NOT NULL'); $this->addSql('ALTER TABLE record DROP PRIMARY KEY'); $this->addSql('ALTER TABLE record CHANGE name name VARCHAR(45) NOT NULL, CHANGE email email VARCHAR(45) NOT NULL, CHANGE content content VARCHAR(255) NOT NULL, CHANGE idrecord id INT AUTO_INCREMENT NOT NULL'); $this->addSql('ALTER TABLE record ADD PRIMARY KEY (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062383", "0.791459", "0.791459", "0.791459", "0.757202", "0.75622094", "0.7528509", "0.74991167", "0.7495741", "0.7454034", "0.74464583", "0.74359256", "0.7432558", "0.7428393", "0.7419358", "0.73787934", "0.7376999", "0.7371375", "0.7365399", "0.735214", "0.733067", "...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('DROP TABLE user'); $this->addSql('ALTER TABLE record MODIFY id INT NOT NULL'); $this->addSql('ALTER TABLE record DROP PRIMARY KEY'); $this->addSql('ALTER TABLE record CHANGE name name VARCHAR(45) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE email email VARCHAR(45) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE content content VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_0900_ai_ci`, CHANGE id idrecord INT AUTO_INCREMENT NOT NULL'); $this->addSql('ALTER TABLE record ADD PRIMARY KEY (idrecord)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.705336...
0.0
-1
get sensor accuracy from metadata
public function calculateAccuracy(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccuracy()\n {\n return $this->accuracy;\n }", "function accuracyMeasure() {\r\n\r\n\t\tif ($this->expectsPost(array('measureId', 'referenceTimestamp', 'userTimestamp'))) {\r\n\r\n\t\t\t$result['success'] = false;\r\n\r\n\t\t\t$watch = $this->watch->getWatchByMeasureId($this->meas...
[ "0.7002905", "0.65120107", "0.64767563", "0.6304602", "0.5844184", "0.57409304", "0.5553478", "0.54137075", "0.533179", "0.5308558", "0.5297129", "0.5261486", "0.5223062", "0.51994294", "0.5197761", "0.5148407", "0.5126221", "0.51244515", "0.511475", "0.50436354", "0.50389814...
0.65084124
2
// MySQLFunction() Constructor // MySQLFunction() Constructor for MySQLFunction object Constructor for MySQLFunction object
function __construct ($strFunction, $arrParams=null) { $this->_strFunction = $strFunction; $this->_arrParams = $arrParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MySQL() {\n \n }", "function __construct()\n {\n parent::__construct();\n $this->tableName = 'functioncode';\n }", "function testCreatSqlFunction()\r\n {\r\n global $webUrl;\r\n global $lang, $DATABASE, $SERVER;\r\n\r\n // Turn to the \"Create SQL/...
[ "0.6012904", "0.5308856", "0.52413315", "0.5214457", "0.51100165", "0.5057674", "0.49851096", "0.49425158", "0.49014345", "0.48973918", "0.4868988", "0.48566493", "0.484258", "0.4801125", "0.4793455", "0.47742167", "0.4747866", "0.47349033", "0.47326857", "0.47285336", "0.472...
0.4705825
21
// getFunction() // getFunction() Gets the value of the function Gets the value of the function
public function getFunction () { return $this->_strFunction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFunction()\n {\n return $this->function;\n }", "public function get_function() {\n\t\tif ( ! $this->is_function_set ) {\n\t\t\t$this->set_function( $this->derive_function() );\n\t\t}\n\t\treturn $this->function;\n\t}", "public function getFunction(): string;", "private functio...
[ "0.78328705", "0.76613057", "0.76224893", "0.7355767", "0.72721386", "0.6809612", "0.6611159", "0.6582198", "0.64641607", "0.64530593", "0.63695586", "0.6224276", "0.61575615", "0.60599864", "0.60423875", "0.60411346", "0.60069203", "0.60028934", "0.5961104", "0.5947958", "0....
0.7290674
4
Get a list of available room at the designated date time
public function getAvailable($date, $area=3, $cover=1, $limit=50) { $limit = ($limit <= 50) ? $limit : 50; $this->validateDate($date); $data = Parser::parseArea($this->bAuth_user, $this->bAuth_pass, $date, $area); // flatten it $timeslots = []; foreach($data['rooms'] as $room) { foreach($room['timeslots'] as $t) { $t['room'] = $room['room']; $timeslots[] = $t; } } $timeslots = array_slice($timeslots, 0, $limit); $rtn = [ 'area' => $area, 'date' => $date, 'cover' => $cover, 'limit' => $limit, 'timeslots' => $timeslots ]; return $rtn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvailableRooms()\n {\n $scheduleRepository = $this->getRepository('schedule');\n $time = $this->getCustomParam('time');\n $date = $this->getCustomParam('date');\n\n $rooms = $scheduleRepository->getAvailableRooms($date, $time);\n\n // set object to array in ...
[ "0.76007515", "0.74137884", "0.68969226", "0.6782485", "0.6654334", "0.6606009", "0.6494135", "0.6413228", "0.6405282", "0.64015865", "0.6393042", "0.63919896", "0.63353693", "0.633005", "0.63128483", "0.6288068", "0.6280571", "0.6261809", "0.62208104", "0.61589086", "0.61191...
0.59411895
34
Check if a room is available without the need to login
public function isAvailableWithoutLogin($start, $end, $area, $room) { $this->validateBookingDuration($start, $end); $schedule = Parser::parseRoom($this->bAuth_user, $this->bAuth_pass, $start, $area, $room); $startTimeslot = $this->dateTime2timeslot($start); $endTimeslot = $this->dateTime2timeslot($end); foreach ($schedule['timeslots'] as $t) { if ($startTimeslot >= $t['start'] && $endTimeslot <= $t['end']) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_available_room($room_number)\n{\n\t//\n\t$room_rs = mysql_query(\"SELECT bed_limit FROM rooms WHERE room_number=\".$room_number);\n\t$occupied_rs = mysql_query(\"SELECT count(*) as total_occupied FROM room_availability WHERE room_number=\".$room_number.\" && status='1'\");\n\t//\n\t$roomdata = mysql_fe...
[ "0.7127772", "0.68477005", "0.6688681", "0.6664702", "0.66568166", "0.6648655", "0.6578771", "0.64277655", "0.64022213", "0.64022213", "0.64022213", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "0.64009225", "...
0.6520754
7
Extract the second of a day from a DateTime object
private function datetime2second($date) { return intval($date->format('G'))*3600+intval($date->format('i'))*60+intval($date->format('s')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stampToSecond($stamp)\n {\n $date = Calendar_Engine_PearDate::stampCollection($stamp);\n return (int)$date->second;\n }", "function get_day()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"mday\"];\n }", "function second()\r\n {\r\n ...
[ "0.58714426", "0.58472395", "0.5830755", "0.54943687", "0.543878", "0.54035527", "0.5393143", "0.53861195", "0.53767323", "0.5329648", "0.5329648", "0.53255045", "0.53186613", "0.52984077", "0.52660316", "0.52089304", "0.5203206", "0.5190748", "0.51672184", "0.5164698", "0.51...
0.6039
0
Extract the timeslot from a DateTime object
private function dateTime2timeslot($date) { return (intval($date->format('G'))*2 + (($date->format('i') == '00') ? 0 : 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_it_gets_timeslot_id_for_day_and_time()\n {\n $manager = new TimeslotManager;\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Monday', '11:00');\n $this->assertEquals($id, 71);\n\n // at the :15\n $id = $manager->timeslotForDayAndTim...
[ "0.61840373", "0.60318327", "0.58017135", "0.55187154", "0.5345493", "0.52424157", "0.5186609", "0.5149187", "0.5148239", "0.5103952", "0.5103952", "0.5103952", "0.5103952", "0.51004434", "0.50926745", "0.49864137", "0.49390215", "0.48922732", "0.48758835", "0.48487732", "0.4...
0.602833
2
Validate a date against the library date range
private function validateDate($date) { $dateHead = new \DateTime(); $dateTail = (new \DateTime('+2 weeks, +1 day'))->modify('midnight'); if ($date < $dateHead || $date >= $dateTail) { throw new Exceptions\InvalidDateException('Date outside acceptable range'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "function ...
[ "0.7795238", "0.73932344", "0.7290823", "0.7254914", "0.720043", "0.7170928", "0.71708786", "0.7164757", "0.7164757", "0.7162809", "0.71460426", "0.7125207", "0.71076894", "0.71010727", "0.7009659", "0.6985997", "0.6983555", "0.69765687", "0.6964718", "0.69596475", "0.6943207...
0.74756885
1
Validate a date against the library duration requirement
private function validateBookingDuration($start, $end) { if ($end <= $start) { throw new Exceptions\InvalidDateException('End date time should be earlier than start date time'); } $start = (clone $start); $start->modify('+2 hours'); if ($end > $start) { throw new Exceptions\InvalidDateException('Booking duration should be shorter or equal to 2 hours'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "function ...
[ "0.7154728", "0.6875203", "0.6721373", "0.66847956", "0.6674081", "0.6624781", "0.6526769", "0.65186054", "0.6502806", "0.64676857", "0.64544886", "0.6439418", "0.64373296", "0.64308965", "0.63939357", "0.63850385", "0.63850385", "0.6381374", "0.6365493", "0.63634145", "0.633...
0.61610126
40
Get input string representation.
public function __toString() { return $this->getFileLocation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInput(): string\n {\n return $this->input;\n }", "public function __invoke(string $input): string\n {\n return $this->convert($input);\n }", "function get_string() {\n\t\t$str = $this->_parse();\n return $str;\n }", "public static function to_string($inp...
[ "0.70021296", "0.69676787", "0.6722575", "0.655327", "0.65436107", "0.6453877", "0.641739", "0.62329847", "0.62162244", "0.618696", "0.61637545", "0.615936", "0.614102", "0.614102", "0.6125356", "0.60969377", "0.6096756", "0.6046348", "0.5989692", "0.59853184", "0.5967923", ...
0.0
-1
Test case to assert the handler definition is created correctly.
public function testGetHandlerDefinition() { $clientName = 'clientName'; /** @var ContainerBuilder|ObjectProphecy $container */ $container = $this->prophesize(ContainerBuilder::class); $middleware = ['test_middleware' => [ ['method' => 'attach'] ]]; $handler = $this->subject->getHandlerDefinition($container->reveal(), $clientName, $middleware); // Test basic stuff $this->assertSame('%guzzle_http.handler_stack.class%', $handler->getClass()); $this->assertSame(['%guzzle_http.handler_stack.class%', 'create'], $handler->getFactory()); $methodCalls = $handler->getMethodCalls(); // Count is the number of the given middleware + the default event and log middleware expressions $this->assertCount(3, $methodCalls); $customMiddlewareCall = array_shift($methodCalls); $this->assertSame('push', array_shift($customMiddlewareCall)); /** @var Expression[] $customMiddlewareExpressions */ $customMiddlewareExpressions = array_shift($customMiddlewareCall); $customMiddlewareExpression = array_shift($customMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $customMiddlewareExpression); $this->assertSame('service("test_middleware").attach()', $customMiddlewareExpression->__toString()); $logMiddlewareCall = array_shift($methodCalls); $this->assertSame('push', array_shift($logMiddlewareCall)); /** @var Expression[] $logMiddlewareExpressions */ $logMiddlewareExpressions = array_shift($logMiddlewareCall); $logMiddlewareExpression = array_shift($logMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $logMiddlewareExpression); $this->assertSame( 'service("guzzle_bundle.middleware.log.clientName").log()', $logMiddlewareExpression->__toString() ); $eventDispatchMiddlewareCall = array_shift($methodCalls); $this->assertSame('unshift', array_shift($eventDispatchMiddlewareCall)); /** @var Expression[] $eventDispatchMiddlewareExpressions */ $eventDispatchMiddlewareExpressions = array_shift($eventDispatchMiddlewareCall); $eventDispatchMiddlewareExpression = array_shift($eventDispatchMiddlewareExpressions); $this->assertInstanceOf(Expression::class, $eventDispatchMiddlewareExpression); $this->assertSame( 'service("guzzle_bundle.middleware.event_dispatch.clientName").dispatch()', $eventDispatchMiddlewareExpression->__toString() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHandler()\n {\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Handler', $this->persistenceHandler );\n $this->assertInstanceOf( 'ezp\\\\Persistence\\\\Storage\\\\InMemory\\\\Handler', $this->persistenceHandler );\n }", "abstract protected function createHandler();", "p...
[ "0.7363805", "0.7117783", "0.6597346", "0.65734994", "0.6528969", "0.64380574", "0.64362454", "0.6432757", "0.6389863", "0.63479275", "0.6234332", "0.6046427", "0.6014533", "0.59803474", "0.59566337", "0.5946654", "0.58228564", "0.5804349", "0.5794723", "0.5774363", "0.571328...
0.70157355
2
Test case to assert the event middleware definition is created correctly.
public function testGetEventMiddlewareDefinition() { $clientName = 'clientName'; $eventMiddleware = $this->subject->getEventMiddlewareDefinition($clientName); $this->assertCount(2, $eventMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.event_dispatch_middleware.class%', $eventMiddleware->getClass()); // Assert the Reference has been set correctly /** @var Reference $reference */ $reference = $eventMiddleware->getArgument(0); $this->assertInstanceOf(Reference::class, $reference); $this->assertSame('event_dispatcher', $reference->__toString()); $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior()); // Assert the client name $this->assertSame($clientName, $eventMiddleware->getArgument(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetHandlerDefinition()\n {\n $clientName = 'clientName';\n\n /** @var ContainerBuilder|ObjectProphecy $container */\n $container = $this->prophesize(ContainerBuilder::class);\n\n $middleware = ['test_middleware' => [\n ['method' => 'attach']\n ]];...
[ "0.6642569", "0.6582048", "0.64233357", "0.62353176", "0.6153294", "0.6129908", "0.5991054", "0.5949481", "0.5934481", "0.5876484", "0.5872267", "0.58649874", "0.58563125", "0.58379316", "0.58311373", "0.5824571", "0.5823644", "0.58207476", "0.5815057", "0.5806604", "0.580454...
0.8089062
0
Test case to assert the log middleware definition is created correctly.
public function testGetLogMiddlewareDefinition() { $client = 'client'; $logMiddleware = $this->subject->getLogMiddlewareDefinition($client); $this->assertCount(3, $logMiddleware->getArguments()); $this->assertSame('%mapudo.guzzle.middleware.log_middleware.class%', $logMiddleware->getClass()); // Assert the references have been set correctly $arguments = ['monolog.logger.guzzle', 'guzzle_bundle.formatter', 'mapudo_bundle_guzzle.serializer']; for ($i = 0; $i < 3; $i++) { /** @var Reference $reference */ $reference = $logMiddleware->getArgument($i); $this->assertInstanceOf(Reference::class, $reference); $this->assertSame($arguments[$i], $reference->__toString()); $this->assertSame(ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $reference->getInvalidBehavior()); } $this->assertCount(1, $logMiddleware->getMethodCalls()); $this->assertTrue($logMiddleware->hasMethodCall('setClientName')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetUpLoggerName()\n\t{\t\n\t\t$this->__Log->setupLogger('log_name',new \\Monolog\\Handler\\TestHandler());\n\t\t$logger = $this->__Log->getLogger('log_name');\n\n\t\t$this->assertInternalType('object',$logger);\n\t}", "public function testGetLogger()\n\t{\t\t\n\t\t$this->__Log->setupLogger('t...
[ "0.64303166", "0.62236476", "0.6179338", "0.6123543", "0.6102211", "0.6064592", "0.60590047", "0.5807065", "0.5782111", "0.57602566", "0.57544774", "0.57536954", "0.5702917", "0.5694712", "0.5658459", "0.56430435", "0.56424373", "0.56367004", "0.5616396", "0.5614831", "0.5600...
0.78026134
0
Module Functions Do Data Input Validate
function do_input_validation($_GPV) { # Initialize array $err_entry = array("flag" => 0); # Check modes and data as required IF ($_GPV['mode'] == 'contact') { # Check required fields (err / action generated later in cade as required) IF (!$_GPV['mc_id']) {$err_entry['flag'] = 1; $err_entry['mc_id'] = 1;} IF (!$_GPV['mc_name']) {$err_entry['flag'] = 1; $err_entry['mc_name'] = 1;} IF (!$_GPV['mc_email']) {$err_entry['flag'] = 1; $err_entry['mc_email'] = 1;} IF (!$_GPV['mc_subj']) {$err_entry['flag'] = 1; $err_entry['mc_subj'] = 1;} IF (!$_GPV['mc_msg']) {$err_entry['flag'] = 1; $err_entry['mc_msg'] = 1;} # Validate Email Address IF (do_validate_email($_GPV['mc_email'], 0)) { $err_entry['flag'] = 1; $err_entry['mc_email'] = 1; $err_entry['err_email_invalid'] = 1; } # Validate the captcha if "GD" is loaded IF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) { IF ($_SESSION['security_code'] != $_GPV['security_code'] || empty($_SESSION['security_code'])) { $err_entry['flag'] = 1; $err_entry['sec_code'] = 1; unset($_SESSION['security_code']); } } } IF ($_GPV['mode'] == 'client') { # Check required fields (err / action generated later in cade as required) IF (!$_GPV['cc_cl_id']) {$err_entry['flag'] = 1; $err_entry['cc_cl_id'] = 1;} IF (!$_GPV['cc_mc_id']) {$err_entry['flag'] = 1; $err_entry['cc_mc_id'] = 1;} IF (!$_GPV['cc_subj']) {$err_entry['flag'] = 1; $err_entry['cc_subj'] = 1;} IF (!$_GPV['cc_msg']) {$err_entry['flag'] = 1; $err_entry['cc_msg'] = 1;} } # Return results return $err_entry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateData();", "abstract public function validateData($data);", "abstract protected function validate($data);", "private function validateInputParameters($data)\n {\n }", "abstract public function validate();", "abstract public function validate();", "public function v...
[ "0.85951304", "0.8008719", "0.78145146", "0.7582598", "0.755227", "0.755227", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.75209594", "0.7485383", "0.74601835", "0....
0.0
-1
Do password reset form
function do_pword_reset_form($adata, $aret_flag=0) { # Dim some Vars: global $_TCFG, $_LANG, $_nl, $_sp; # Some HTML Strings (reduce text) $_td_str_left = '<td class="TP3SML_NR" width="30%">'; $_td_str_right = '<td class="TP3SML_NL" width="70%">'; $_td_str_center_span = '<td class="TP3SML_NC" width="100%" colspan="2">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_LANG['_MAIL']['Password_Reset_Request'].$_sp; IF ($adata['w'] == 'admin') {$_tstr .= $_LANG['_MAIL']['Administrator'];} ELSE {$_tstr .= $_LANG['_MAIL']['Client'];} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="reset">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_center_span.$_nl; $_cstr .= $_LANG['_MAIL']['Password_Reset_Message_01'].$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_User_Name'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="username" size="30" maxlength="20">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="email" size="30" maxlength="100">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="mod" value="'.$adata['mod'].'">'.$_nl; $_cstr .= '<INPUT TYPE=hidden name="mode" value="'.$adata['mode'].'">'.$_nl; $_cstr .= '<INPUT TYPE=hidden name="w" value="'.$adata['w'].'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_subreq', 'SUBMIT', $_LANG['_MAIL']['B_Submit_Request'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '<tr><td align="right">'.$_nl; IF ($adata['w'] == 'admin') { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=user">'.$_TCFG['_IMG_CLIENTS_M'].'</a>'; } ELSE { IF ($_CCFG['_ENABLE_ADMIN_LOGIN_LINK']) {$_cstr .= do_nav_link('mod.php?mod=mail&mode=reset&w=admin', $_TCFG['_IMG_ADMIN_M'],$_TCFG['_IMG_ADMIN_M_MO'],'','');} } $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetPassword();", "public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}", "public function resetPasswordAction()\n\t{\n\n\t\t$data = $this->url->post;\n\t\tif (!isset($_POST['reset']) || !$this->validateReset($data)) {\n\t\t\t$this->session->data['error'] = 'War...
[ "0.8187078", "0.7952258", "0.79394686", "0.7911726", "0.7865717", "0.7854692", "0.7834399", "0.7707769", "0.769779", "0.76875645", "0.76821434", "0.767627", "0.76653284", "0.7664641", "0.76557904", "0.76475036", "0.762017", "0.7620014", "0.7599405", "0.75869447", "0.75789756"...
0.0
-1
Do password reset code
function do_mail_pword_reset($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp; # Prevent email address hacking IF (do_validate_email($adata['email'],0)) {$adata['email'] = '';} # Check username exist IF ($adata['w'] == 'admin' || $adata['w'] == 'user') { $_user_check = do_user_name_exist_check($adata['username'], $adata['w']); } # IF existing, get username email for comparison and compare IF ($adata['w'] == 'admin' || $adata['w'] == 'user') { $_user_email = get_user_name_email($adata['username'], $adata['w']); $_email_check = 1; IF ($_user_email != $adata['email']) {$_email_check = 0;} } # Check return on user / admin exist check IF (!$_user_check || !$_email_check) { # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['PWORD_RESET_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; IF (!$_user_check) { $_cstr .= $_LANG['_MAIL']['PWORD_RESET_MSG_01A'].$_nl; IF (!$_email_check) {$_cstr .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_01B'].$_nl;} } ELSEIF (!$_email_check) { $_cstr .= $_LANG['_MAIL']['PWORD_RESET_MSG_01B'].$_nl; } $_cstr .= '<br><br><a href="mod.php?mod=mail&mode=reset&w='.$adata['w'].'">'.$_TCFG['_IMG_TRY_AGAIN_M'].'</a>'; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '<tr><td align="right">'.$_nl; IF ($adata['w'] == 'admin') { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=user">'.$_TCFG['_IMG_CLIENTS_M'].'</a>'; } ELSE { $_cstr .= '<a href="mod.php?mod=mail&mode=reset&w=admin">'.$_TCFG['_IMG_ADMIN_M'].'</a>'; } $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = $_sp.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; } ELSE { # Generate New Password String and encrypt for db $_nps = do_password_create(); $_nps_encrypt = do_password_crypt($_nps); # Update proper database with new password IF ($adata['w'] == 'admin') { $query = 'UPDATE '.$_DBCFG['admins'].' SET '; $query .= "admin_user_pword='".$db_coin->db_sanitize_data($_nps_encrypt)."' "; $query .= "WHERE admin_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; } IF ($adata['w'] == 'user') { $query = 'UPDATE '.$_DBCFG['clients'].' SET '; $query .= "cl_user_pword='".$db_coin->db_sanitize_data($_nps_encrypt)."' "; $query .= "WHERE cl_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; } $result = $db_coin->db_query_execute($query) OR DIE("Unable to complete request"); $eff_rows = $db_coin->db_query_affected_rows(); # Check update and continue IF (!$eff_rows) { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_02_L2']; } ELSE { # Set eMail Parameters (pre-eval template, some used in template) $mail['recip'] = get_user_name_email($adata['username'], $adata['w']); $mail['from'] = $_CCFG['_PKG_EMAIL_MAIL']; $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['PWORD_RESET_SUBJECT_PRE']; # Grab client record for passing into email template $cl_query = 'SELECT * FROM '.$_DBCFG['clients']." WHERE cl_user_name='".$db_coin->db_sanitize_data($adata['username'])."'"; $cl_result = $db_coin->db_query_execute($cl_query) OR DIE("Unable to complete request"); IF ($db_coin->db_query_numrows($cl_result)) { while ($row = $db_coin->db_fetch_array($cl_result)) { $_MTP['cl_id'] = $row['cl_id']; $_MTP['cl_join_ts'] = $row['cl_join_ts']; $_MTP['cl_status'] = $row['cl_status']; $_MTP['cl_company'] = $row['cl_company']; $_MTP['cl_name_first'] = $row['cl_name_first']; $_MTP['cl_name_last'] = $row['cl_name_last']; $_MTP['cl_addr_01'] = $row['cl_addr_01']; $_MTP['cl_addr_02'] = $row['cl_addr_02']; $_MTP['cl_city'] = $row['cl_city']; $_MTP['cl_state_prov'] = $row['cl_state_prov']; $_MTP['cl_country'] = $row['cl_country']; $_MTP['cl_zip_code'] = $row['cl_zip_code']; $_MTP['cl_phone'] = $row['cl_phone']; $_MTP['cl_email'] = $row['cl_email']; $_MTP['cl_user_name'] = $row['cl_user_name']; $_MTP['cl_notes'] = $row['cl_notes']; $_MTP['cl_groups'] = $row['cl_groups']; } } # Set MTP (Mail Template Parameters) array $_MTP['from_email'] = $mail['from']; $_MTP['username'] = $adata['username']; $_MTP['password'] = $_nps; $_MTP['url'] = BASE_HREF.'login.php?w='.$adata['w'].'&o=login'; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] .= get_mail_template('email_password_reset', $_MTP); # Call basic email function $_ret = do_mail_basic($mail); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_03_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['PWORD_RESET_MSG_03_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['PWORD_RESET_MSG_04_L1']; $_ret_msg .= $_sp.$_LANG['_MAIL']['PWORD_RESET_MSG_04_L2']; } } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['PWORD_RESET_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; } IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetPassword();", "public function passwordResetCode();", "public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t...
[ "0.84414405", "0.7949071", "0.7900377", "0.77701616", "0.77635145", "0.76568156", "0.759164", "0.7580834", "0.7545878", "0.75082934", "0.75043005", "0.7495391", "0.7448844", "0.7436823", "0.741978", "0.74154645", "0.7386459", "0.7380992", "0.7378053", "0.7336263", "0.7312046"...
0.0
-1
Do contact form (contact user to site)
function do_contact_form($adata, $aerr_entry, $aret_flag=0) { # Get security vars $_SEC = get_security_flags(); $_PERMS = do_decode_perms_admin($_SEC['_sadmin_perms']); # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Check for admin / user and get email address accordingly IF ($_SEC['_sadmin_flg'] && $_SEC['_sadmin_name'] && !$adata['mc_email']) { $adata['mc_email'] = get_user_name_email($_SEC['_sadmin_name'], 'admin'); } IF ($_SEC['_suser_flg'] && $_SEC['_suser_name'] && !$adata['mc_email']) { $adata['mc_email'] = get_user_name_email($_SEC['_suser_name'], 'user'); } # Some HTML Strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">'; $_td_str_left = '<td class="TP1SML_NR" width="30%">'; $_td_str_right = '<td class="TP1SML_NL" width="70%">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')'; # Add "Edit" button for editing contact info parameters if admin and has permission IF ($_SEC['_sadmin_flg'] && $_CCFG['ENABLE_QUICK_EDIT'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP15'] == 1)) { $_tstr .= ' <a href="admin.php?cp=parms&fpg=user">'.$_TCFG['_S_IMG_PM_S'].'</a>'; } # Do data entry error string check and build IF ($aerr_entry['flag']) { $err_str = $_LANG['_MAIL']['CS_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CS_FORM_ERR_HDR2'].'<br>'.$_nl; IF ($aerr_entry['mc_id']) {$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;} IF ($aerr_entry['mc_name']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR02']; $err_prv = 1;} IF ($aerr_entry['mc_email']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR03']; $err_prv = 1;} IF ($aerr_entry['mc_subj']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR04']; $err_prv = 1;} IF ($aerr_entry['mc_msg']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR05']; $err_prv = 1;} IF ($aerr_entry['sec_code']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR06']; $err_prv = 1;} $_cstr .= '<p align="center"><b>'.$err_str.'</b>'.$_nl; } # Check Stage for extra data validation IF ($adata['stage'] == 1) { # Email IF ($aerr_entry['err_email_invalid']) {$_err_more .= '<br>'.$_LANG['_MAIL']['CS_FORM_ERR_MSG_01'].$_nl;} # Print out more errors IF ($_err_more) {$_cstr .= '<b>'.$_err_more.'</b>'.$_nl;} } # Formatting tweak for spacing IF ($aerr_entry['flag'] || $_err_more) {$_cstr .= '<br><br>'.$_nl;} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; # Display othr contact info, if enabled IF ($_UVAR['DISPLAY_ON_CONTACT_FORM']) { $_cstr .= '<tr><td>'.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['CC_FORM_TITLE_MAIL'].'</b><br>'; IF ($_UVAR['CO_INFO_01_NAME']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_01_NAME'].'<br>';} IF ($_UVAR['CO_INFO_12_TAGLINE']) {$_cstr .= $_sp.$_sp.$_sp.'<i>"'.$_UVAR['CO_INFO_12_TAGLINE'].'"</i><br>';} IF ($_UVAR['CO_INFO_02_ADDR_01']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_02_ADDR_01'].'<br>';} IF ($_UVAR['CO_INFO_03_ADDR_02']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_03_ADDR_02'].'<br>';} IF ($_UVAR['CO_INFO_04_CITY']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_04_CITY'].', ';} IF ($_UVAR['CO_INFO_05_STATE_PROV']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_05_STATE_PROV'].', ';} IF ($_UVAR['CO_INFO_06_POSTAL_CODE']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_06_POSTAL_CODE'].'<br>';} IF ($_UVAR['CO_INFO_07_COUNTRY']) {$_cstr .= $_sp.$_sp.$_sp.$_UVAR['CO_INFO_07_COUNTRY'].'<br>';} IF ($_UVAR['CO_INFO_08_PHONE'] || $_UVAR['CO_INFO_09_FAX'] || $_UVAR['CO_INFO_11_TOLL_FREE'] || $_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) { $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_TELECOM'].'</b><br>'; IF ($_UVAR['CO_INFO_08_PHONE']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_PHONE'].' '.$_UVAR['CO_INFO_08_PHONE'].'<br>';} IF ($_UVAR['CO_INFO_09_FAX']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_FAX'].' '.$_UVAR['CO_INFO_09_FAX'].'<br>';} IF ($_UVAR['CO_INFO_11_TOLL_FREE']) {$_cstr .= $_sp.$_sp.$_sp.$_LANG['_BASE']['LABEL_TOLL_FREE'].' '.$_UVAR['CO_INFO_11_TOLL_FREE'].'<br>';} IF ($_LANG['_MAIL']['CC_FORM_DATA_TELECOM']) {$_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_TELECOM'].'</b><br>';} } IF ($_LANG['_MAIL']['CC_FORM_DATA_OTHER']) { $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_OTHER'].'</b><br>'; $_cstr .= '&nbsp;&nbsp;&nbsp;'.$_LANG['_MAIL']['CC_FORM_DATA_OTHER'].'</b><br>'; } $_cstr .= '<br><b>'.$_LANG['_MAIL']['CC_FORM_TITLE_EMAIL'].'</b><br>'; $_cstr .= '<br></td></tr>'; } $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="mod.php" method="post" name="contact">'.$_nl; $_cstr .= '<input type="hidden" name="mod" value="mail">'.$_nl; $_cstr .= '<input type="hidden" name="mode" value="contact">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5" border="0">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_mail_contacts('mc_id', $adata['mc_id'], 1); $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Name'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_name" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_name']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Email'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_email" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_email']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="mc_subj" size="30" maxlength="50" value="'.htmlspecialchars($adata['mc_subj']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; IF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;} $_cstr .= '<TEXTAREA class="PSML_NL" NAME="mc_msg" COLS="'.$_cols.'" ROWS="15">'.$adata['mc_msg'].'</TEXTAREA>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; # Captcha if "GD" is loaded IF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) { $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= $_LANG['_MAIL']['SC_Instruct'].$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_sp.'</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<img src="'.PKG_URL_ADDONS.'captcha/CaptchaSecurityImages.php">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Security_Code'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<input class="PSML_NL" id="security_code" name="security_code" type="text" value="'.htmlspecialchars($adata['security_code']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; } $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="stage" value="1">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'adminis...
[ "0.7913285", "0.7628652", "0.7603733", "0.7561216", "0.75425154", "0.7540005", "0.7540005", "0.75137484", "0.7476789", "0.7476789", "0.7476789", "0.7469458", "0.7455899", "0.74338263", "0.74313974", "0.7334288", "0.7328069", "0.731379", "0.73045486", "0.7294656", "0.72929823"...
0.0
-1
Do process contact usertosite email form (build, set email))
function do_contact_email($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Get contact information array $_cinfo = get_contact_info($adata['mc_id']); # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $_cinfo['c_email']; $mail['from'] = $adata['mc_email']; IF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc'] = $adata['mc_email'];} } ELSE { $mail['recip'] = $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>'; $mail['from'] = $adata['mc_name'].' <'.$adata['mc_email'].'>'; IF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc'] = $adata['mc_name'].' <'.$adata['mc_email'].'>';} } $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].'- Contact Message'; # Grab ip_address of sender IF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') { $pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.'); IF ($pos === FALSE) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } ELSE { $ip = $_SERVER["REMOTE_ADDR"]; } } ELSE { $ip = $_SERVER["REMOTE_ADDR"]; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $_cinfo['c_name']; $_MTP['to_email'] = $_cinfo['c_email']; $_MTP['from_name'] = $adata['mc_name']; $_MTP['from_email'] = $adata['mc_email']; $_MTP['subject'] = $adata['mc_subj']; $_MTP['message'] = $adata['mc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; $_MTP['sender_ip'] = $ip; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_form', $_MTP); # Call basic email function (ret=0 on error) $_ret = do_mail_basic($mail); # Set flood control values in session $sdata['set_last_contact'] = 1; $_sret = do_session_update($sdata); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1']; $_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2']; } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress...
[ "0.67817247", "0.66562563", "0.6645356", "0.65767425", "0.65657663", "0.65543866", "0.6529547", "0.65131605", "0.6491126", "0.6484746", "0.64667165", "0.6447171", "0.63753474", "0.63661283", "0.6356958", "0.6346089", "0.6338134", "0.6310158", "0.6292566", "0.6273778", "0.6264...
0.65685135
4
Do contact client form (contact site to user / client)
function do_contact_client_form($adata, $aerr_entry, $aret_flag=0) { # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Some HTML Strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">'; $_td_str_left = '<td class="TP1SML_NR" width="30%">'; $_td_str_right = '<td class="TP1SML_NL" width="70%">'; # Build Title String, Content String, and Footer Menu String $_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Client_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')'; # Do data entry error string check and build IF ($aerr_entry['flag']) { $err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl; IF ($aerr_entry['cc_cl_id']) {$err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR01']; $err_prv = 1;} IF ($aerr_entry['cc_mc_id']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;} IF ($aerr_entry['cc_subj']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;} IF ($aerr_entry['cc_msg']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;} $_cstr .= '<p align="center"><b>'.$err_str.'</b>'.$_nl; } # Formatting tweak for spacing IF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;} $_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr><td align="center">'.$_nl; $_cstr .= '<form action="mod.php" method="post" name="client">'.$_nl; $_cstr .= '<input type="hidden" name="mod" value="mail">'.$_nl; $_cstr .= '<input type="hidden" name="mode" value="client">'.$_nl; $_cstr .= '<table width="100%" cellspacing="0" cellpadding="5">'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Client'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_clients('cc_cl_id', $adata['cc_cl_id'], '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']); $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="cc_subj" size="30" maxlength="50" value="'.htmlspecialchars($adata['cc_subj']).'">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left_vtop.$_nl; $_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; IF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 120;} ELSE {$_cols = 80;} $_cstr .= '<TEXTAREA class="PSML_NL" NAME="cc_msg" COLS="'.$_cols.'" ROWS="15">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr>'.$_nl; $_cstr .= $_td_str_left.$_nl; $_cstr .= '<INPUT TYPE=hidden name="stage" value="1">'.$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= $_td_str_right.$_nl; $_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl; $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</form>'.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_mstr_flag = 0; $_mstr = ''.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; # Return / Echo Final Output IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'adminis...
[ "0.7231499", "0.6915428", "0.6887112", "0.6880932", "0.68679565", "0.68593895", "0.6858419", "0.6858419", "0.68452793", "0.678134", "0.67791045", "0.67791045", "0.67791045", "0.67271966", "0.6659383", "0.6655557", "0.6652063", "0.66413724", "0.6608247", "0.66058564", "0.66003...
0.63813424
52
Do process contact sitetouser email form (build, set email))
function do_contact_client_email($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Check if we are sending to an additional email instead of the clients regular address $pos = strpos(strtolower($adata['cc_cl_id']), "alias"); if ($pos !== false) { $pieces = explode('|', $adata['cc_cl_id']); $_ccinfot = get_contact_client_info_alias($pieces[1], 0); $_ccinfo = $_ccinfot[1]; } ELSE { # Get client contact information array $_ccinfo = get_contact_client_info($adata['cc_cl_id']); } # Get site contact information array $_mcinfo = get_contact_info($adata['cc_mc_id']); # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $_ccinfo['cl_email']; $mail['from'] = $_mcinfo['c_email']; $mail['cc'] = $_mcinfo['c_email']; } ELSE { $mail['recip'] = $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>'; $mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; $mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; } IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) { $mail['subject'] = $adata['cc_subj']; } ELSE { $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE']; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last']; $_MTP['to_email'] = $_ccinfo['cl_email']; $_MTP['from_name'] = $_mcinfo['c_name']; $_MTP['from_email'] = $_mcinfo['c_email']; $_MTP['subject'] = $adata['cc_subj']; $_MTP['message'] = $adata['cc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_client_form', $_MTP); # Call basic email function (ret=0 on error) $_ret = do_mail_basic($mail); # Check return IF ($_ret) { $_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1']; $_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2']; } ELSE { $_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1']; } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5" width="100%">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NC">'.$_nl; $_cstr .= $_ret_msg.$_nl; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress...
[ "0.68467176", "0.6746878", "0.67410505", "0.67211545", "0.6637733", "0.66300243", "0.66292745", "0.6598976", "0.65755606", "0.6538023", "0.65358245", "0.65088737", "0.6501753", "0.64902717", "0.6483133", "0.6467015", "0.64192826", "0.6412084", "0.6399187", "0.63321686", "0.62...
0.6306568
20
Do process contact sitetoallusers email form (build, set email))
function do_contact_client_email_all($adata, $aret_flag=0) { # Dim Some Vars global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; $DesiredGroup = 0; $DesiredServer = 0; $DesiredAlias = 0; $DesiredClient = 0; $_ret_msg = ''; # Check if we are sending to a group instead of all clients $pos = strpos(strtolower($adata['cc_cl_id']), 'group'); IF ($pos !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredGroup = $pieces[1]; } # Check if we are sending to a server instead of all clients $pos2 = strpos(strtolower($adata['cc_cl_id']), 'server'); IF ($pos2 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredServer = $pieces[1]; } # Check if we are sending to an alias for a client $pos3 = strpos(strtolower($adata['cc_cl_id']), 'alias'); IF ($pos3 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredAlias = $pieces[1]; } # Check if we are sending to all contacts for a client $pos3 = strpos(strtolower($adata['cc_cl_id']), 'contacts'); IF ($pos3 !== false) { $pieces = explode('|', $adata['cc_cl_id']); $DesiredClient = $pieces[1]; } # Get site contact information array $_mcinfo = get_contact_info($adata['cc_mc_id']); # Set Query for select $query = 'SELECT '; IF ($DesiredAlias) { $query .= $_DBCFG['clients_contacts'].'.contacts_email, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_first, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_last'; } ELSEIF ($DesiredClient) { $query .= $_DBCFG['clients'].'.cl_email, '; $query .= $_DBCFG['clients'].'.cl_name_first, '; $query .= $_DBCFG['clients'].'.cl_name_last, '; $query .= $_DBCFG['clients_contacts'].'.contacts_email, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_first, '; $query .= $_DBCFG['clients_contacts'].'.contacts_name_last'; } ELSE { $query .= $_DBCFG['clients'].'.cl_email, '; $query .= $_DBCFG['clients'].'.cl_name_first, '; $query .= $_DBCFG['clients'].'.cl_name_last'; } IF ($DesiredGroup) {$query .= ', '.$_DBCFG['clients'].'.cl_groups';} $query .= ' FROM '; IF ($DesiredServer) { $query .= $_DBCFG['clients'].', '.$_DBCFG['domains']; $query .= ' WHERE (('.$_DBCFG['domains'].'.dom_si_id='.$DesiredServer.' AND '; $query .= $_DBCFG['domains'].'.dom_cl_id='.$_DBCFG['clients'].'.cl_id)'; } ELSEIF ($DesiredGroup) { $query .= $_DBCFG['clients']; $query .= ' WHERE (('.$_DBCFG['clients'].'.cl_groups <> 0)'; } ELSEIF ($DesiredAlias) { $query .= $_DBCFG['clients_contacts']; $query .= ' WHERE ('.$_DBCFG['clients_contacts'].'.contacts_id='.$DesiredAlias.')'; } ELSEIF ($DesiredClient) { $query .= $_DBCFG['clients'].', '.$_DBCFG['clients_contacts']; $query .= ' WHERE ('; $query .= $_DBCFG['clients'].'.cl_id='.$DesiredClient.' OR ('; $query .= $_DBCFG['clients'].'.cl_id='.$_DBCFG['clients_contacts'].'.contacts_cl_id AND '; $query .= $_DBCFG['clients_contacts'].'.contacts_cl_id='.$DesiredClient.')'; $query .= ')'; } ELSEIF ($adata['cc_cl_id'] == '-1') { $query .= $_DBCFG['clients']; $query .= " WHERE cl_status='active' OR cl_status='".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1])."'"; } ELSE { $query .= $_DBCFG['clients']; $query .= ' WHERE ('.$_DBCFG['clients'].'.cl_id='.$adata['cc_cl_id'].')'; } IF ($DesiredServer || $DesiredGroup) { $query .= ' AND ('.$_DBCFG['clients'].".cl_status='active'"; $query .= ' OR '.$_DBCFG['clients'].".cl_status='".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1])."'))"; } # Do select $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); $_emails_sent = 0; $_emails_error = 0; $_sento = ''; # Process query results while($row = $db_coin->db_fetch_array($result)) { # ONLY clients in specified group, OR All clients if group not specified IF (!$DesiredGroup || ($DesiredGroup && Check_User_Group($DesiredGroup, $row['cl_groups']))) { # Loop all clients and send email # Set eMail Parameters (pre-eval template, some used in template) IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) { $mail['recip'] = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $mail['from'] = $_mcinfo['c_email']; } ELSE { $mail['recip'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first']; $mail['recip'] .= ' '; $mail['recip'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last']; $mail['recip'] .= ' <'; $mail['recip'] .= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $mail['recip'] .= '>'; $mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; } # $mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>'; IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) { $mail['subject'] = $adata['cc_subj']; } ELSE { $mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE']; } # Set MTP (Mail Template Parameters) array $_MTP['to_name'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first']; $_MTP['to_name'] .= ' '; $_MTP['to_name'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last']; $_MTP['to_email'] = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email']; $_MTP['from_name'] = $_mcinfo['c_name']; $_MTP['from_email'] = $_mcinfo['c_email']; $_MTP['subject'] = $adata['cc_subj']; $_MTP['message'] = $adata['cc_msg']; $_MTP['site'] = $_CCFG['_PKG_NAME_SHORT']; # Load message template (processed) $mail['message'] = get_mail_template('email_contact_client_form', $_MTP); # Call basic email function (ret=1 on error) $_ret = do_mail_basic($mail); # Show what was sent $_sento .= htmlspecialchars($mail['recip']).'<br>'; # Check return IF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;} } } # Build Title String, Content String, and Footer Menu String $_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE']; $_cstr .= '<center>'.$_nl; $_cstr .= '<table cellpadding="5">'.$_nl; $_cstr .= '<tr><td class="TP5MED_NL">'.$_nl; IF ($_emails_error) { $_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1']; $_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2']; } ELSE { $_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1']; } $_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent']; $_cstr .= '<br><br>'.$_sento; $_cstr .= '</td></tr>'.$_nl; $_cstr .= '</table>'.$_nl; $_cstr .= '</center>'.$_nl; $_mstr_flag = 0; $_mstr = '&nbsp;'.$_nl; # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1'); $_out .= '<br>'.$_nl; IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->get...
[ "0.69378394", "0.670086", "0.66805977", "0.66643006", "0.66538966", "0.66504693", "0.6602885", "0.657801", "0.6570051", "0.6568018", "0.6558926", "0.64695555", "0.64667624", "0.64493483", "0.6447231", "0.6445809", "0.6435317", "0.64276826", "0.6374332", "0.63678825", "0.63383...
0.5944248
63
Do display entry (individual entry)
function do_display_entry_mail_archive($adata, $aret_flag=0) { # Get security vars $_SEC = get_security_flags(); $_PERMS = do_decode_perms_admin($_SEC['_sadmin_perms']); # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; # Build common td start tag / strings (reduce text) $_td_str_left_vtop = '<td class="TP1SML_NR" width="25%" valign="top">'; $_td_str_colsp2 = '<td class="TP1SML_NJ" width="25%" colspan="2">'; $_td_str_left = '<td class="TP1SML_NR" width="25%">'; $_td_str_right = '<td class="TP1SML_NL" width="75%">'; # Build query and execute $query = 'SELECT *'; $query .= ' FROM '.$_DBCFG['mail_archive']; $query .= ' WHERE '.$_DBCFG['mail_archive'].'.ma_id='.$adata['ma_id']; $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); # Process results IF ($numrows) { while ($row = $db_coin->db_fetch_array($result)) { IF ($_SEC['_suser_id']) { # Dim some vars $good = 0; # Is it the client main address $clinfo = get_contact_client_info($_SEC['_suser_id']); $pos = strpos(strtolower($row['ma_fld_from']), strtolower($clinfo['cl_email'])); IF ($pos !== false) {$good++;} $pos1 = strpos(strtolower($row['ma_fld_recip']), strtolower($clinfo['cl_email'])); IF ($pos1 !== false) {$good++;} # Check all additional email addresses for a client IF (!$good) { $cl_emails = get_contact_client_info_alias($_SEC['_suser_id'],1); $x = sizeof($cl_emails); IF ($x) { FOR ($i=1; $i<=$x; $i++) { $pos = strpos(strtolower($row['ma_fld_from']), strtolower($cl_emails[$x]['cl_email'])); IF ($pos !== false) {$good++; break;} $pos1 = strpos(strtolower($row['ma_fld_recip']), strtolower($cl_emails[$x]['cl_email'])); IF ($pos1 !== false) {$good++; break;} } } } } IF ($_SEC['_sadmin_flg'] || $good) { # Build Title String, Content String, and Footer Menu String $_tstr = '<table width="100%">'.$_nl; $_tstr .= '<tr class="BLK_IT_TITLE_TXT" valign="bottom">'.$_nl; $_tstr .= '<td class="TP3MED_BL">'.$_LANG['_MAIL']['l_View_Message'].$_sp.htmlspecialchars($row['ma_fld_recip'], ENT_QUOTES); IF ($_SEC['_sadmin_flg'] && $adata['_suser_id']) { $_tstr .= ' <a href="mod.php?mod=clients&mode=view&cl_id='.$adata['_suser_id'].'">'.$_TCFG['_IMG_BACK_TO_CLIENT_M'].'</a>'.$_nl; } $_tstr .= '</td>'.$_nl; $_tstr .= '</tr>'.$_nl; $_tstr .= '</table>'.$_nl; $_cstr = '<table width="100%">'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_To'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_recip'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_CC'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_cc'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_BCC'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_bcc'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_from'], ENT_QUOTES).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left.'<b>'.$_LANG['_MAIL']['l_Date_Sent'].$_sp.'</b></td>'.$_nl; $_cstr .= $_td_str_right.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DTTM']).'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_left_vtop.'<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'('.$_LANG['_MAIL']['output_below'].')</b></td>'.$_nl; $_cstr .= $_td_str_right.$_sp.'</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_colsp2.'<hr></td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '<tr valign="bottom">'.$_nl; $_cstr .= $_td_str_colsp2; IF ($_CCFG['EMAIL_AS_HTML'] || $_CCFG['INCOMING_EMAIL_AS_HTML']) { $_cstr .= nl2br(htmlspecialchars($row['ma_fld_message'])); } ELSE { $_cstr .= '<pre>'.$row['ma_fld_message'].'</pre>'; } $_cstr .= '</td>'.$_nl; $_cstr .= '</tr>'.$_nl; $_cstr .= '</table>'.$_nl; IF ($_CCFG['_IS_PRINT'] != 1) { IF ($_SEC['_sadmin_flg']) {$_mstr .= do_nav_link('admin.php', $_TCFG['_IMG_ADMIN_M'],$_TCFG['_IMG_ADMIN_M_MO'],'','');} $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=resend&obj=arch&ma_id='.$adata['ma_id'], $_TCFG['_IMG_EMAIL_M'],$_TCFG['_IMG_EMAIL_M_MO'],'',''); IF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) { $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=delete&obj=arch&ma_id='.$adata['ma_id'], $_TCFG['_IMG_DELETE_M'],$_TCFG['_IMG_DELETE_M_MO'],'',''); } $_mstr .= do_nav_link($_SERVER["PHP_SELF"].'?mod=mail&mode=search', $_TCFG['_IMG_SEARCH_M'],$_TCFG['_IMG_SEARCH_M_MO'],'',''); } ELSE { $_mstr = ''; } } # Call block it function $_out .= do_mod_block_it($_tstr, $_cstr, '1', $_mstr, '1'); $_out .= '<br>'.$_nl; } } # Return results IF ($aret_flag) {return $_out;} ELSE {echo $_out;} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function au_show_entry(){\n\n\t// Praise the big $aulis\n\tglobal $aulis;\n\n\t// We can't access this file, if not from index.php, so let's check\n\tif(!defined('aulis'))\n\t\theader(\"Location: index.php\");\n\n\t// We need to decrypt the blog id, if numeric\n\tif(isset($_GET['id']) and is_numeric($_GET['id']))\...
[ "0.6807589", "0.65280634", "0.64583385", "0.6408828", "0.63529813", "0.63488954", "0.63488954", "0.6292548", "0.6266693", "0.62213016", "0.62111014", "0.6183628", "0.6152457", "0.61468", "0.61468", "0.6132599", "0.6126015", "0.6126015", "0.61255753", "0.61255753", "0.60786134...
0.0
-1
Do select list for: Suppliers Additional Emails
function do_select_list_suppliers_additional_emails($avalue, $aname) { # Dim some Vars: global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp; $_out = ''; # Set Query for select. $query = 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '.$_DBCFG['suppliers_contacts']; IF ($avalue) {$query .= ' WHERE contacts_s_id='.$avalue;} $query .= ' ORDER BY contacts_name_last ASC, contacts_name_first ASC'; # Do select $result = $db_coin->db_query_execute($query); $numrows = $db_coin->db_query_numrows($result); IF ($numrows) { # Process query results to list individual clients while(list($contacts_id, $contacts_cl_id, $contacts_name_first, $contacts_name_last, $contacts_email) = $db_coin->db_fetch_row($result)) { $i++; $_out .= '<option value="'.'alias|'.$contacts_id.'">'; $_out .= $_sp.$_sp.$_sp.$aname.' - '.$contacts_name_last.', '.$contacts_name_first.' ('.$_LANG['_BASE']['Email_Additional'].')</option>'.$_nl; } return $_out; } ELSE { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_select_list_suppliers($aname, $avalue) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Set Query for select.\n\t\t$query\t = 'SELECT s_id, s_company, s_name_first, s_name_last FROM '.$_DBCFG['suppliers'];\n\t\t$query\t.= \" WHERE s_email...
[ "0.72284275", "0.6165431", "0.6056979", "0.59823215", "0.5956728", "0.59533775", "0.58541936", "0.57612777", "0.5747015", "0.5694604", "0.56943625", "0.56774485", "0.56399715", "0.5569345", "0.5537811", "0.552397", "0.5484817", "0.54840535", "0.5479395", "0.5476864", "0.54493...
0.77125174
0