This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://unpkg.com/jspdf-invoice-template@1.4.4/dist/index.js"></script> | |
<script> | |
async function generatePdf() { | |
// Extract product details from server-side variable | |
var productDetails = <?php echo json_encode($ProductDetailsforInvoices); ?>; | |
var tableData = []; | |
var index = 1; | |
// Construct table data for the invoice | |
for (var productId in productDetails) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Steps Required Before Execution | |
* 1. Login/Signup to MSG91 | |
* 2. Create a Sender ID and get the sender id approved by MSG91 | |
* 3. Get AuthKey | |
*/ | |
// Initialize request array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- --------------HTML CODE ---------------- --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropper/4.1.0/cropper.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/cropper/4.1.0/cropper.min.js"></script> | |
<!-- Image Upload Section --> | |
<div class="form-group" id="image_section"> | |
<label>Event Images</label> | |
<div class="image_preview_main"></div> | |
<div style="width: 600px;height: 364px;" class="center-block"> | |
<img id="preview_img" class='img-thumbnail center-block' src="https://www.motiv8search.com/images/1709386060_7f878ed5-ee52-4c1f-a5e0-92f3cfc91942.jpg" alt="preview image" style="display: block; max-width: 100%;"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set headers for CSV download | |
header('Content-Type:text/csv; charset=utf-8'); | |
header('Content-Disposition: attachment; filename=data.csv'); | |
// Open output stream | |
$output = fopen("php://output", "w"); | |
// Define CSV columns | |
$columns = array('order_id', 'user_id', 'userName', 'user_email', 'user_phone', 'product_Srno', 'product_Name', 'product_Link', 'product_total', 'product_status'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$getphoto = "https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference=".$row["photo_reference"] ."&key=" .$key; | |
$photoData = file_get_contents($getphoto); | |
$path = tempnam(sys_get_temp_dir(), "php"); | |
file_put_contents($path, $photoData); | |
$username = brilliantDirectories::getDatabaseConfiguration("website_user"); | |
$password = brilliantDirectories::getDatabaseConfiguration("website_pass"); |