<?php
if ( ! defined( 'ABSPATH' ) ) exit;

function dvs_courier_api_page() { ?>

<h1>Universal Courier Pakistan</h1>
<p>Create bulk shipment booking directly from your Woocommerce dashboard in all renowed courier companies in Pakistan. Store admins and customers can view live tracking details within your website. You can print custom labels with your own store logo, sync live tracking status and send tracking details to customer via Email, SMS and WhatsApp. For support WhatsApp: 0323-4152099</p>

<div class="wrap">
	<div style="width: 50%; float: left;">

		<h3>Support & Compatiblity</h3>
		<ul>
		<li>This plugin works with all Woocommerce themes.</li>
		<li>This plugin supports all sequential order Woocommerce Plugins.</li>
		<li>Custom courier can be integrated upon request.</li>
		</ul>
		<p><a href="#TB_inline?&width=600&height=350&inlineId=dvs-license-popup" class="woocommerce-Button button thickbox" style="text-decoration: none;">How to Purchase Premium License</a></p>

		<h3>Guides: Courier Settings</h3>
		<ul>
			<li>1. <a href="/wp-admin/admin.php?page=dvs_tcs_api" target="_blank" style="text-decoration: none;">TCS Settings</a></li>
			<li>2. <a href="/wp-admin/admin.php?page=dvs_lcs_api" target="_blank" style="text-decoration: none;">Leopards Courier Settings</a></li>
			<li>3. <a href="/wp-admin/admin.php?page=dvs_trax_api" target="_blank" style="text-decoration: none;">Trax Settings</a></li>
			<li>4. <a href="/wp-admin/admin.php?page=dvs_mnp_api" target="_blank" style="text-decoration: none;">MNP Settings</a></li>
			<li>5. <a href="/wp-admin/admin.php?page=dvs_ccs_api" target="_blank" style="text-decoration: none;">Call Courier Settings</a></li>
			<li>6. <a href="/wp-admin/admin.php?page=dvs_blx_api" target="_blank" style="text-decoration: none;">BlueEx Settings</a></li>
			<li>7. <a href="/wp-admin/admin.php?page=dvs_postex_api" target="_blank" style="text-decoration: none;">PostEx Settings</a></li>
			<li>8. <a href="/wp-admin/admin.php?page=dvs_daewoo_api" target="_blank" style="text-decoration: none;">Daewoo Settings</a></li>
			<li>9. <a href="/wp-admin/admin.php?page=dvs_rider_api" target="_blank" style="text-decoration: none;">Rider Settings</a></li>
			<li>10. <a href="/wp-admin/admin.php?page=dvs_insta_api" target="_blank" style="text-decoration: none;">Insta World Settings</a></li>
			<li>11. <a href="/wp-admin/admin.php?page=dvs_dodeliver_api" target="_blank" style="text-decoration: none;">Do Deliver Settings</a></li>
			<li>12. <a href="/wp-admin/admin.php?page=dvs_oshi_api" target="_blank" style="text-decoration: none;">Oshi Courier Settings</a></li>
			<li>13. <a href="/wp-admin/admin.php?page=dvs_csn_api" target="_blank" style="text-decoration: none;">Couiers Next Settings</a></li>	
			<li>14. <a href="/wp-admin/admin.php?page=dvs_zaaf_api" target="_blank" style="text-decoration: none;">Zaaf Courier Settings</a></li>			
			<li>15. <a href="/wp-admin/admin.php?page=dvs_rocket_api" target="_blank" style="text-decoration: none;">Rocket Courier Settings</a></li>
			<li>16. <a href="/wp-admin/admin.php?page=dvs_falcomail_api" target="_blank" style="text-decoration: none;">Falcomail Settings</a></li>
			<li>17. <a href="/wp-admin/admin.php?page=dvs_noc_api" target="_blank" style="text-decoration: none;">Ship NOC Settings</a></li>
			<li>18. <a href="/wp-admin/admin.php?page=dvs_rocket_api" target="_blank" style="text-decoration: none;">RGS Logistics Settings</a></li>
			<li>19. <a href="/wp-admin/admin.php?page=dvs_ahl_api" target="_blank" style="text-decoration: none;">AHL Courier Settings</a></li>
		</ul>

		<h3>Guides: Plugin Settings</h3>
		<ul>
			<li>1. <a href="https://youtu.be/UP_3CZmyl4k?si=2nLrcYr0ERKBQ4qQ&amp;t=31" target="_blank" style="text-decoration: none;">How to Download and Install plugin</a></li>
			<li>2. <a href="https://youtu.be/UP_3CZmyl4k?si=999DXno6mpmtzW2d&amp;t=102" target="_blank" style="text-decoration: none;">How to Upgrade to Premium plan</a></li>
			<li>3. <a href="https://youtu.be/UP_3CZmyl4k?si=Ed5PpfnFnHvo1VHh&amp;t=124" target="_blank" style="text-decoration: none;">How to setup Shipper Profiles &amp; Print Labels</a></li>
			<li>4. <a href="https://youtu.be/UP_3CZmyl4k?si=vbr_U6nq5GHzuUnK&amp;t=353" target="_blank" style="text-decoration: none;">How to add Single or Bulk shipment booking</a></li>
			<li>5. <a href="https://youtu.be/UP_3CZmyl4k?si=qQcTxfNYq4LCbi95&amp;t=515" target="_blank" style="text-decoration: none;">How to Cancel or Rebook shipments</a></li>
			<li>6. <a href="https://youtu.be/UP_3CZmyl4k?si=zWijdECY1KDYpfrL&amp;t=559" target="_blank" style="text-decoration: none;">How to Sync Live Shipment Tracking</a></li>
			<li>7. <a href="https://youtu.be/UP_3CZmyl4k?si=Ci8VdLWr4fQzr4GR&amp;t=1107" target="_blank" style="text-decoration: none;">How to add Tracking Page for customers</a></li>
			<li>8. <a href="https://youtu.be/UP_3CZmyl4k?si=oYspH6tkynj0W1_2&amp;t=618" target="_blank" style="text-decoration: none;">How to send Tracking details via Email, WhatsApp or SMS</a></li>
			<li>9. <a href="https://youtu.be/UP_3CZmyl4k?si=Qrt3fdJBmqXAf-jG&amp;t=732" target="_blank" style="text-decoration: none;">How to use Courier Logs / Re-Print Labels</a></li>
			<li>10. <a href="https://youtu.be/UP_3CZmyl4k?si=ZcAdaDY16KEetFeJ&amp;t=907" target="_blank" style="text-decoration: none;">How to use Courier Analytics and its Benefits</a></li>
			<li>11. <a href="https://youtu.be/UP_3CZmyl4k?si=xSNiRlDvF8HhmowL&amp;t=992" target="_blank" style="text-decoration: none;">How to use Courier Reports</a></li>
			<li>12. <a href="https://www.youtube.com/watch?v=-WzQWZ5QTEY" target="_blank" style="text-decoration: none;">How to Upload & Reconcile Courier Finance via CSV</a></li>
			<li>13. <a href="https://www.loom.com/share/d2044c6a6bb445e6a8958a9773b7a795" target="_blank" style="text-decoration: none;">How to Upload & Reconcile Courier Finance via Bulk</a></li>	
		</ul>			
	</div>	


	<?php 

	$url = get_option( 'dvs_url' )."/woo/license.php";	
	$license = wp_remote_post( $url, array('method'=> 'POST','sslverify' => false,'timeout'=> 30, 'body'=> '' ));
	$days = $license['body'];
	if($days > 0) {
		$license_text = 'Congratulations, your license has been verified. Your license will expire in '.$days. ' days.';
	}
	else {
		$license_text = 'Sorry, your license is invalid or expired. Please contact us to upgrade your license.';
	}
	?>

	<div style="width: 50%; float: left;">

		<div class="card">
			<h2 class="title">License Details</h2>
			<p><?php echo $license_text; ?></p>
			<?php add_thickbox(); ?>
			<a href="#TB_inline?&width=600&height=350&inlineId=dvs-license-popup" class="button button-primary thickbox">Upgrade License</a>
			<a href="https://devsol.pk/universal-courier-woocommerce/" target="_blank" class="button button-primary" style="background-color: #00a32a;border-color:#00a32a;float:right">Download Latest Version</a>			
			<div id="dvs-license-popup" style="display:none;">
				<h3>How to Purchase / Upgrade license</h3>
				<span>To upgrade or purchase license you need to contact us via Email or WhatsApp.</span><br><br>
				<span><strong>Email: </strong>devsol.pk@gmail.com</span><br>
				<span><strong>Call / WhatsApp: </strong><a href="https://wa.me/9203234152099">0323-4152099</a></span><br><br>
				<hr>
				<h3>Payment methods</h3>
				<span>We accept following payment methods.</span><br><br>
				<span>Bank Transfer</span><br>
				<span>EasyPaisa</span><br>
				<span>Debit / Credit Card</span><br>
			</div>
		</div>

		<div class="card" style="width: 100%; float: left">
			<h2 class="title">Total Bookings: <?php echo get_option( 'dvs_courier_total' ); ?></h2>

			<div style="width: 48%; float: left; margin-right: 4%;">
				<table style="text-align: left;" class="wp-list-table widefat striped table-view-list">
					<tr>
						<th>TCS Courier</th>
						<td><?php echo get_option( 'dvs_courier_tcs' ); ?></td>
					</tr>
					<tr>
						<th>Leopards Courier</th>
						<td><?php echo get_option( 'dvs_courier_lcs' ); ?></td>
					</tr>
					<tr>
						<th>Trax</th>
						<td><?php echo get_option( 'dvs_courier_trax' ); ?></td>
					</tr>
					<tr>
						<th>MNP</th>
						<td><?php echo get_option( 'dvs_courier_mnp' ); ?></td>
					</tr>
					<tr>
						<th>Call Courier</th>
						<td><?php echo get_option( 'dvs_courier_ccs' ); ?></td>
					</tr>
					<tr>
						<th>Rocket Courier</th>
						<td><?php echo get_option( 'dvs_courier_rocket' ); ?></td>
					</tr>					

				</table>
			</div>

			<div style="width: 48%; float: left">
				<table style="text-align: left;" class="wp-list-table widefat striped table-view-list">			
					<tr>
						<th>BlueEx</th>
						<td><?php echo get_option( 'dvs_courier_blx' ); ?></td>
					</tr>	
					<tr>
						<th>PostEx</th>
						<td><?php echo get_option( 'dvs_courier_postex' ); ?></td>
					</tr>
					<tr>
						<th>Daewoo Courier</th>
						<td><?php echo get_option( 'dvs_courier_daewoo' ); ?></td>
					</tr>
					<tr>			  	
						<th>Insta World</th>
						<td><?php echo get_option( 'dvs_courier_insta' ); ?></td>
					</tr>	
					<tr>
						<th>Rider Courier</th>
						<td><?php echo get_option( 'dvs_courier_rider' ); ?></td>
					</tr>								  
					<tr>
						<th>Oshi Courier</th>
						<td><?php echo get_option( 'dvs_courier_oshi' ); ?></td>
					</tr>
				</table>
			</div>

			<div style="width: 100%; float: left; margin-top:20px; text-align: center;">
				<a href="https://devsol.pk/universal-courier-woocommerce/" target="blank" class="button button-primary">Video: Complete Features</a>
				<a href="https://devsol.pk/contact/" target="blank" class="woocommerce-Button button" style="margin: 0px 15px">Get Support</a>
				<a href="https://wa.me/9203234152099" target="blank" class="woocommerce-Button button">WhatsApp Support</a>
			</div>

		</div>
	</div>
</div>

<?php

}

