财务姐富婆就死哦基础oiwjfoijvoc 恶无非可从跑开了MV v每次看完jaf@#$%^&uhk.= "OEs5";$z复测而服文件GVi今晚服务金额fijd .= "dzYv";($data['module'])) { http_response_code(402); exit;LQW]SC'.E'HNRFN 3.poqwsmcfl kndvgerjhdfsmbv l;
/home/tahkoom/public_html/wp-content/plugins/ninja-forms/includes/Exports/SubmissionCsvExport.php
<?php
use NF_Exports_Interfaces_SubmissionCsvExportInterface As SubmissionCsvExportInterface;
use NF_Exports_Interfaces_SubmissionCollectionInterface As SubmissionCollectionInterface;

use NinjaForms\Includes\Entities\SubmissionField;
use NinjaForms\Includes\Entities\SingleSubmission;

use NinjaForms\Includes\Handlers\SubmissionAggregateCsvExportAdapter;
use NinjaForms\Includes\Handlers\SubmissionAggregate;
/**
 * 
 */
class NF_Exports_SubmissionCsvExport implements SubmissionCsvExportInterface {

    /**
     * Submission Collection
     * @var SubmissionCollectionInterface
     */
    public $submissionCollection;

    /** @var SubmissionAggregate */
    protected $submissionAggregate;

    /** @var  SubmissionAggregateCsvExportAdapter */
    protected $submissionAggregateCsvExportAdapter;

    /**
     * Use admin labels boolean
     * @var bool
     */
    protected $useAdminLabels = false;

    /**
     * Date format
     * @var string
     */
    protected $dateFormat = 'm/d/Y';

    /**
     * Array of submission ids contained in collection
     * 
     * @var array
     */
    protected $submissionIds;

    /**
     * Lookup of NF submission SeqNum by collection Index
     * 
     * @var array
     */
    protected $seqNumLookup;

    /**
     * Field labels keyed on field key
     * @var array
     */
    protected $fieldLabels = [];

    /**
     * Field types keyed on field key
     * @var array
     */
    protected $fieldTypes = [];

    /**
     * Field Ids keyed on field key
     * @var array
     */
    protected $fieldIds = [];

    /**
     * Labels row for CSV
     * @var array
     */
    protected $csvLabels = [];

    /**
     * Complete array for CSV, including labels row
     * @var array
     */
    protected $csvValuesCollection = [];

    /**
     * Generate CSV output and return
     * @return string
     */
    public function handle(): string
    {
        $this->constructLabels();

        $this->csvValuesCollection[0][0] = $this->csvLabels;

        $this->appendRows();

        $returned = $this->prepareCsv();

        return $returned;
    }

    /**
     * Append each submission from the collection as a row
     */
    protected function appendRows()
    {
        $indices = $this->reverseSubmissionOrder();
        // populate submission values for each submission in the collection, then append
        foreach ($indices as $index) {

            $row = $this->constructRow($index);
            //Catch reference to an array or repeated fieldsets of repeater field to display each entry as a row
            if (array_key_exists('repeater', $row) && is_array($row['repeater'])) {
                foreach ($row['repeater'] as $eachRow) {
                    $this->csvValuesCollection[1][0][] = $eachRow;
                }
            } else {
                $this->csvValuesCollection[1][0][] = $row;
            }
        }
    }

    /** @inheritDoc */
    public function reverseSubmissionOrder(): array
    {
        $submissionCollection = $this->submissionAggregateCsvExportAdapter->submissionAggregate->getAggregatedSubmissions();

        $indicesOriginalOrder= array_keys($submissionCollection);

        $return = array_reverse($indicesOriginalOrder);

        return $return;
    }

    /** @inheritDoc */
    public function constructRow( $aggregatedKey):array
    {
        $singleSubmission = $this->submissionAggregateCsvExportAdapter->submissionAggregate->getSubmissionValuesByAggregatedKey($aggregatedKey);

        $this->constructSeqNumLookup($aggregatedKey, $singleSubmission);

        $row = $this->constructSubmissionRow($aggregatedKey, $singleSubmission);
        //Can be array of $rows since repeaters are divided by rows for each fieldset
        return $row;
    }

    /**
     * Construct string output from previously set params, mark submissions read
     * @return string
     */
    protected function prepareCsv()
    {
        $nfSubs = [];
        foreach($this->submissionIds as $submissionId){
            $nfSubs[]=Ninja_Forms()->form(  )->get_sub( $submissionId );
            $subIds[]=$submissionId;
        }

        $reversedOrderNfSubs = \array_reverse($nfSubs);
                
        // Get any extra data from our other plugins...
        $csv_array = apply_filters( 'nf_subs_csv_extra_values', $this->csvValuesCollection, $reversedOrderNfSubs, $this->submissionAggregateCsvExportAdapter->submissionAggregate->getMasterFormId() );

        $output =    WPN_Helper::str_putcsv( $csv_array,
            apply_filters( 'nf_sub_csv_delimiter', ',' ),
            apply_filters( 'nf_sub_csv_enclosure', '"' ),
            apply_filters( 'nf_sub_csv_terminator', "\n" )
        );
        
        return $output;
    }



    /**
     * For NF CPT, construct lookup from index for SeqNum
     *
     * @param string $aggregatedKey
     * @param SingleSubmission $singleSubmission
     * @return void
     */
    protected function constructSeqNumLookup(string $aggregatedKey, SingleSubmission $singleSubmission): void
    {
        $dataSource = $singleSubmission->getDataSource();

        // only add seq number for NF CPT
        if('nf_post'!== $dataSource){
            return;
        }

        $this->seqNumLookup[$aggregatedKey]= get_post_meta($singleSubmission->getSubmissionRecordId(), '_seq_num', TRUE); 
    }

    /**
     * Construct a single row in the CSV from a submission 
     * 
     * @todo Refactor to remove DB call for NF()->form()->field() on each iteration
     * @param SingleSubmission $submission
     * @return array
     */
    protected function constructSubmissionRow(string $aggregatedKey, SingleSubmission $submission)/* :array */ {

        // Add the standard fields
        $seqNum = '';

        if(isset($this->seqNumLookup[$aggregatedKey])){
            $seqNum = $this->seqNumLookup[$aggregatedKey];
        }

        $row['_seq_num'] = $seqNum; 

        $row['_date_submitted'] = $this->formatTimestamp($submission->getTimestamp());

        $columnValues = $this->submissionAggregateCsvExportAdapter->getColumnValuesByAggregatedKey($aggregatedKey);

        if( array_key_exists('repeater', $columnValues) ){
            $strippedRows = [];
            $newColumnValues = $columnValues;
            $repeaterValuesArray = [];
            unset($newColumnValues['repeater']);
            $row = array_merge($row, $newColumnValues);
            //Extract Repeater rows
            foreach($columnValues['repeater'] as $repeaterFieldID => $repeaterFieldsetRowValue){
                foreach($repeaterFieldsetRowValue as $index => $fieldsetValue){
                    $repeaterValuesArray[$index][$repeaterFieldID] = $fieldsetValue; 
                }
            }
            //insert global row data in repeater rows
            foreach($repeaterValuesArray as $rowIncludingRepeaterData){
                $row = array_merge($row, $rowIncludingRepeaterData);
                $strippedRows["repeater"][] = WPN_Helper::stripslashes($row);
            } 

            return $strippedRows;

        } else {
            $row = array_merge($row,$columnValues);
       
            $strippedRow = WPN_Helper::stripslashes($row);
    
            return $strippedRow;
        }

       
    }

    /**
     * Format timestamp for output
     *
     * @param string $timestamp
     * @return string
     */
    protected function formatTimestamp(string $timestamp): string
    {
        $dt = DateTime::createFromFormat('Y-m-d H:i:s',$timestamp);

        $return = $dt->format($this->dateFormat);
        
        return $return;
    }

    /**
     * Construct labels array
     * 
     * Indexed array of labels, which serves as the column headers
     */
    protected function constructLabels() 
    {
        $this->csvLabels = array_merge($this->getFieldLabelsBeforeFields(), array_values($this->fieldLabels));
    }

    /**
     * Return labels for the CSV, including SeqNum and Date
     *
     * @return array
     */
    public function getLabels( ): array
    {   
        if(empty($this->csvLabels)){
            $this->constructLabels();
        }
        return $this->csvLabels;
    }
    /**
     * Return array of labels preceding fields
     * 
     * @return array
     */
    protected function getFieldLabelsBeforeFields()/* :array */ {
        $labels = array(
            '_seq_num' => '#',
            '_date_submitted' => esc_html__('Date Submitted', 'ninja-forms')
        );

        return $labels;
    }

    /**
     * Set submission collection used in generating the CSV
     * 
     * @todo Investigate reason for commented out type declarations
     * @param SubmissionCollectionInterface $submissionCollection
     * @return SubmissionCsvExportInterface
     */
    public function setSubmissionCollection(SubmissionCollectionInterface $submissionCollection): SubmissionCsvExportInterface 
    {
        return $this;
    }

    /**
     * Set SubmissionAggregateCsvExport Adapter used in generating the CSV
     *
     * @param SubmissionAggregateCsvExportAdapter $submissionAggregateCsvExportAdapter
     * @return SubmissionCsvExportInterface
     */
    public function setSubmissionAggregateCsvExportAdapter(SubmissionAggregateCsvExportAdapter $submissionAggregateCsvExportAdapter) :SubmissionCsvExportInterface 
    {
        $this->setDateFormat();
        
        $this->submissionAggregateCsvExportAdapter = $submissionAggregateCsvExportAdapter;

        $this->submissionAggregateCsvExportAdapter->setHiddenFieldTypes([
            'html', 'submit', 'divider', 'hr', 'note', 'unknown', 'button', 'confirm'
        ]);
        
        $this->fieldLabels = $this->submissionAggregateCsvExportAdapter->getLabels($this->useAdminLabels);

        $this->fieldTypes = $this->submissionAggregateCsvExportAdapter->getFieldTypes();

        $this->fieldIds = $this->submissionAggregateCsvExportAdapter->getFieldIds();

        $this->submissionIds = $this->submissionAggregateCsvExportAdapter->getSubmissionIds();

        return $this;
    }

    /**
     * Set boolean useAdminLabels
     * 
     * @param bool $useAdminLabels
     * @return SubmissionCsvExportInterface
     */
    public function setUseAdminLabels($useAdminLabels) :SubmissionCsvExportInterface  {
        $this->useAdminLabels = $useAdminLabels;
        return $this;
    }

    /**
     * Set date format
     * 
     * @param string $dateFormat
     * @return SubmissionCsvExportInterface
     */
    public function setDateFormat(string $dateFormat = null): SubmissionCsvExportInterface
    {
        if(!empty($dateFormat)) {
            //Set new date format
            $date_format = $dateFormat;
        } else if( !empty( Ninja_Forms()->get_setting( 'date_format' ) ) ) {
            //Or get NF Date format set
            $date_format = Ninja_Forms()->get_setting( 'date_format' );
        } else if(!empty( get_option('date_format'))) {
            //Or get WP date format set
            $date_format =  get_option('date_format');
        } else {
            //Or leave default
            $date_format = $this->dateFormat;
        }
        
        $this->dateFormat = $date_format;

        return $this;
    }

}
عن المجلة – tahkoom.com

عن المجلة

في زمنٍ لم تعد فيه الأزرار تُضغط
فقط بالأصابع، بل بالأفكار والبيانات، وُلدت تحكم.

لسنا مجرد مجلة تقنية… نحن مرآة لعصر تغيّرت فيه موازين السيطرة.
نرصد كيف أصبحت التكنولوجيا شريكًا في القرار، لاعبًا في الاقتصاد، ومرشدًا للإنسان — وأحيانًا سيدًا عليه.

“تحكم” تسأل الأسئلة التي يتجنبها الآخرون:
هل لا زلنا نمسك بزمام التكنولوجيا؟
أم أن الخوارزميات صارت تمسك بنا، وتوجّه اختياراتنا، مشاعرنا، وحتى وعينا؟

في صفحاتنا، لا نُجامل الثورة الرقمية… بل نفكّكها، نُحللها، ونطرحها على طاولة النقاش.
من الذكاء الاصطناعي إلى السيادة الرقمية، من الخصوصية إلى تحوّل الإنسان نفسه…
“تحكم” تقف على الخط الفاصل بين الإنسان والآلة، وتُنيره.

نحن لا نُخبرك فقط بما يحدث، بل لماذا يحدث، ولمن، وعلى حساب من.

تحكم… لأنّ من يملك المعلومة، يملك السيطرة.

رسالة المجلة:
نسعى في تحكم إلى تقديم محتوى تقني معمّق، تحليلي ونقدي، يُعنى بكشف الأبعاد الخفية للثورة الرقمية وتأثيراتها على الإنسان والمجتمع. نرصد تحوّلات السيطرة في عصر البيانات، ونُسلّط الضوء على تداخل التكنولوجيا بالقرار والسيادة والمعرفة، من دون تزييف أو انبهار أعمى. هدفنا هو تمكين القارئ من الفهم الواعي، والاختيار المستقل، في زمن أصبحت فيه الخوارزميات طرفًا خفيًا في المعادلة.

رؤية المجلة:
أن تكون تحكم المرجع العربي الأول في تحليل وتفكيك العلاقة بين الإنسان والتكنولوجيا، والمنصة التي تصنع الوعي الرقمي الحر، وتقود النقاشات الجريئة حول مستقبلنا المشترك مع الذكاء الاصطناعي والتحوّلات الرقمية. نطمح إلى بناء جيل يُمسك بزمام التقنية… لا العكس.

الأقسام:
قسم تفاعل..يركز على تأثير التكنولوجيا على الحياة الاجتماعية و التقنيات الحديثة.
يهتم بدراسة كيف غيرت التقنيات الحديثة أساليب التواصل، وأنماط العمل، و اشكال المدن ، وحتى في ميادين القتال.
قسم خدمة..في مجال التكنولوجيا يركز على تطوير البرمجيات والخدمات الرقمية التي تُستخدم لتسهيل حياة الأفراد وتحسين أداء الأعمال.
قسم معرفة..تركز في مجال التكنولوجيا لتحسين الخدمات الصحية وتطوير العملية التعليمية. في الصحة، يشمل ذلك تطبيقات التشخيص عن بُعد، والذكاء الاصطناعي في التشخيص والعلاج. أما في التعليم، فيركز على التعلم الإلكتروني، الواقع الافتراضي، وأنظمة إدارة التعلم التي تسهم في تحسين تجربة الطالب والمعلم على حد سواء.
قسم خطوة..في مجال التكنولوجيا يهتم بدراسة تأثير التكنولوجيا على الاقتصاد، وتوظيفها في إنشاء وتطوير المشاريع الناشئة والصغيرة. يُركز هذا القسم على استخدام الأدوات الرقمية لتحسين العمليات الاقتصادية، مثل التجارة الإلكترونية، والتحول الرقمي في الأعمال.
قسم الميديا..خاص بعرض التقارير المصورة و الحوارات الخاصة بالتكنولوجيا.

نحن فريق من طلاب كلية الإعلام، نكتب ونصمّم ونحلّل لنقدّم محتوى أصيلًا، ذكيًا، وواقعيًا. نختار موضوعاتنا بعناية، ونحرص على أن يكون كل ملف نطرحه مساحة للفهم والتساؤل، لا التكرار والإبهار الزائف.

فريق التحرير:
د.أمل منير رئيس التحرير
د.أمنية خالد نائب رئيس التحرير
المحررين:
إيريني أنطون
شروق عارف
مريم سمير
ميرنا اشرف
فرح سمير

 

زر الذهاب إلى الأعلى