Exemple #1
0
<?php
require_once dirname( __FILE__ ) . '/usquare_functions.php';
require_once dirname( __FILE__ ) . '/usquare_image_functions.php';

$fonts_main_array = usquare_get_font_array($this->settings, $this->path);
$fonts_assoc_array = $fonts_main_array['assoc'];
$fonts_num_array = $fonts_main_array['num'];

?>

<div class="wrap">
	<?php 
	$title = '';
	require_once dirname( __FILE__ ) . '/usquare_settings.php';
	$default_settings=$settings;
	global $wpdb;
	if(isset($_GET['id'])) {
		global $wpdb;
		$usquare = $wpdb->get_results('SELECT * FROM ' . $wpdb->base_prefix . 'usquare WHERE id='.$_GET['id']);
		$usquare = $usquare[0];
		$pageName = 'Edit uSquare';
	}
	else {
		$pageName = 'New uSquare';
		$usquare = new stdClass();
		$usquare->name='Enter here a name for this uSquare';
		$usquare->settings='';
		$usquare->items='';
	}
	$title = $usquare->name;
	$title = str_replace('"', '&quot;', $title);
Exemple #2
0
	function ajax_put_in_element() {
		require_once($this->path . '/pages/usquare_functions.php');
		if ($_POST['key']=='get_font_variants') {
			$fonts_array = usquare_get_font_array($this->settings, $this->path);
			$fonts_assoc_array = $fonts_array['assoc'];
			$variant_array = usquare_generate_font_variants_array($fonts_assoc_array, $_POST['val']);
			echo usquare_generate_font_variants_list($variant_array);
		}
		die();
	}