rebase from live enviornment
This commit is contained in:
26
wp/plugins/iper-medical/metabox/product_metabox.php
Normal file
26
wp/plugins/iper-medical/metabox/product_metabox.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:48
|
||||
*/
|
||||
|
||||
global $_iper_product_meta,$post;
|
||||
foreach($_iper_product_meta as $meta):
|
||||
|
||||
$value=get_post_meta($post->ID, $meta['name'], true);
|
||||
|
||||
if($meta['type']==='input-text'):
|
||||
include(sprintf("%s/res/input-text.php", dirname(__FILE__)));
|
||||
elseif($meta['type']==='input-textarea'):
|
||||
include(sprintf("%s/res/input-textarea.php", dirname(__FILE__)));
|
||||
endif;
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php endforeach; ?>
|
||||
26
wp/plugins/iper-medical/metabox/product_metabox_old.php
Normal file
26
wp/plugins/iper-medical/metabox/product_metabox_old.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:48
|
||||
*/
|
||||
|
||||
global $_iper_product_meta,$post;
|
||||
foreach($_iper_product_meta as $meta):
|
||||
|
||||
$value=get_post_meta($post->ID, $meta['name'], true);
|
||||
|
||||
if($meta['type']=='input-text'):
|
||||
include(sprintf("%s/res/input-text.php", dirname(__FILE__)));
|
||||
elseif($meta['type']=='input-textarea'):
|
||||
include(sprintf("%s/res/input-textarea.php", dirname(__FILE__)));
|
||||
endif;
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php endforeach; ?>
|
||||
34
wp/plugins/iper-medical/metabox/product_metabox_plan.php
Normal file
34
wp/plugins/iper-medical/metabox/product_metabox_plan.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:48
|
||||
*/
|
||||
|
||||
global $_iper_product_meta_plan, $post, $wpdb;
|
||||
|
||||
$product_db_id_call = $wpdb->prepare("CALL IPER_MA_PRODUCT_GET_ID_BY_WPID(%d)", $post->ID);
|
||||
$product_db_id = callDBStored($product_db_id_call);
|
||||
|
||||
if($product_db_id[0]->idPRODUCT){
|
||||
$id= $product_db_id[0]->idPRODUCT;
|
||||
$product_rateplans_call = $wpdb->prepare("CALL IPER_MA_RATEPLAN_LIST(%d)", $id);
|
||||
$product_rateplans = callDBStored($product_rateplans_call);}
|
||||
|
||||
|
||||
foreach($_iper_product_meta_plan as $meta):
|
||||
|
||||
$value=get_post_meta($post->ID, $meta['name'], true);
|
||||
|
||||
if($meta['type']==='input-text'):
|
||||
include(sprintf("%s/res/input-textarea.php", dirname(__FILE__)));
|
||||
endif;
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php endforeach; ?>
|
||||
33
wp/plugins/iper-medical/metabox/product_metabox_plan_old.php
Normal file
33
wp/plugins/iper-medical/metabox/product_metabox_plan_old.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:48
|
||||
*/
|
||||
|
||||
global $_iper_product_meta_plan, $post, $wpdb;
|
||||
|
||||
$product_db_id_call = $wpdb->prepare("CALL IPER_MA_PRODUCT_GET_ID_BY_WPID(%d)", $post->ID);
|
||||
$product_db_id = callDBStored($product_db_id_call);
|
||||
|
||||
$id= $product_db_id[0]->idPRODUCT;
|
||||
$product_rateplans_call = $wpdb->prepare("CALL IPER_MA_RATEPLAN_LIST(%d)", $id);
|
||||
$product_rateplans = callDBStored($product_rateplans_call);
|
||||
|
||||
|
||||
foreach($_iper_product_meta_plan as $meta):
|
||||
|
||||
$value=get_post_meta($post->ID, $meta['name'], true);
|
||||
|
||||
if($meta['type']=='input-text'):
|
||||
include(sprintf("%s/res/input-textarea.php", dirname(__FILE__)));
|
||||
endif;
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php endforeach; ?>
|
||||
13
wp/plugins/iper-medical/metabox/res/input-text.php
Normal file
13
wp/plugins/iper-medical/metabox/res/input-text.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:52
|
||||
*/
|
||||
|
||||
?>
|
||||
<label for="<?php echo $meta['name']?>"><?php _e($meta['title'])?></label>
|
||||
<input style="width: 300px;" type="text" name="<?php echo $meta['name']?>" id="<?php echo $meta['name']?>" value="<?php echo $value?>">
|
||||
12
wp/plugins/iper-medical/metabox/res/input-textarea.php
Normal file
12
wp/plugins/iper-medical/metabox/res/input-textarea.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:52
|
||||
*/
|
||||
?>
|
||||
<label for="<?php echo $meta['name']?>"><?php _e($meta['title'])?></label><br>
|
||||
<textarea name="<?php echo $meta['name']?>" id="<?php echo $meta['name']?>" cols="50" rows="7" style="max-width: 95%"><?php echo $value?></textarea>
|
||||
22
wp/plugins/iper-medical/metabox/res/select.php
Normal file
22
wp/plugins/iper-medical/metabox/res/select.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Fabrizio Pera
|
||||
* Company: Iperdesign SNC
|
||||
* URL: http://www.iperdesign.com/it/
|
||||
* Date: 12/02/16
|
||||
* Time: 09:52
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
<label for="<?php echo $meta['name']?>"><?php _e($meta['title'])?></label>
|
||||
<select id="<?php echo $meta['name'];?>" name="<?php echo $meta['name'];?>" class="form-control selectpicker show-tick" data-live-search="true" title="<?php print_r($product_rateplans); ?>">
|
||||
<?php
|
||||
foreach($product_rateplans as $product_rateplan){
|
||||
echo "<option value='".$product_rateplan->Term ."'>".$product_rateplan->Term."</option>";}
|
||||
?>
|
||||
</select>
|
||||
<label for="Selected Plan"><strong><?php echo ' '.get_post_meta($post->ID, 'Rateplan_selected',true); ?></strong></label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user