コード例 #1
0
ファイル: patch.php プロジェクト: gamort/bottomline
/**
 * Patches array by xpath.
 *
 * Arguments:
 * (Array): The array to patch.
 * (Array): List of new xpath-value pairs.
 *
 * Returns:
 * (Array): Returns patched array.
 *
 * @arrays @patch
 *
 ** __::patch(['addr' => ['country' => 'US', 'zip' => 12345]], ['/addr/country' => 'CA', '/addr/zip' => 54321]);
 ** // → ['addr' => ['country' => 'CA', 'zip' => 54321]]
 */
function patch($arr, $patches, $parent = '')
{
    foreach ($arr as $key => $value) {
        $z = $parent . '/' . $key;
        if (isset($patches[$z])) {
            $arr[$key] = $patches[$z];
            unset($patches[$z]);
            if (!count($patches)) {
                break;
            }
        }
        if (is_array($value)) {
            $arr[$key] = patch($value, $patches, $z);
        }
    }
    return $arr;
}
コード例 #2
0
            return $a["Name"] == $iItem["conference_track"];
        })->singleOrDefault();
        $conferenceDay = $dbConferenceDays->where(function ($a) use($iItem) {
            return $a["Name"] == $iItem["conference_day_name"];
        })->singleOrDefault();
        $conferenceRoom = $dbConferenceRooms->where(function ($a) use($iItem) {
            return $a["Name"] == $iItem["conference_room"];
        })->singleOrDefault();
        $iItem["conference_track_id"] = isset($conferenceTrack) ? $conferenceTrack["Id"] : "";
        $iItem["conference_day_id"] = isset($conferenceDay) ? $conferenceDay["Id"] : "";
        $iItem["conference_room_id"] = isset($conferenceRoom) ? $conferenceRoom["Id"] : "";
        $parts = explode("–", $iItem["title"]);
        $iItem["title"] = $parts[0];
        $iItem["subtitle"] = sizeof($parts) == 2 ? trim($parts[1]) : "";
        $iItem["is_deviating_from_conbook"] = 0;
        $patchedItem = patch($iItem, $dbItem, array("event_id" => "SourceEventId", "slug" => "Slug", "conference_track_id" => "ConferenceTrackId", "conference_day_id" => "ConferenceDayId", "conference_room_id" => "ConferenceRoomId", "title" => "Title", "subtitle" => "SubTitle", "abstract" => "Abstract", "description" => "Description", "start_time" => "StartTime", "end_time" => "EndTime", "duration" => "Duration", "pannel_hosts" => "PanelHosts", "is_deviating_from_conbook" => "IsDeviatingFromConBook"));
        if ($patchedItem) {
            if (!$dbItem) {
                $database->insert("EventEntry", $patchedItem);
            } else {
                $database->update("EventEntry", $patchedItem, "Id=%s", $dbItem["Id"]);
            }
        }
    });
    Log::info("Commiting changes to database");
    $database->commit();
} catch (Exception $e) {
    var_dump($e->getMessage());
    Log::error("Rolling back changes to database");
    $database->rollback();
}
コード例 #3
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return Redirect::to('/api-docs');
});
Route::group(['prefix' => 'api'], function () {
    post('register', 'TokenAuthController@register');
    post('authenticate', 'TokenAuthController@authenticate');
    get('authenticate/user', 'TokenAuthController@getAuthenticatedUser');
    Route::group(['middleware' => 'jwt.auth'], function () {
        post('logout', 'TokenAuthController@logout');
        resource('appointment_requests', 'AppointmentRequestController', ['except' => ['create', 'edit']]);
        patch('appointment_requests/{id}/confirm', 'AppointmentRequestController@confirm');
        patch('appointment_requests/{id}/cancel', 'AppointmentRequestController@cancel');
    });
});
コード例 #4
0
ファイル: routes.php プロジェクト: jesusave/laracarte
// OAuth Authentication Routes...
get('auth/github', 'Auth\\AuthController@redirectToProvider');
get('auth/github/callback', 'Auth\\AuthController@handleProviderCallback');
// Static Pages Routes...
get('/', ['as' => 'root_path', 'uses' => 'PagesController@home']);
get('about', ['as' => 'about_path', 'uses' => 'PagesController@about']);
get('contact', ['as' => 'contact_path', 'uses' => 'PagesController@contact']);
post('contact', ['as' => 'contact_path', 'uses' => 'PagesController@postContact']);
// User routes...
get('artisans', ['as' => 'artisans_path', 'uses' => 'UsersController@index']);
get('@{username}', ['as' => 'profile_path', 'uses' => 'UsersController@profile']);
Route::group(['prefix' => 'account', 'middleware' => 'auth'], function () {
    get('/', ['as' => 'account_path', 'uses' => 'UsersController@account']);
    get('/edit', ['as' => 'edit_account_path', 'uses' => 'UsersController@edit_account']);
    patch('/', ['as' => 'account_path', 'uses' => 'UsersController@update_account']);
    get('/set_password', ['as' => 'new_password_path', 'uses' => 'UsersController@new_password']);
    patch('/set_password', ['as' => 'new_password_path', 'uses' => 'UsersController@update_password']);
});
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', ['as' => 'register_path', 'uses' => 'Auth\\AuthController@getRegister']);
Route::post('auth/register', 'Auth\\AuthController@postRegister');
// Password reset link request routes...
Route::get('password/email', 'Auth\\PasswordController@getEmail');
Route::post('password/email', 'Auth\\PasswordController@postEmail');
// Password reset routes...
Route::get('password/reset/{token}', 'Auth\\PasswordController@getReset');
Route::post('password/reset', 'Auth\\PasswordController@postReset');
コード例 #5
0
ファイル: routes.php プロジェクト: codeboard/gitmanagement
post('register', ['as' => 'registrations.store', 'uses' => 'RegistrationsController@store']);
Route::group(['prefix' => 'admin', 'before' => 'auth'], function () {
    # Static Pages
    get('dashboard', ['as' => 'dashboard', 'uses' => 'PagesController@dashboard']);
    get('help', ['as' => 'help', 'uses' => 'PagesController@help']);
    # Domain Section
    get('domains', ['as' => 'admin.domains.index', 'uses' => 'DomainsController@index']);
    get('domains/create', ['as' => 'admin.domains.create', 'uses' => 'DomainsController@create']);
    post('domains', ['as' => 'admin.domains.store', 'uses' => 'DomainsController@store']);
    get('domains/{domain}', ['as' => 'admin.domains.show', 'uses' => 'DomainsController@show']);
    get('domains/{domain}/edit', ['as' => 'admin.domains.edit', 'uses' => 'DomainsController@edit']);
    put('domains/{domain}', ['as' => 'admin.domains.update', 'uses' => 'DomainsController@update']);
    patch('domains/{domain}', 'DomainsController@update');
    get('domains/{id}/delete', ['as' => 'admin.domains.destroy', 'uses' => 'DomainsController@destroy']);
    get('domains/{id}/token', ['as' => 'admin.domains.new_token', 'uses' => 'DomainsController@generateToken']);
    get('domains/{id}/nginx', ['as' => 'admin.domains.nginx', 'uses' => 'DomainsController@showNginx']);
    patch('domains/{id}/nginx', ['as' => 'admin.domains.nginx.update', 'uses' => 'DomainsController@updateNginx']);
    # App/Repository Section
    post('domains/{id}/app', ['as' => 'admin.app.store', 'uses' => 'AppsController@store']);
    patch('app/{id}', ['as' => 'admin.app.update', 'uses' => 'AppsController@update']);
    delete('app/{id}', ['as' => 'admin.app.destroy', 'uses' => 'AppsController@destroy']);
    # Environment Section
    post('domains/{id}/environment', ['as' => 'admin.environment.store', 'uses' => 'EnvironmentsController@store']);
    get('environment/{id}', ['as' => 'admin.environment.destroy', 'uses' => 'EnvironmentsController@destroy']);
    # Workers Section
    post('domains/{id}/worker', ['as' => 'admin.workers.store', 'uses' => 'WorkersController@store']);
    get('worker/{id}', ['as' => 'admin.workers.destroy', 'uses' => 'WorkersController@destroy']);
    # Settings Section
    get('settings', ['as' => 'settings', 'uses' => 'ConfigurationsController@create']);
    post('settings', ['as' => 'settings.save', 'uses' => 'ConfigurationsController@store']);
});
コード例 #6
0
        return false;
    }
    if (!$fnamePatch || !file_exists($fnamePatch)) {
        return false;
    }
    $cont_patch = file_get_contents($fnamePatch);
    if (preg_match('/^<[?](?:php|)/', $cont_patch, $arr) && is_array($arr)) {
        $cont_patch = substr($cont_patch, strlen($arr[0]));
    }
    $cont_obj = substr($cont_obj, 0, $k) . $cont_patch . substr($cont_obj, $k);
    file_put_contents($fnameObj, $cont_obj);
    return 1;
}
$fname = 'AdminImport.php';
if (isset($_REQUEST['filename']) && ($v = $_REQUEST['filename'])) {
    $fname = $v;
}
if ($argc >= 2 && ($v = trim($argv[1]))) {
    $fname = $v;
}
$ret = patch($fname, FILE_PATCH);
switch ($ret) {
    case 1:
        echo 'Installation completed: file "' . $fname . '" successfully patched';
        break;
    case 2:
        echo 'Installation has already done';
        break;
    default:
        echo 'Installation failed';
}
コード例 #7
0
ファイル: plgen.php プロジェクト: Geeklog-Core/plugin-toolkit
/**
* Generate plugin file from template
*
* NOTE: aborts entire script on error
*
* @param    string  $filename   file name (relative path)
* @param    array   $plgdata    plugin data
* @return   void
*
*/
function generatePluginFile($filename, $plgdata)
{
    $content = readTemplate($filename);
    $content = patch($content, $plgdata);
    $content = optionalSections($content, $plgdata);
    writePluginFile($filename, $content, $plgdata);
}
コード例 #8
0
ファイル: routes.php プロジェクト: ranugoldan/SoWindows
});
$router->bind('cat', function ($cat) {
    $kat_id = App\Kategori::where('nama_kategori', $cat)->firstOrFail()->id;
    return $kat_id;
});
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
get('/search', ['as' => 'search', 'uses' => 'HomeController@search']);
get('/admin', ['as' => 'admin', 'uses' => 'AdminController@index']);
get('/admin/login', ['as' => 'admin_login', 'uses' => 'AdminController@login']);
get('/admin/posts', ['as' => 'admin_posts', 'uses' => 'AdminController@posts']);
get('/admin/posts/create', ['as' => 'admin_create', 'uses' => 'AdminController@create']);
get('/admin/posts/{news}/edit', ['as' => 'admin_edit', 'uses' => 'AdminController@edit']);
get('/admin/posts/{news}/delete', ['as' => 'admin_delete', 'uses' => 'AdminController@delete']);
get('/admin/posts/{news}/destroy', ['as' => 'admin_destroy', 'uses' => 'AdminController@destroy']);
post('/admin/post', ['as' => 'admin_store', 'uses' => 'AdminController@store']);
patch('/{news}', ['as' => 'admin_update', 'uses' => 'AdminController@update']);
get('/search', ['as' => 'search', 'uses' => 'HomeController@search']);
get('home', ['as' => 'home', 'uses' => 'HomeController@index']);
get('/category/{cat}', 'HomeController@category');
get('/', ['as' => 'root', 'uses' => 'HomeController@index']);
get('/{news}', ['as' => 'news_path', 'uses' => 'HomeController@show']);
post('/comment', ['as' => 'storeComment', 'uses' => 'HomeController@storeComment']);
//$router->bind('songs', function($slug)
//{
//	return App\Song::where('slug' , $slug)->first();
//});
//$router->resource('songs','SongsController');
//get('songs',['as'=>'songs_path','uses'=>'SongsController@index']);
//get('songs/{song}' ,['as'=>'song_path','uses'=>'SongsController@show']);
//get('songs/{song}/edit', 'SongsController@edit');
//patch('songs/{song}', 'SongsController@update');
コード例 #9
0
    get('profile/edit', 'ProfileController@edit')->name('frontend.profile.edit');
    patch('profile/update', 'ProfileController@update')->name('frontend.profile.update');
    //Reports : Create New Report
    get('report/new', 'UserController@newReport')->name('report.new');
    post('report/new', 'UserController@postReport')->name('report.post_report');
    //View all reports in list
    get('reports', 'UserController@reports')->name('reports');
    //View a single report
    get('report/{id}', 'UserController@reportPage')->name('report.page');
    //Save conversations
    post('report/chat/new', 'UserController@saveConversations')->name('report.new_conversation');
    Route::group(['middleware' => 'access.routeNeedsPermission:give_recommendations'], function () {
        get('doctor/dashboard', 'DoctorController@dashboard')->name('doctor.dashboard');
        get('doctor/report/{id}', 'DoctorController@report')->name('doctor.report');
        get('doctor/reports', 'DoctorController@allReports')->name('doctor.reports');
        post('doctor/report/post-recommendation/{id}', 'DoctorController@postRecommendation')->name('doctor.post.recommendation');
        post('doctor/report/refer_patient/{id}', 'DoctorController@referPatient')->name('doctor.refer_patient');
        //Patient Feedback / messages
        get('doctor/feedback/{id}', 'DoctorController@feedback')->name('doctor.feedback');
        //Save conversations
        post('doctor/report/chat/new', 'DoctorController@saveConversations')->name('report.new_conversation');
    });
    Route::group(['middleware' => 'access.routeNeedsPermission:manage_hospital'], function () {
        get('management/dashboard', 'ManagementController@dashboard')->name('management.dashboard');
        get('management/new-doctor', 'ManagementController@newDoctor')->name('management.register_doctor');
        get('management/profile/edit/{id}', 'ManagementController@edit')->name('frontend.management.profile.edit');
        get('management/reports', 'ManagementController@reports')->name('frontend.management.reports');
        patch('management/profile/update', 'ManagementController@update')->name('frontend.management.profile.update');
        post('management/doctor/save', 'ManagementController@registerDoctor')->name('management.create.dashboard');
    });
});
コード例 #10
0
ファイル: new_test.php プロジェクト: omusico/home365
        switch ($row_get_sysid['property_type']) {
            case 'Multifamily':
                $property_type = 7;
                break;
            case 'Residential Detached':
                $property_type = 1;
                break;
            case 'Residential Attached':
                $property_type = 2;
                break;
        }
        if (!empty($property_type)) {
            $listing_array = get_data_array($property_type, $new_sysid);
            if (!empty($listing_array)) {
                update_database($property_type, $listing_array, $new_sysid);
                patch($new_sysid);
            }
        }
    }
} else {
    echo '<br/>All listings are patched<br/>';
}
$selectSQL = "SELECT SQL_CALC_FOUND_ROWS DISTINCT listings.sysid, postal_code, house_number, street_name, street_type, city, province FROM listings\nLEFT JOIN listing_geoaddress ON listings.sysid=listing_geoaddress.sysid WHERE (ISNULL(lat) OR listing_geoaddress.updated='N')  AND status='A' AND property_type!='Land Only' ORDER BY RAND() LIMIT 0, 10";
$get_sysid = mysql_query_or_die($selectSQL, $useradmin);
$row = mysql_fetch_row(mysql_query("SELECT FOUND_ROWS()", $useradmin));
if ($row[0] > 0) {
    echo "<br/>There are " . $row[0] . " listings that don't have geo code address (or don't have accurate geo code).<br/><br/>";
    //login and receive server response.
    //$response=$rets->Login();
    //var_dump($response);
    while ($row_get_sysid = mysql_fetch_assoc($get_sysid)) {
コード例 #11
0
ファイル: routes.php プロジェクト: e7oi/stagMedia
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
//Route::get('/', 'HomeController@index');
/*
Route::get('/', function () {
    return view('welcome');
});
*/
//Route::bind('song', function($slug)
//{
//    return App\Song::whereSlug($slug)->first();
//});
get('/', ['as' => 'home.page', 'uses' => 'PageController@index']);
get('about', ['as' => 'about.page', 'uses' => 'PageController@about']);
get('demo', ['as' => 'demo.page', 'uses' => 'PageController@demo']);
get('music', ['as' => 'song.index', 'uses' => 'SongsController@index']);
get('music/{slug}/view', ['as' => 'song.show', 'uses' => 'SongsController@show']);
get('music/{slug}/edit', ['as' => 'song.edit', 'uses' => 'SongsController@edit']);
patch('music/{slug}', ['as' => 'song.patch', 'uses' => 'SongsController@update']);
get('music/create', ['as' => 'song.create', 'uses' => 'SongsController@create']);
post('music/store', ['as' => 'song.store', 'uses' => 'SongsController@store']);
delete('music/{slug}', ['as' => 'song.destroy', 'uses' => 'SongsController@destroy']);
//$router->resource('songs', 'SongsController');
$router->resource('people', 'PeopleController');
コード例 #12
0
ファイル: routes.php プロジェクト: laracrud/laracrud
<?php

Route::group(['prefix' => config('laracrud.route_prefix')], function () {
    get('/', ['as' => 'laracrud.dashboard', 'uses' => function () {
        return 'crud dashboard';
    }]);
    // List
    get('{model}', ['as' => 'laracrud.index', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@index']);
    // Create
    get('{model}/create', ['as' => 'laracrud.create', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@create']);
    // Show
    get('{model}/{item}', ['as' => 'laracrud.show', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@show']);
    // Edit
    get('{model}/{item}/edit', ['as' => 'laracrud.edit', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@edit']);
    // Store
    post('{model}', ['as' => 'laracrud.store', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@store']);
    // Update
    put('{model}/{id}', ['as' => 'laracrud.update', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@update']);
    patch('{model}/{id}', ['as' => 'laracrud.update', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@update']);
    // Destroy
    delete('{model}/{item}', ['as' => 'laracrud.destroy', 'uses' => 'Laracrud\\Laracrud\\Controllers\\Controller@destroy']);
});
コード例 #13
0
}
$news = json_decode(file_get_contents('http://6al.de/efsched/getconnews'));
Log::info("Importing ConNews");
try {
    $database->startTransaction();
    foreach ($news as $entry) {
        Log::info(sprintf("Id: %s, Type: %s -> %s", $entry->id, $entry->news->type, $entry->news->title));
        $dbItem = @$database->query("SELECT * FROM Announcement WHERE ExternalId=%s", "connews:" . $entry->id)[0];
        if ($dbItem) {
            $dbItem["ValidFromDateTimeUtc"] = new DateTime($dbItem["ValidFromDateTimeUtc"]);
            $dbItem["ValidUntilDateTimeUtc"] = new DateTime($dbItem["ValidUntilDateTimeUtc"]);
        }
        if ($entry->news->type == "new" || $entry->news->type == "reschedule") {
            $entry->news->valid_until = $entry->date + 60 * 60 * 48;
        }
        $sourceItem = array("ExternalId" => "connews:" . $entry->id, "ValidFrom" => DateTime::createFromFormat('U', $entry->date), "ValidUntil" => DateTime::createFromFormat('U', $entry->news->valid_until), "Area" => ucwords($entry->news->type), "Author" => isset($entry->news->department) ? ucwords($entry->news->department) : "Eurofurence", "Title" => $entry->news->title, "Content" => strip_tags($parsedown->text($entry->news->message)));
        $patchedItem = patch($sourceItem, $dbItem, array("ExternalId" => "ExternalId", "ValidFrom" => "ValidFromDateTimeUtc", "ValidUntil" => "ValidUntilDateTimeUtc", "Area" => "Area", "Author" => "Author", "Title" => "Title", "Content" => "Content"));
        if ($patchedItem) {
            if (!$dbItem) {
                $database->insert("Announcement", $patchedItem);
            } else {
                $database->update("Announcement", $patchedItem, "Id=%s", $dbItem["Id"]);
            }
        }
    }
    $database->commit();
} catch (Exception $e) {
    var_dump($e->getMessage());
    Log::error("Rolling back changes to database");
    $database->rollback();
}
コード例 #14
0
    Route::get('order', ['as' => 'order.index', 'uses' => 'CheckoutController@index']);
    Route::get('order/create', ['as' => 'order.create', 'uses' => 'CheckoutController@create']);
    Route::post('order/store', ['as' => 'order.store', 'uses' => 'CheckoutController@store']);
});
Route::group(['middleware' => 'cors'], function () {
    Route::post('oauth/access_token', function () {
        return Response::json(Authorizer::issueAccessToken());
    });
    Route::group(['prefix' => 'api', 'middleware' => 'oauth', 'as' => 'api.'], function () {
        //admin
        Route::group(['prefix' => 'admin', 'middleware' => 'oauth.checkrole:admin', 'as' => 'admin.'], function () {
            Route::resource('products', 'Api\\Admin\\AdminProductController', ['except' => ['create', 'edit']]);
            Route::resource('categories', 'Api\\Admin\\AdminCategoryController', ['except' => ['create', 'edit', 'destroy', 'store']]);
        });
        //client
        Route::group(['prefix' => 'client', 'middleware' => 'oauth.checkrole:client', 'as' => 'client.'], function () {
            Route::get('products', ['as' => 'api.products.index', 'uses' => 'Api\\Client\\ClientProductController@index']);
            Route::post('order', ['as' => 'api.order.store', 'uses' => 'Api\\Client\\ClientCheckoutController@store']);
        });
        //deliveryman
        Route::group(['prefix' => 'deliveryman', 'middleware' => 'oauth.checkrole:deliveryman', 'as' => 'deliveryman.'], function () {
            Route::resource('order', 'Api\\Deliveryman\\DeliverymanCheckoutController', ['except' => ['create', 'edit', 'destroy', 'store']]);
            Route:
            patch('order/{id}/update-status', ['uses' => 'Api\\Deliveryman\\DeliverymanCheckoutController@updateStatus', 'as' => 'orders.update_status']);
        });
        //cupom
        Route::get('cupom/{code}', ['as' => 'api.cupom.show', 'uses' => 'Api\\CupomController@show']);
        //user
        Route::get('user/authenticated', ['as' => 'api.user.authenticated', 'uses' => 'Api\\UserController@authenticated']);
    });
});
コード例 #15
0
 // backend home page
 get('/', ['as' => 'backend', 'uses' => 'Backend\\HomeController@index']);
 // roles and permissions
 Route::group(['prefix' => 'security'], function () {
     // roles
     resource('roles', 'Backend\\Security\\RolesController');
     // permissions
     resource('permissions', 'Backend\\Security\\PermissionsController');
     // access control. defining permissions used by roles, and users assigned this roles
     Route::group(['prefix' => 'access-control'], function () {
         resource('roles', 'Backend\\Security\\UserRolesController');
     });
 });
 // other user's accounts
 Route::group(['prefix' => 'accounts'], function () {
     patch('/resetPassword/{user_id}', ['as' => 'useraccount.password.edit', 'uses' => 'Shared\\AccountController@patchAnotherUsersPassword']);
 });
 // counties
 resource('counties', 'Backend\\Shipping\\CountiesController');
 // products
 resource('products', 'Backend\\Inventory\\ProductsController');
 // help articles
 resource('articles', 'Backend\\Articles\\ArticlesController');
 // brands
 resource('brands', 'Backend\\Inventory\\BrandsController');
 // categories
 resource('categories', 'Backend\\Inventory\\CategoriesController');
 // categories
 resource('orders', 'Backend\\Orders\\OrdersController');
 // subcategories
 resource('subcategories', 'Backend\\Inventory\\SubCategoriesController');
コード例 #16
0
);*/
resource('songs', 'SongsController');
/*resource('users', 'UsersController', [
    'except' => ['store']
]);*/
/* Users visit other profiles */
get('/', 'PagesController@index');
get('/{user_name}', 'PagesController@control');
post('updates/get_details', 'PagesController@get_details');
/* Users */
get('user/', 'UsersController@index');
get('user/index', 'UsersController@index');
get('user/create', 'UsersController@create');
post('user/store', 'UsersController@store');
get('user/show/{user_name},', 'UsersController@show');
patch('user/update', 'UsersController@update');
post('user/login', 'UsersController@login');
get('user/profile', 'UsersController@profile');
get('user/settings', 'UsersController@settings');
post('user/update_profile_avatar', 'UsersController@update_profile_avatar');
get('/user/logout', 'UsersController@logout');
post('user/update_profile_name', 'UsersController@update_profile_name');
post('user/update_profile_email_address', 'UsersController@update_profile_email_address');
post('user/update_profile_password', 'UsersController@update_profile_password');
post('user/update_profile_birth_date', 'UsersController@update_profile_birth_date');
post('user/update_profile_country', 'UsersController@update_profile_country');
post('user/update_profile_gender', 'UsersController@update_profile_gender');
/* Characters */
get('character/', 'CharactersController@index');
get('character/create', 'CharactersController@create');
post('character/store', 'CharactersController@store');
コード例 #17
0
ファイル: routes.php プロジェクト: halayuba/laravel5-tickets
get('tickets', 'TicketsController@index');
//resource('tickets', 'TicketsController');
//SHOW ONLY COMPLETED TICKETS
get('tickets/tickets-completed', 'TicketsController@completedTickets');
//TICKETS WITH COMMENTS
get('tickets/tickets-with-comments', 'TicketsController@ticketsWithComments');
//SHOW ONLY MY OPEN TICKETS
get('tickets/my-open-tickets/{name}', 'TicketsController@myOpenTickets');
//SHOW ONLY MY CLOSED TICKETS
get('tickets/my-closed-tickets/{name}', 'TicketsController@myClosedTickets');
//SHOW ONLY TICKETS BY BUSINESS UNITS
get('tickets/tickets-by-business-units', 'TicketsController@ticketsByBusinessUnits');
//SHOW ONLY TICKETS BY SUBMITTER
get('tickets/tickets-by-submitter', 'TicketsController@ticketsBySubmitter');
post('tickets', 'TicketsController@store');
get('tickets/create', ['middleware' => 'auth', 'uses' => 'TicketsController@create']);
delete('tickets/{slug?}/delete', 'TicketsController@destroy');
get('tickets/{slug?}', 'TicketsController@show');
put('tickets/{slug?}', 'TicketsController@update');
patch('tickets/{slug?}', 'TicketsController@update');
get('tickets/{slug?}/edit', ['middleware' => 'auth', 'uses' => 'TicketsController@edit']);
//COMMENTS
post('comments', ['middleware' => 'auth', 'uses' => 'CommentsController@newComment']);
//REGISTRATION
get('users/register', 'Auth\\AuthController@getRegister');
post('users/register', 'Auth\\AuthController@postRegister');
//LOGOUT
get('users/logout', 'Auth\\AuthController@getLogout');
//LOGIN
get('users/login', 'Auth\\AuthController@getLogin');
post('users/login', 'Auth\\AuthController@postLogin');
コード例 #18
0
ファイル: install.php プロジェクト: davidmottet/automne
            $content .= '
				<input type="submit" class="submit" value="' . $label_next . '" />
			</form>
			';
        } elseif ($step == 3) {
            //load DB scripts
            switch ($_POST['installationType']) {
                case 'demoen':
                    $error = '';
                    if (!patch(dirname(__FILE__) . '/' . $demoEn, $error)) {
                        die(sprintf($error_step3_Demo_script, $error));
                    }
                    break;
                case 'demofr':
                    $error = '';
                    if (!patch(dirname(__FILE__) . '/' . $demoFr, $error)) {
                        die(sprintf($error_step3_Demo_script, $error));
                    }
                    break;
                case 'clean':
                    //Import DB structure
                    $structureScript = PATH_MAIN_FS . "/sql/automne4.sql";
                    if (file_exists($structureScript) && CMS_patch::executeSqlScript($structureScript, true)) {
                        CMS_patch::executeSqlScript($structureScript);
                    } else {
                        die(sprintf($error_step3_SQL_script, $structureScript));
                    }
                    //Set websites language like the current installation language
                    $q = new CMS_query("update websites set language_web='" . io::sanitizeSQLString($install_language) . "'");
                    break;
            }
コード例 #19
0
ファイル: routes.php プロジェクト: Runmore/larastart
<?php

get('/', function () {
    return view('welcome');
});
Route::get('/merchandise', function () {
    return "Ummmm sorry... We don't actually have anything to give away...";
});
Route::get('/extras', function () {
    return view('jextra');
});
Route::get('contact', ['as' => 'contact', 'uses' => 'AboutController@create']);
Route::post('contact', ['as' => 'contact_store', 'uses' => 'AboutController@store']);
get('songs', 'songsController@index');
get('/songs/{slug}', 'songsController@show');
get('songs/{slug}/edit', 'songsController@edit');
patch('songs/{slug}', 'songsController@update');
コード例 #20
0
ファイル: routes.php プロジェクト: xinen8721/pinboard
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
// Glide Image Processing routes...
get('images/{path}', function (League\Glide\Server $server, Illuminate\Http\Request $request) {
    $server->outputImage($request);
})->where('path', '.*');
// Static Pages routes...
get('/', ['as' => 'root_path', 'uses' => 'PinsController@index']);
// Pins routes...
resource('pins', 'PinsController');
get('users/{id}/favorites', ['as' => 'favorites_path', 'uses' => 'PinsController@favorites']);
put('favorites/{id}', ['as' => 'favorite_path', 'uses' => 'PinsController@favorite']);
delete('favorites/{id}', ['as' => 'favorite_path', 'uses' => 'PinsController@unfavorite']);
// Authentication routes...
get('auth/login', 'Auth\\AuthController@getLogin');
post('auth/login', 'Auth\\AuthController@postLogin');
get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
get('auth/register', 'Auth\\AuthController@getRegister');
post('auth/register', 'Auth\\AuthController@postRegister');
// Account edit routes...
get('auth/user/edit', ['middleware' => 'auth', 'as' => 'user_edit_path', 'uses' => 'Auth\\AuthController@getEdit']);
patch('auth/user/edit', ['middleware' => 'auth', 'as' => 'user_path', 'uses' => 'Auth\\AuthController@patchEdit']);
// Password reset link request routes...
get('password/email', 'Auth\\PasswordController@getEmail');
post('password/email', 'Auth\\PasswordController@postEmail');
// Password reset routes...
get('password/reset/{token}', 'Auth\\PasswordController@getReset');
post('password/reset', 'Auth\\PasswordController@postReset');
コード例 #21
0
function esmeer_activator()
{
    patch();
}
コード例 #22
0
ファイル: routes.php プロジェクト: LPVua/messangerApi
                get('', 'UsersController@getById');
                /*
                |--------------------------------------------------------------------------
                |  USER MESSAGES ROUTES
                |--------------------------------------------------------------------------
                */
                Route::group(['prefix' => 'messages'], function () {
                    get('', 'MessagesController@getAllUserMessages');
                });
            });
        });
        /*
        |--------------------------------------------------------------------------
        |  MESSAGES ROUTES
        |--------------------------------------------------------------------------
        */
        Route::group(['prefix' => 'messages'], function () {
            post('', 'MessagesController@createMessage');
            /*
            |--------------------------------------------------------------------------
            |  MESSAGE ROUTES
            |--------------------------------------------------------------------------
            */
            Route::group(['prefix' => '{message_id}'], function () {
                get('', 'MessagesController@getMessage');
                patch('', 'MessagesController@changeSubject');
                put('', 'MessagesController@updateMessage');
            });
        });
    });
});
コード例 #23
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
$sql = "SELECT COUNT(id) AS whole FROM {$table} WHERE time LIKE '%{$year}-{$month}%'";
$query = mysql_db_query("{$db}", "{$sql}");
while ($row = mysql_fetch_array($query)) {
    $whole = $row[whole];
}
$sql = "SELECT DAYOFMONTH(time) AS time, COUNT(ID) AS hits FROM {$table} WHERE time LIKE '{$year}-{$month}%' GROUP BY time";
$query = mysql_db_query("{$db}", "{$sql}");
echo "&Uuml;bersicht der geloggten Tage aus " . $month . "." . $year . "<br />";
echo "<font size='2'><a href='stats.php'>back</a><br />\n";
echo "<table cellpadding='0' cellspacing='0'>";
while ($row = mysql_fetch_array($query)) {
    $hits = $row[hits];
    $stats = get_pt($hits, $whole);
    $time = $row[time];
    $keytime = patch($time);
    echo "<tr><td nowrap align='right'>\n";
    echo "{$keytime}/{$month}/{$year}&nbsp;</td><td>\n";
    echo show_pt($stats, $hits);
    echo "</td></tr>\n";
}
echo "</table>";
コード例 #24
0
ファイル: routes.php プロジェクト: JABirchall/L5-DeathmatchZ
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
get('/', ['middleware' => 'auth', 'uses' => 'AccountsController@index']);
get('login', 'AccountsController@login');
get('logout', 'AccountsController@logout');
post('login', 'AccountsController@doLogin');
get('home', ['middleware' => 'auth', 'uses' => 'AccountsController@index']);
get('accounts', ['middleware' => 'auth', 'uses' => 'AccountsController@accounts']);
post('accounts/search', ['middleware' => 'auth', 'uses' => 'AccountsController@find']);
get('accounts/{id}', ['middleware' => 'auth', 'uses' => 'AccountsController@show']);
patch('accounts/{id}', ['middleware' => 'auth', 'uses' => 'AccountsController@update']);
patch('accounts/{id}/ban', ['middleware' => 'auth', 'uses' => 'AccountsController@ban']);
get('accounts/{id}/edit', ['middleware' => 'auth', 'uses' => 'AccountsController@edit']);
post('characters/search', ['middleware' => 'auth', 'uses' => 'CharacterController@find']);
get('characters', ['middleware' => 'auth', 'uses' => 'CharacterController@index']);
get('characters/{id}', ['middleware' => 'auth', 'uses' => 'CharacterController@show']);
get('accounts/{id}/characters', ['middleware' => 'auth', 'uses' => 'CharacterController@showAll']);
get('clans', ['middleware' => 'auth', 'uses' => 'ClansController@index']);
get('clans/{id}', ['middleware' => 'auth', 'uses' => 'ClansController@show']);
コード例 #25
0
ファイル: routes.php プロジェクト: smartrahat/zamzam
/** Invoice routes ends form here */
/** Cash In routes starts from here */
resource('cashIn', 'CashInController');
get('ledger', 'CashInController@ledger');
/** Cash In routes ends from here */
/** Cash Out routes starts from here */
resource('cashOut', 'CashOutController');
/** Cash Out routes ends from here */
/** Salary routes starts from here */
resource('salary', 'SalaryController');
get('lists', 'SalaryController@lists');
get('create/{id}', 'SalaryController@create');
get('payment/{id}', 'SalaryController@payment');
post('pay', 'SalaryController@pay');
get('payment/{id}', 'SalaryController@editPayment');
patch('payment/{id}/edit', 'SalaryController@updatePayment');
get('advance', 'SalaryController@advance');
post('payAdvance', 'SalaryController@payAdvance');
get('advance/{id}', 'SalaryController@editAdvance');
/** Salary routes ends from here */
/**
 * Route for MyConfigController <p>
 * These routes defined explicitly because in
 * MyConfigController I used multiple methods for store and delete records </p>
 * Created by smartrahat on Date: 06.09.2015 05:23AM | Last Modified: 10.09.2015 08:03PM
 */
get('config', 'MyConfigController@index');
post('storeCountry', 'MyConfigController@storeCountry');
post('storeDesignation', 'MyConfigController@storeDesignation');
post('storeCity', 'MyConfigController@storeCity');
post('storeState', 'MyConfigController@storeState');
コード例 #26
0
ファイル: routes.php プロジェクト: EneaWeb/aliangel
    resource('/todo', 'TodoController');
    Route::model('annoucement', '\\App\\Annoucement');
    resource('/annoucement', 'AnnoucementController');
    Route::model('custom_field', '\\App\\CustomField');
    resource('/custom_field', 'CustomFieldController');
    Route::model('ticket_type', '\\App\\TicketType');
    resource('/ticket_type', 'TicketTypeController');
    Route::model('business_hour', '\\App\\BusinessHour');
    resource('/business_hour', 'BusinessHourController');
    Route::model('service_time', '\\App\\ServiceTime');
    resource('/service_time', 'ServiceTimeController');
    Route::model('ticket', '\\App\\Ticket');
    resource('/ticket', 'TicketController');
    post('/filter-ticket', ['as' => 'ticket.index', 'uses' => 'TicketController@index']);
    get('/view-ticket/{id}', 'TicketController@view');
    get('/create-ticket', 'TicketController@createTicket');
    patch('/ticket-send-response/{id}', ['as' => 'ticket.response', 'uses' => 'TicketController@response']);
    Route::model('role', '\\App\\Role');
    resource('/role', 'RoleController');
    post('/save-permission', array('as' => 'configuration.save_permission', 'uses' => 'ConfigController@savePermission'));
    get('/configuration', 'ConfigController@index');
    post('/configuration', array('as' => 'configuration.store', 'uses' => 'ConfigController@store'));
    post('/mail-store', array('as' => 'configuration.mailStore', 'uses' => 'ConfigController@mailStore'));
    post('/social-login-store', array('as' => 'configuration.socialLoginStore', 'uses' => 'ConfigController@socialLoginStore'));
    resource('template', 'TemplateController');
    post('/temp', array('as' => 'copyTemplate', 'uses' => 'TemplateController@copyTemplate'));
    Route::delete('template/{key}', array('uses' => 'TemplateController@destroy', 'as' => 'template.destroy'));
    get('/change_password', 'UserController@changePassword');
    post('/change_password', array('as' => 'change_password', 'uses' => 'UserController@doChangePassword'));
    patch('/change_user_password/{id}', array('as' => 'change_user_password', 'uses' => 'UserController@doChangeUserPassword'));
});
コード例 #27
0
ファイル: Frontend.php プロジェクト: veerankuttyvp/rahul
<?php

/**
 * Frontend Controllers
 */
get('/', 'FrontendController@index')->name('home');
get('macros', 'FrontendController@macros');
/**
 * These frontend controllers require the user to be logged in
 */
$router->group(['middleware' => 'auth'], function () {
    get('dashboard', 'DashboardController@index')->name('frontend.dashboard');
    get('dashboard/add_fs', 'DashboardController@add_fs');
    post('dashboard/add_fs_req', 'DashboardController@add_fs_req');
    get('profile/edit', 'ProfileController@edit')->name('frontend.profile.edit');
    patch('profile/update', 'ProfileController@update')->name('frontend.profile.update');
});
コード例 #28
0
ファイル: routes.php プロジェクト: muhamadsyahril/ecommerce-1
        patch('/aboutMe', ['as' => 'checkout.step1.edit', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@editShippingAddress']);
        get('/shipping', ['as' => 'checkout.step2', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@shipping']);
        patch('/shipping', ['as' => 'checkout.step2', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@patchShipping']);
        get('/payment', ['as' => 'checkout.step3', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@payment']);
        post('/payment', ['as' => 'checkout.step3.post', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@storePayment']);
        get('/reviewOrder', ['as' => 'checkout.step4', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@reviewOrder']);
        post('/placeOrder', ['as' => 'checkout.submitOrder', 'uses' => 'Frontend\\Orders\\OrdersController@store']);
        get('/viewInvoice', ['as' => 'checkout.viewInvoice', 'uses' => 'Frontend\\Orders\\OrdersController@displayInvoice', 'middleware' => ['orders.verify']]);
        get('/createAccount', ['as' => 'checkout.createAccount', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@getCreateAccount']);
        post('/createAccount', ['as' => 'checkout.createAccount.post', 'uses' => 'Frontend\\Checkout\\GuestCheckoutController@createAccount']);
        get('/invoice/pdf', ['as' => 'checkout.viewInvoice.pdf', 'uses' => 'Frontend\\Orders\\OrdersController@printInvoice', 'middleware' => ['orders.verify']]);
        get('/complete', ['as' => 'order.finished', 'uses' => 'Frontend\\Orders\\OrdersController@completeOrder', 'middleware' => ['orders.verify']]);
    });
    // checking out as a normal authenticated user
    Route::group(['prefix' => 'checkout', 'middleware' => ['https', 'cart.check', 'checkout.user']], function () {
        get('/', ['as' => 'u.checkout.step2', 'uses' => 'Frontend\\Checkout\\AuthUserCheckoutController@index']);
        patch('/shipping', ['as' => 'u.checkout.step2.patch', 'uses' => 'Frontend\\Checkout\\AuthUserCheckoutController@shipping']);
        get('/payment', ['as' => 'u.checkout.step3', 'uses' => 'Frontend\\Checkout\\AuthUserCheckoutController@payment']);
        post('/payment', ['as' => 'u.checkout.step3.post', 'uses' => 'Frontend\\Checkout\\AuthUserCheckoutController@storePayment']);
        get('/reviewOrder', ['as' => 'u.checkout.step4', 'uses' => 'Frontend\\Checkout\\AuthUserCheckoutController@reviewOrder']);
        get('/viewInvoice', ['as' => 'u.checkout.viewInvoice', 'uses' => 'Frontend\\Orders\\OrdersController@displayInvoice', 'middleware' => ['orders.verify']]);
        get('/invoice/pdf', ['as' => 'u.checkout.viewInvoice.pdf', 'uses' => 'Frontend\\Orders\\OrdersController@printInvoice', 'middleware' => ['orders.verify']]);
        post('/placeOrder', ['as' => 'u.checkout.submitOrder', 'uses' => 'Frontend\\Orders\\OrdersController@store']);
        get('/complete', ['as' => 'u.order.finished', 'uses' => 'Frontend\\Orders\\OrdersController@completeOrder', 'middleware' => ['orders.verify']]);
    });
    // users orders
    Route::group(['prefix' => 'myorders', 'middleware' => ['https', 'auth', 'orders.verify']], function () {
        get('/', ['as' => 'myorders', 'uses' => 'Frontend\\Orders\\OrdersController@index']);
        get('/{orders}', ['as' => 'viewOrder', 'uses' => 'Frontend\\Orders\\OrdersController@show']);
    });
});
コード例 #29
0
ファイル: routes.php プロジェクト: eder-toledo/IREMA
Route::get('/customer/create', ['as' => 'customer_create', 'middleware' => 'auth:admin', 'uses' => 'CustomerController@create']);
Route::post('/customer/store', ['as' => 'customer_store', 'middleware' => 'auth:admin', 'uses' => 'CustomerController@store']);
Route::get('/customer/edit/{id}', ['as' => 'customer_edit', 'middleware' => 'auth:admin', 'uses' => 'CustomerController@edit']);
Route::get('/customer/view/{id}', ['as' => 'customer_view', 'middleware' => 'auth:admin', 'uses' => 'CustomerController@show']);
patch('/customer/{customer}', ['middleware' => 'auth:admin', 'uses' => 'CustomerController@update']);
delete('/customer/{customer}', ['middleware' => 'auth:admin', 'uses' => 'CustomerController@destroy']);
/* Route for customer */
Route::get('/user/', ['as' => 'user_index', 'middleware' => 'auth:admin', 'uses' => 'UserController@index']);
Route::get('/user/create', ['as' => 'user_create', 'middleware' => 'auth:admin', 'uses' => 'UserController@create']);
Route::post('/user/store', ['as' => 'user_store', 'middleware' => 'auth:admin', 'uses' => 'UserController@store']);
Route::get('/user/edit/{id}', ['as' => 'customer_edit', 'middleware' => 'auth:admin', 'uses' => 'UserController@edit']);
Route::get('/user/view/{id}', ['as' => 'customer_view', 'middleware' => 'auth:admin', 'uses' => 'UserController@show']);
patch('/user/{user}', ['middleware' => 'auth:admin', 'uses' => 'UserController@update']);
delete('/user/{user}', ['middleware' => 'auth:admin', 'uses' => 'UserController@destroy']);
/* Route for incidents */
Route::get('/incident/', ['as' => 'incident_index', 'uses' => 'IncidentController@index']);
Route::get('/incident/create', ['as' => 'incident_create', 'uses' => 'IncidentController@create']);
Route::post('/incident/store', ['as' => 'incident_store', 'uses' => 'IncidentController@store']);
Route::get('/incident/edit/{id}', ['as' => 'incident_edit', 'uses' => 'IncidentController@edit']);
Route::get('/incident/view/{id}', ['as' => 'incident_view', 'uses' => 'IncidentController@show']);
patch('/incident/work/{incident}', ['uses' => 'IncidentController@updateToWorkInProgress']);
patch('/incident/complete/{incident}', ['uses' => 'IncidentController@updateToSolution']);
delete('/incident/{incident}', ['middleware' => 'auth:admin', 'uses' => 'IncidentController@destroy']);
patch('/incident/{incident}', ['middleware' => 'auth:admin', 'uses' => 'IncidentController@update']);
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes... not implemented yet
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
コード例 #30
0
ファイル: routes.php プロジェクト: Jonniosaurus/web1
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
resource('/examples/samples', 'sampleController', ['names' => ['index' => 'samples', 'edit' => 'samples.edit', 'show' => 'samples.show', 'create' => 'samples.create', 'store' => 'samples.store', 'update' => 'samples.update', 'destroy' => 'samples.destroy']]);
get('/', ['as' => 'home', 'uses' => 'pageController@index']);
get('{slug}', ['as' => 'page', 'uses' => 'pageController@show']);
get('{slug}/edit', ['as' => 'page.edit', 'uses' => 'pageController@edit']);
get('{slug}/edit/{contentId}', ['as' => 'page.edit.content', 'uses' => 'pageController@editContent']);
get('{slug}/create', ['as' => 'page.create', 'uses' => 'pageController@create']);
delete('/{id}', 'pageController@destroy');
patch('/{slug}', 'pageController@update');
post('/{slug}', 'pageController@store');
//get('/examples/{slug}', ['as' => 'show', 'uses' => 'sampleController.show']);
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', ['as' => 'auth.login', 'uses' => 'Auth\\AuthController@postLogin']);
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
//Route::get('auth/register', 'Auth\AuthController@getRegister');
//Route::post('auth/register', ['as' => 'auth.register', 'uses' => 'Auth\AuthController@postRegister']);