Example #1
0
/**
	* Function to add/modify cc_did_use and cc_did_destination if records existe
	*
	*/
	static public function is_did_in_use()
	{
		$FormHandler = FormHandler::GetInstance();
		$processed = $FormHandler->getProcessed();
		$did_id=$processed['id'];
		$instance_did_use_table = new Table();
		$QUERY_DID="select id_cc_card from cc_did_use where id_did ='".$did_id."' and releasedate IS NULL and activated = 1";
		$row= $instance_did_use_table -> SQLexec ($FormHandler->DBHandle,$QUERY_DID, 1);
		if ((isset($row[0][0])) && (strlen($row[0][0]) > 0))
			$FormHandler -> FG_INTRO_TEXT_ASK_DELETION = gettext ("This did is in use by customer id:".$row[0][0].", If you really want remove this ". $FormHandler -> FG_INSTANCE_NAME .", click on the delete button.");
	}