Example #1
0
 public static function getInstance()
 {
     if (self::$m_DataAccess == null) {
         self::$m_DataAccess = new DataAccessMySQLi();
     }
     return self::$m_DataAccess;
 }
Example #2
0
 public static function doAutoPings($date)
 {
     $startTime = microtime(true);
     $lasModified = dataAccess::getLastModified($date);
     $lastPing = get_option('xmsg_LastPing', 0);
     // using UNIX times
     if ($lastPing < $lasModified) {
         self::doPing("Auto");
         update_option('xmsg_LastPing', $lasModified);
     } else {
         core::statusUpdate("Auto ping skipped. No modified posts");
     }
     $time = core::getTimeBand($startTime);
     core::updateStatistics("Ping", "AutoPing", $time);
 }
Example #3
0
    static function render($post)
    {
        $settings = dataAccess::getMetaItem($post->ID, "post");
        wp_nonce_field(basename(__FILE__), 'wpXSG_meta_nonce');
        ?>
 
		<p><strong>Sitemap inclusion</strong></p>
		<select  name="wpXSG-Exclude" id="wpXSG-Exclude" ></select>
		<label for="wpXSG-Exclude"></label>
		
		<p><strong>Relative priority</strong></p>
		<select  name="wpXSG-Priority" id="wpXSG-Priority" ></select>
 
		<p><strong>Update frequency</strong></p>
		<select  name="wpXSG-Frequency" id="wpXSG-Frequency" ></select>
	


<script type="text/javascript" src="<?php 
        echo myPluginPath();
        ?>
scripts.js"></script>
<script>
	populate("wpXSG-Exclude" ,excludeSelect, <?php 
        echo $settings->exclude;
        ?>
);
	populate("wpXSG-Priority" ,prioritySelect, <?php 
        echo $settings->priority;
        ?>
);
	populate("wpXSG-Frequency" ,frequencySelect, <?php 
        echo $settings->frequency;
        ?>
);
	 
</script>
		<?php 
    }
<?php

include_once "db.php";
include_once "dataAccess.php";
$test = new dataAccess($db);
$org_mon_id = 'OM2';
$don_date = "1995-06-07";
$descritpiton = "test";
$org_don_id = "O1";
$test->insertOMiscDonation($org_mon_id, $don_date, $descritpiton, $org_don_id, null);
Example #5
0
    static function renderEdit($tag)
    {
        $term_id = $tag->term_id;
        self::addHooks();
        $settings = dataAccess::getMetaItem($term_id, "taxonomy");
        wp_nonce_field(basename(__FILE__), 'wpXSG_meta_nonce');
        ?>

		
		<h3>Sitemap settings : 	 </h3>
	


		
		<table class="form-table">
		<tbody><tr class="form-field form-required term-name-wrap">
			<th scope="row"><label for="name">Sitemap inclusion</label></th>
			<td>
				<select  name="wpXSG-Exclude" id="wpXSG-Exclude" ></select>
				<p> Exclude this category/tag from your sitemap.</p>
			</td>
		</tr>
		<tr class="form-field term-slug-wrap">
			<th scope="row"><label for="slug">Relative priority</label></th>
			<td>
				<select  name="wpXSG-Priority" id="wpXSG-Priority" ></select>
				<p>Relative priority for this category/tag and related posts.</p>
			</td>
		</tr>
		<tr class="form-field term-description-wrap">
			<th scope="row"><label for="description">Update frequency</label></th>
			<td>
			<select  name="wpXSG-Frequency" id="wpXSG-Frequency" ></select>
			<p>Sitemap update frequency for this category/tag.</p>
			</td>
		</tr>
		<tr class="form-field term-description-wrap">
			<th scope="row"><label for="description">Post inheritance</label></th>
			<td>
			<select  name="wpXSG-Inherit" id="wpXSG-Inherit" ></select>
			<p>Immediate child posts/pages inherit these settings.</p>
			</td>
		</tr>
		</tbody></table>

<script type="text/javascript" src="<?php 
        echo myPluginPath();
        ?>
scripts.js"></script>
<script>
	populate("wpXSG-Exclude" ,excludeSelect, <?php 
        echo $settings->exclude;
        ?>
);
	populate("wpXSG-Priority" ,prioritySelect, <?php 
        echo $settings->priority;
        ?>
);
	populate("wpXSG-Frequency" ,frequencySelect, <?php 
        echo $settings->frequency;
        ?>
);
	 populate("wpXSG-Inherit" ,inheritSelect, <?php 
        echo $settings->inherit;
        ?>
);
</script>


		<?php 
    }
<?php

include_once "db.php";
include "dataAccess.php";
$test = new dataAccess($db);
$String = $test->generateDonorId();
$return = $String[0];
print $return[0];
Example #7
0
function ReplacementDelete()
{
    dataAccess::RUNQUERY("delete from wfm_replacement where RowID=" . $_POST["RowID"]);
    dataAccess::AUDIT("حذف ردیف جایگزینی برای فرد[" . $_POST["src_PersonID"] . "]");
    echo "true";
    die;
}
Example #8
0
$col->width = 30;
//---------------------------
$dg->addButton("Add", "ایجاد", "add", "AddingAction");
$dg->height = 400;
$dg->title = "فرم های ایجاد شده";
$dg->width = 700;
$dg->DefaultSortField = "regDate";
$dg->DefaultSortDir = "asc";
$dg->makeGrid();
//.....................................................
$drp_forms = FormGenerator::Drp_AllForms("FormsList", "---", "changeForm");
//.....................................................
?>
<script type="text/javascript">
var forms_EXTData = <?php 
echo common_component::PHPArray_to_JSArray(dataAccess::RUNQUERY("select * from fm_forms order by FormName"), "FormName", "FormID", "reference");
?>
;

//-------------------------------------------------------------------
BasisData.DevotionStore = <?php 
echo dataReader::MakeStoreObject("../devotions/dvt.data.php?task=select", "'dvt01','dvt2','dvt3','dvt10'");
?>
//-----------------------------------------------------------------
BasisData.StateStore = <?php 
echo dataReader::MakeStoreObject("../states/states.data.php?task=select", "'sta02','sta2','sta5'");
?>
//-------------------------------------------------------------------
function unloadFn()
{
	if(win)
Example #9
0
function elementDelete()
{
    FormElements::delete("ElementID=" . $_POST["ElementID"]);
    dataAccess::AUDIT("حذف جزء قالب فرم با عنوان [" . $_POST["ElementTitle"] . "]");
    echo "true";
    die;
}
Example #10
0
 public static function updateStatistics($eventCategory, $eventAction, $timeBand)
 {
     $globalSettings = get_option("wpXSG_global", new globalSettings());
     if ($globalSettings->sendStats) {
         global $wp_version;
         $postCountLabel = dataAccess::getPostCountBand();
         $postData = array('v' => 1, 'tid' => 'UA-679276-7', 'cid' => get_option('wpXSG_MapId'), 't' => 'event', 'ec' => $eventCategory, 'ea' => $eventAction, 'ev' => 1, 'cd1' => get_bloginfo('url'), 'cd2' => $wp_version, 'cd3' => self::pluginVersion(), 'cd4' => PHP_VERSION, 'cd5' => $postCountLabel, 'cd6' => $timeBand);
         $url = 'https://ssl.google-analytics.com/collect';
         try {
             $response = wp_remote_post($url, array('method' => 'POST', 'body' => $postData));
         } catch (Exception $e) {
             statusUpdate("sendStats : " . $e->getMessage());
         }
     }
 }
Example #11
0
<?php

//---------------------------
// programmer:	Jafarkhani
// create Date:	90.04
//---------------------------
require_once 'header.php';
require_once 'rpt.data.php';
$obj = new ReportGenerator($_GET["Q0"]);
$query = stripcslashes($obj->TotalQuery);
$query .= " limit 1";
$temp = dataAccess::RUNQUERY($query);
if (count($query) == 0) {
    echo "گزارش مورد نظر فاقد اطلاعات می باشد. برای ایجاد فایل باید گزارش شامل حداقل یک رکورد باشد.";
    die;
}
$dataKeys = array_keys($temp[0]);
$output = "<tr>";
for ($k = 1, $i = 1, $j = 0; $i < count($dataKeys); $i = $i + 2, $j++, $k++) {
    $output .= "<td class='code' align='center' height='21px'>#" . $k . "#</td>";
    $output .= "<td style='padding: 4px'>" . $dataKeys[$i] . "</td>";
    if ($j == 2) {
        $output .= "</tr><tr>";
        $j = -1;
    }
}
if ($obj->FileType != "") {
    $file = file_get_contents("../../" . ReportImagePath . "Report" . $obj->ReportID . "." . $obj->FileType);
}
?>
<script type="text/javascript">
<?php

/**
 * Created by PhpStorm.
 * User: jordan
 * Date: 11/22/15
 * Time: 8:54 PM
 */
include_once 'db.php';
include "dataAcess.php";
$test = new dataAccess($db);
$org_name = "functionTest";
$org_address = 'AddressTest';
$org_id = "O12";
$test->insertOrganization($org_name, $org_address, $org_id);
Example #13
0
 function addHomePage($sitemapDefaults)
 {
     $defaults = $sitemapDefaults->homepage;
     $pageUrl = get_bloginfo('url');
     $exlcude = $defaults->exclude;
     if ($exlcude != 2) {
         if ($this->isIncluded($pageUrl, $sitemapDefaults->excludeRules)) {
             $url = new mapItem();
             $url->location = $pageUrl;
             $url->title = "Home page";
             $url->description = get_option('blogdescription');
             $url->modified = dataAccess::getLastModified();
             $url->priority = $defaults->priority;
             $url->frequency = $defaults->frequency;
             $this->addUrls(0, $url);
         }
     }
 }