Uploads demo Bootstrap 4.5 theme
Demo of file and images uploading
HIDE CODE
<?php
$xcrud = Xcrud::get_instance();
$xcrud->table('uploads');
// simple file upload
$xcrud->change_type('simple_upload', 'file', '', array('not_rename'=>true));
// simple image upload
$xcrud->change_type('simple_image', 'image');
// image upload with resizing
$xcrud->change_type('auto_resize', 'image', '', array('width' => 200, 'height' => 200));
// image upload with resizing
$xcrud->change_type('auto_crop', 'image', '', array(
'width' => 200,
'height' => 200,
'crop' => true));
// image upload with manual crop
$xcrud->change_type('manual_crop', 'image', '', array('manual_crop' => true));
// image upload with manual crop and resizing
$xcrud->change_type('manual_crop_2', 'image', '', array(
'width' => 200,
'height' => 200,
'manual_crop' => true));
// image upload with manual crop and fixed ratio
$xcrud->change_type('manual_crop_3', 'image', '', array('ratio' => 0.5, 'manual_crop' => true));
// image upload with watermark
$xcrud->change_type('watermark', 'image', '', array('width' => 400, 'watermark' => '../demos/assets/xCRUD.png'));
// image upload with watermark position (%-left, %-top)
$xcrud->change_type('watermark_position', 'image', '', array('watermark' => '../demos/assets/xCRUD.png',
'watermark_position' => array(10, 95)));
// image upload with thumbs
$xcrud->change_type('image_with_thumbs', 'image', '', array('thumbs' =>
array(
array(
'width' => '300',
'marker' => '_th',
'watermark' => '../demos/assets/xCRUD.png'),
array(
'width' => 100,
'height' => 100,
'crop' => true,
'folder' => 'thumbs')
)));
echo $xcrud->render('edit', 14);
?>
Fatal error: Uncaught mysqli_sql_exception: Table 'shpilkina.uploads' doesn't exist in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php:61 Stack trace: #0 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php(61): mysqli->query('SHOW COLUMNS FR...', 1) #1 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(4896): Xcrud_db->query('SHOW COLUMNS FR...') #2 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(1992): Xcrud->_get_table_info() #3 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\pages\uploads.php(53): Xcrud->render('edit', 14) #4 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\html\template.php(82): include('D:\\aaa_iVzuvi\\t...') #5 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\index.php(31): include('D:\\aaa_iVzuvi\\t...') #6 {main} thrown in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php on line 61