first commit
This commit is contained in:
30
functions/xajax-analysis.php
Normal file
30
functions/xajax-analysis.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
global $xajax;
|
||||
$xajax -> register( XAJAX_FUNCTION, 'deleteAnalysisPhrase' );
|
||||
$xajax -> register( XAJAX_FUNCTION, 'setPrice' );
|
||||
$xajax -> register( XAJAX_FUNCTION, 'deleteAnalysisSite' );
|
||||
|
||||
function deleteAnalysisSite( $id, $phrase_id, $category_id )
|
||||
{
|
||||
if ( \factory\Analysis::deleteAnalysisLink( $id ) )
|
||||
\S::alert( 'Wybrany link został usunięty.' );
|
||||
|
||||
$objResponse = new xajaxResponse;
|
||||
$objResponse -> script( '$( "#site_' . $id . '" ).remove();' );
|
||||
return $objResponse;
|
||||
}
|
||||
|
||||
function setPrice( $id, $price )
|
||||
{
|
||||
\factory\Analysis::setPrice( $id, $price );
|
||||
}
|
||||
|
||||
function deleteAnalysisPhrase( $id, $category_id )
|
||||
{
|
||||
if ( \factory\Analysis::deletePhrase( $id ) )
|
||||
\S::alert( 'Wybrana fraza została usunięta.' );
|
||||
|
||||
$objResponse = new xajaxResponse();
|
||||
$objResponse -> script( 'document.location.href="./?rw=show_phrases&id=' . $category_id . '";' );
|
||||
return $objResponse;
|
||||
}
|
||||
Reference in New Issue
Block a user