财务姐富婆就死哦基础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/Admin/UserDataRequests.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

class NF_Admin_UserDataRequests {

	/**
	 * @var array
	 */
	protected $ignored_field_types = array (
		'html',
		'submit',
		'hr',
		'recaptcha',
		'spam',
		'creditcard',
		'creditcardcvc',
		'creditcardexpiration',
		'creditcardfullname',
		'creditcardnumber',
		'creditcardzip'
	);

	/**
	 * @var WP_User
	 */
	protected $user;

	/**
	 * @var string
	 */
	protected $request_email;

	/** Class constructor */
	public function __construct() {
		add_filter( 'wp_privacy_personal_data_exporters', array(
			$this, 'plugin_register_exporters' ) );

		add_filter( 'wp_privacy_personal_data_erasers', array(
			$this, 'plugin_register_erasers' ) );
	}

	/**
	 * Register exporter for Plugin user data.
	 *
	 * @param array $exporters
	 *
	 * @return array
	 */
	function plugin_register_exporters( $exporters = array() ) {
		$exporters[] = array(
			'exporter_friendly_name' => esc_html__( 'Ninja Forms Submission Data', 'ninja-forms' ),
			'callback'               => array( $this, 'plugin_user_data_exporter' ),
		);
		return $exporters;
	}

	/**
	 * Register eraser for Plugin user data.
	 *
	 * @param array $erasers
	 *
	 * @return array
	 */
	function plugin_register_erasers( $erasers = array() ) {
		$erasers[] = array(
			'eraser_friendly_name' => esc_html__( 'Ninja Forms Submissions Data', 'ninja-forms' ),
			'callback'               => array( $this, 'plugin_user_data_eraser' ),
		);
		return $erasers;
	}

	/**
	 * Adds Ninja Forms Submission data to the default HTML export file that
	 * WordPress creates on converted request
	 *
	 * @param $email_address
	 * @param int $page
	 *
	 * @return array
	 */
	function plugin_user_data_exporter( $email_address, $page = 1 ) {
		$export_items = array();

		// get the user
		$this->user = get_user_by( 'email', $email_address );
		$this->request_email = $email_address;

		if( $this->user && $this->user->ID ) {
			$item_id = "ninja-forms-" . $this->user->ID;
		} else {
			$item_id = "ninja-forms";
		}

		$group_id = 'ninja-forms';

		$group_label = esc_html__( 'Ninja Forms Submission Data', 'ninja-forms' );

		$subs = $this->get_related_subs( $email_address );

		foreach($subs as $sub) {
			$data = array();
			// get the field values from postmeta
			$sub_meta = get_post_meta( $sub->ID );

			// make sure we have a form submission
			if ( isset( $sub_meta[ '_form_id' ] ) ) {
				$form = Ninja_Forms()->form( $sub_meta[ '_form_id' ][ 0 ] )
                    ->get();
				$fields = Ninja_Forms()->form( $sub_meta[ '_form_id' ][ 0 ] )
					->get_fields();

				foreach ( $fields as $field_id => $field ) {
					// we don't care about submit, hr, divider, html fields
					if ( ! in_array( $field->get_setting( 'type' ),
							$this->ignored_field_types ) ) {
						// make sure there is a value
						if ( isset( $sub_meta[ '_field_' . $field_id ] ) ) {

							//multi-value fields may need to be unserialized
							if( in_array( $field->get_setting( 'type' ),
								array( 'listcheckbox', 'listmultiselect' ) ) ){

								//implode the unserialized array
								$value = implode( ',', maybe_unserialize(
									$sub_meta[	'_field_' . $field_id ][ 0 ] ) );
							} else {
								$value = $sub_meta[	'_field_' . $field_id ][ 0 ];
							}
							// Add label/value pairs to data array
							$data[] = array(
								'name'  => $field->get_setting( 'label' ),
								'value' => $value
							);
						}
					}
				}

				// Add this group of items to the exporters data array.
				$export_items[] = array(
					'group_id'    => $group_id . '-' . $sub->ID,
					'group_label' => $group_label . '-' .
					                 $form->get_setting( 'title' ),
					'item_id'     => $item_id . '-' . $sub->ID,
					'data'        => $data,
				);
			}
		}
		// Returns an array of exported items for this pass, but also a boolean whether this exporter is finished.
		//If not it will be called again with $page increased by 1.
		return array(
			'data' => $export_items,
			'done' => true,
		);
	}

	/**
	 * Eraser for Plugin user data. This will completely erase all Ninja Form
	 * submission data for the user when converted by the admin.
	 *
	 * @param $email_address
	 * @param int $page
	 *
	 * @return array
	 */
	function plugin_user_data_eraser( $email_address, $page = 1 ) {

		if ( empty( $email_address ) ) {
			return array(
				'items_removed'  => false,
				'items_retained' => false,
				'messages'       => array(),
				'done'           => true,
			);
		}

		// get the user
		$this->user = get_user_by( 'email', $email_address );
		$this->request_email = $email_address;

		if (!isset($_REQUEST['id']) || empty($_REQUEST['id'])) {
			return array();
		}
		$request_id = absint($_REQUEST[ 'id' ]);

		$make_anonymous = get_post_meta( $request_id, 'nf_anonymize_data',
			true);

		$messages = array();
		$items_removed  = false;
		$items_retained = false;

		$subs = $this->get_related_subs( $email_address );

		if( 0 < sizeof( $subs ) ) {
			$items_removed = true;
		}

		if( '1' != $make_anonymous ) {
			$this->delete_submissions( $subs );
			$items_removed = true;
		} else {
			$this->anonymize_submissions( $subs, $email_address );
		}

		/**
		 * Returns an array of exported items for this pass, but also a boolean
		 * whether this exporter is finished.
		 * If not it will be called again with $page increased by 1.
		 * */
		return array(
			'items_removed'  => $items_removed,
			'items_retained' => $items_retained,
			'messages'       => $messages,
			'done'           => true,
		);
	}

	/**
	 * Retrieve all submissions related(by author id or email address) to the
	 * given email address
	 *
	 * @param $email_address
	 *
	 * @return array
	 */
	private function get_related_subs( $email_address ) {

		// array if subs where user is author
		$logged_in_subs = array();

		if ( $this->user && $this->user->ID ) {
			// get submission ids the old-fashioned way if user is author
			$logged_in_subs = get_posts(
				array(
					'author'         => $this->user->ID,
					'post_type'      => 'nf_sub',
					'posts_per_page' => - 1,
					'fields'         => 'ids'
				)
			);
		}

		// get submission ids where email address is a field value
		$anon_sub_ids = $this->get_subs_by_email( $email_address );

		// merge anonymous and author submissions ids and get unique
		$sub_ids = array_unique( array_merge( $logged_in_subs, $anon_sub_ids ) );

		// return empty array if $sub_ids is empty
		if( 1 > count( $sub_ids ) ) {
			return array();
		}

		// get post objects related to the email address
		return get_posts(
			array(
				'include' => implode(',', $sub_ids),
				'post_type' => 'nf_sub',
				'posts_per_page' => -1,
			)
		);
	}

	/**
	 * Get submission ids where the submission has the give email address as
	 * data
	 *
	 * @param $email_address
	 *
	 * @return array
	 */
	private function get_subs_by_email( $email_address ) {
		global $wpdb;

		// query to find any submission with our requester's email as value
		$anon_subs_query = $wpdb->prepare( "SELECT DISTINCT(m.post_id) FROM `{$wpdb->prefix}postmeta` m
				JOIN `{$wpdb->prefix}posts` p ON p.id = m.post_id
				WHERE m.meta_value = %s
				AND p.post_type = 'nf_sub'",
			$email_address );

		$anon_subs = $wpdb->get_results( $anon_subs_query );

		$sub_id_array = array();
		// let's get the integer value of those submission ids
		if( 0 < sizeof( $anon_subs ) ) {
			foreach( $anon_subs as $sub ) {
				$sub_id_array[] = intval( $sub->post_id );
			}
		}

		return $sub_id_array;
	}

	/**
	 * Delete Submissions
	 *
	 * @param $subs
	 */
	private function delete_submissions( $subs ) {
		if( 0 < sizeof( $subs ) ) {
			// iterate and delete the submissions
			foreach($subs as $sub) {
				wp_delete_post( $sub->ID, true );
			}
		}
	}

	/**
	 * This will (redact) personal data and anonymize submissions
	 *
	 * @param $subs
	 */
	private function anonymize_submissions( $subs ) {
		$form_id_array = array();
		$submitter_field = '';

		if( 0 < sizeof( $subs ) ) {
			$anonymize_data = false;
			foreach( $subs as $sub ) {
				// get the form id
				$form_id = get_post_meta( $sub->ID, '_form_id', true );

				$form = Ninja_Forms()->form( $form_id );

				/*
				 * Do we have a use, if so does the post(submission) author
				 * match the user. If so, then anonymize
				 */
				if( $this->user && $this->user->ID
				    && $sub->post_author == $this->user->ID ) {
					$anonymize_data = true;
				} else {
					/*
					 * Otherwise, does the submitter email for the submission
					 *  equal the email for the request
					 */
					$form_submitter_email = '';
					if( in_array( $form_id, array_keys( $form_id_array ) ) ) {
						/*
						 * if we already have the submitter field key, no
						 * need to iterate over the actions again
						 */
						$submitter_field = $form_id_array[ $form_id ];
					} else {
						$actions = $form->get_actions();
						if ( 0 < sizeof( $actions ) ) {
							foreach ( $actions as $action ) {
								// we only care about the save action
								if ( 'save' == $action->get_setting( 'type' )
								     && null != $action->get_setting( 'submitter_email' )
								     && '' != $action->get_setting( 'submitter_email' ) ) {
									// get the submitter field
									$submitter_field = $action->get_setting( 'submitter_email' );
									/*
									 * Add the form id and submitter field to
									 *  this array so we don't have to load
									 * the form again if we have multiple
									 * submissions for the same form
									 */
									$form_id_array[ $form_id ] = $submitter_field;
									break;
								}
							}
						}
					}

					/*
					 * If the submitter field is not empty, then let's
					 * get the value given in the form submission for
					 * that field
					 */
					if ( '' != $submitter_field ) {
						$fields = $form->get_fields();
						foreach ( $fields as $field ) {
							$key = $field->get_setting( 'key' );
							// we only care about email fields
							if ( 'email' == $field->get_setting( 'type' )
							     && $submitter_field == $key ) {
								// if we have a match, get the value
								$form_submitter_email = get_post_meta(
									$sub->ID,
									'_field_' . $field->get_id(),
									true );
								break;
							}
						}
					}
					// if form submitter email matches requester's email
					if( $form_submitter_email === $this->request_email ) {
						$anonymize_data = true;
					}
				}

				if( $anonymize_data ) {
					// anonymize the actual submitted for values
					$this->anonymize_fields($sub, $form->get_fields() );
				}
			}
		}
	}

	/**
	 * This will anonymize personally identifiable fields and anonymize
	 * submissions submitted by the user with the provided email address
	 *
	 * @param $sub
	 * @param $fields
	 */
	private function anonymize_fields( $sub, $fields ) {
		foreach( $fields as $field ) {
			$type = $field->get_setting( 'type' );

			// ignore fields that aren't saved
			if( ! in_array( $type, $this->ignored_field_types ) ) {
				$is_personal = $field->get_setting( 'personally_identifiable' );

				/**
				 * If this is personally identifiable, redact it
				 */
				if( null != $is_personal && '1' == $is_personal ) {
					$field_id = $field->get_id();

					// make sure we have that field saved.
					$field_value = get_post_meta(
						$sub->ID,
						'_field_' . $field_id,
						true
					);
					if( '' != $field_value ) {
						update_post_meta(
							$sub->ID,
							'_field_' . $field_id,
							'(redacted)'
						);
					}
				}
			}
		}

		// Remove the author id if the the email address belongs to the author
		if( $this->user && $this->user->ID &&
		    $this->user->ID == $sub->post_author ) {
			wp_update_post(
				array(
					'ID' => $sub->ID,
					'post_author' => 0
				)
			);
		}
	}
}
مشاعر الذكاء الاصطناعي.. حقيقة أم وهم؟ – tahkoom.com
معرفة

مشاعر الذكاء الاصطناعي.. حقيقة أم وهم؟

كتبت إيريني أنطون

في عالم تتسارع فيه تطورات الذكاء الاصطناعي، لم يعد دوره يقتصر على تنفيذ الأوامر وتحليل البيانات، بل أصبح قادراً على محاكاة المشاعر البشرية والتفاعل معها بطرق تثير التساؤلات. هل هذه مجرد برمجة متطورة أم أن الآلات قد تقترب من امتلاك وعي عاطفي حقيقي؟

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

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

“الذكاء الاصطناعي أشبه بدمية متطورة جداً”

قال أستاذ عبدالله الدالي، مطور برمجيات، إن: “الذكاء الاصطناعي مثل الممثل المحترف، لا يشعر بالمشاعر الحقيقية ولكنه يعرف أن يقلدها”. وأضاف أستاذ عبدالله أنه يمكن تصميم أنظمة الذكاء الاصطناعي بحيث تبدو وكأنها تمتلك مشاعر، حيث قال: “المبرمجين يصممون النظام بحيث يحلل الحديث أو الموقف مثل نبرة الصوت، ثم يختار رد مناسب من قاعدة بيانات بها عبارات جاهزة تعبر عن فرح أو زعل أو حتى تعاطف، بمعنى أنه يتم وضع سيناريو ثابت في البرمجة. على سبيل المثال، عندما تقول له ‘أنا حزين’، يرد الرد المبرمج عليه، مثلًا: ‘لماذا أنت حزين؟’”.

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

“الجهاز العصبي والنفسي مرتبطان ببعضهما وميز الله بهما الكائنات الحية فقط”

قالت دكتورة ماري جرجس، استشارية صحة نفسية: “العناصر التي تشكل المشاعر توجد في الجزء الأوسط من الدماغ وهي منطقة قريبة من اللاوعي، وبالتالي لا يتحكم بها العقل أو المنطق. المشاعر هي كل ما يشعر به الإنسان من فرح وحب وحزن وغضب وغيرها”. وأكدت دكتورة ماري أنه: “لا يمكن لآلة أن تمتلك مشاعر حقيقية، وإلا ستكون مشاعر مزيفة عن طريق التحكم في برمجة تلك الآلة. يمكن للذكاء الاصطناعي أن يفعل أي شيء ويوصل لتقدمات كبيرة جداً، لكن من الصعب أن يتحكم في شيء له علاقة بالسلوكيات والنفسية والجهاز العصبي. فالجهاز العصبي والنفسي مرتبطان ببعضهما وميز الله بهما الكائنات الحية فقط، ومن الصعب أن تمتلكهما آلة. وفي حالة الوصول لتلك التقنيات وتنفيذها بشكل فعلي، ستكون مجرد محاكاة، وسيوضح ذلك في عدم وضوح الحالة الانفعالية بجودتها الطبيعية”.

“المشاعر تحتاج إلى وعي ذاتي”

يرى البعض أن المشاعر تحتاج إلى وعي ذاتي، وهو ما لا يمتلكه الذكاء الاصطناعي حتى الآن، بينما يعتقد آخرون أن المشاعر ليست سوى عمليات إدراكية يمكن برمجتها. بين الرؤيتين، يقف الجدل العلمي والفلسفي.

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

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

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

 

اظهر المزيد

مقالات ذات صلة

اترك تعليقاً

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *

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